Commit Graph

861 Commits

Author SHA1 Message Date
Simon Michael
0adcdf21f8 lib: timedot parsing fix 2016-02-19 22:57:06 -08:00
Simon Michael
b26dd3d9b0 lib: fix timedot comments 2016-02-19 22:55:30 -08:00
Simon Michael
dd77ac4c0a lib: note debugLevel gotcha in GHCI 2016-02-19 22:54:38 -08:00
Simon Michael
baeca07440 doc: note include does not support * 2016-02-19 22:51:18 -08:00
Simon Michael
c9937db10e lib: show txn's file position in assertion errors 2016-02-19 22:48:59 -08:00
Simon Michael
1cf223a2db lib: finish move of reading utils, useful for 320
It seems this already began in today's timedot commit.
2016-02-19 21:37:12 -08:00
Simon Michael
8badaf3b87 doc: timedot doc fixes 2016-02-19 18:04:33 -08:00
Simon Michael
06b54bf05e lib: timedot format, convenient for time logging
Timedot is a plain text format for logging dated, categorised
quantities (eg time), supported by hledger.  It is convenient for
approximate and retroactive time logging, eg when the real-time
clock-in/out required with a timeclock file is too precise or too
interruptive.  It can be formatted like a bar chart, making clear at a
glance where time was spent.
2016-02-19 17:55:57 -08:00
Simon Michael
5da355c06f lib: more ergonomic balance assertion errors 2016-02-10 07:40:18 -08:00
Simon Michael
a2b989d898 journal: support ledger3-compatible "apply account" 2016-01-29 07:39:26 -08:00
Simon Michael
8f432b651e api: Typeable/Data/Generic instances for Account 2016-01-21 15:16:11 -08:00
Simon Michael
96e1ca7ea1 lib: refactor amount canonicalisation
Amount display style canonicalisation code and terminology has been
clarified a bit. Individual amounts still have styles; from these we
derive the standard "commodity styles". In user docs, we might call
these "commodity formats" since a Ledger-compatible commodity directive
would use the "format" keyword.
2015-11-24 01:40:10 -08:00
Simon Michael
4ed27d5d25 doc: add release date to changelogs 2015-10-30 14:09:19 -07:00
Simon Michael
a5fd56223c bump version to 0.27 2015-10-30 13:21:51 -07:00
Simon Michael
36d97a2e50 update cabal docs and other fields 2015-10-30 13:08:03 -07:00
Simon Michael
0ee2ff7ab2 lib: fix off-by-one in transaction index 2015-10-30 10:41:42 -07:00
Simon Michael
2feace32dd lib: number transactions as they are read
And allow looking up transactions by their read order (index),
or the previous/next transactions in the sequence.
2015-10-29 20:12:46 -07:00
Simon Michael
11fee9fbe8 ui: txn: show multi-commodity amounts on one line
In the transaction screen, show multi-commodity posting amounts on one
line, consistent with the rest of hledger-ui.
2015-10-29 18:10:06 -07:00
Simon Michael
76ab5df833 lib: credit pandoc for the charWidth function 2015-10-29 09:19:20 -07:00
Simon Michael
6ae14b3f56 doc: update changelogs 2015-10-26 06:09:57 -07:00
Simon Michael
191c2e533f doc: generate man pages for each package (#282)
There are now six man pages, one for each main executable and file
format, generated from markdown by the mighty pandoc. They are basically
the content of the user manual, split up and moved into the appropriate
package directory.  I've also committed the generated man files.

The man pages' markdown source (hledger/hledger.1.md,
hledger-lib/hledger_journal.5.md etc.) are now the master documentation
files. The plan is to concatenate them (with a little munging) to form
the all-in-one user manual for the website, at release time.  This also
separates the hledger.org user manual from the latest doc commits, which
should simplify website management.
2015-10-20 06:26:09 -07:00
Simon Michael
d24b1b96f7 lib: parser cleanups 2015-10-17 12:09:03 -07:00
Simon Michael
bc43036117 lib: use consistent p suffix for parsers 2015-10-17 11:51:45 -07:00
Simon Michael
8214a6ccef dangit.. simplify combineJournalUpdates for real 2015-10-13 11:54:15 -07:00
Simon Michael
3be88ad6b5 simplify combineJournalUpdates
I really don't see why that extra x parameter is needed or works..
rewrite it in simpler form.

I also might be introducing breakage for older GHC's by using
unconditionally <$>, but I'm not seeing that for some reason
(tested back to ghc 7.6).
2015-10-13 11:49:51 -07:00
Simon Michael
71921135f6 include P amounts in canonicalisation (fixes #131)
Since market price amounts didn't contribute to the canonical commodity
styles, they were being reset to the null style. And this propagated to
the reported amounts when -V was in effect, causing much confusion.
Now, market prices contribute to canonicalisation and the expected
styles are preserved even with -V.

cf https://github.com/simonmichael/hledger/issues/131#issuecomment-133545140
2015-10-11 16:07:31 -07:00
Simon Michael
eb75946e64 print: always right-align amounts
print now always right-aligns the amounts in an entry, even when they
are wider than 12 characters.

If there is a price, it's considered part of the amount for
right-alignment. Maybe it would be nicer to put amounts and prices in
separate columns ? That will get a little complicated, needs more
discussion/design.

Also some cleanup of postingAsLines.
2015-10-10 15:09:42 -07:00
Simon Michael
155722d7ee make strWidth aware of multi-line strings (#242) 2015-10-10 15:08:28 -07:00
Simon Michael
1d944ac1a9 doc: balance --format does not support - any more 2015-10-10 15:07:49 -07:00
Simon Michael
3b40edba9c print: fix wide char support, add tests (#242)
The print command wasn't lining up amounts with wide chars in account
names, fixed it properly this time. Transaction and Posting's Show instances
should also be wide-char-aware now.
2015-10-10 11:53:28 -07:00
Simon Michael
939f7184c9 journal: make "end comment" optional, like ledger
The "comment" directive longer requires an "end comment", and will
extend to the end of the file(s) without it.
2015-10-07 16:41:49 -07:00
Simon Michael
a2f344f6d9 journal: require dates to begin with a digit 2015-10-04 08:41:01 -10:00
Simon Michael
deea422dc1 fix build error (#242) 2015-09-29 21:16:51 -10:00
Simon Michael
58b98faf36 balance: wide-char-aware multicolumn reports (#242) 2015-09-29 20:54:05 -10:00
Simon Michael
ef27e5c427 string utils cleanup 2015-09-28 18:47:05 -10:00
Simon Michael
42e2da4bb6 balance, print; more wide char support (#242)
Simple (non-multicolumn) balance reports containing wide characters
should now align correctly (in apps and fonts that show wide chars as
double width). Likewise, the print command.
2015-09-28 18:33:18 -10:00
Simon Michael
5b5e5eeaf4 register: wide-character-aware layout (#242)
Wide characters, eg chinese/japanese/korean characters, are typically
rendered wider than latin characters. In some applications (eg gnome
terminal or osx terminal) and fonts (eg monaco) they are exactly double
width. This is a start at making hledger aware of this. A register
report containing wide characters (in descriptions, account names, or
commodity symbols) should now align its columns correctly, when viewed
with a suitable font and application.
2015-09-28 16:12:20 -10:00
Simon Michael
dafa8efada note possible combineJournalUpdates inefficiency 2015-09-26 16:01:27 -10:00
Simon Michael
5048d3bf06 lib: memoise accountNameApplyAliases too ?
This adds a accountNameApplyAliasesMemo, which memoises the result of
applying a set of aliases (simple and regex) to an account name. In
theory this should reduce more repetitive work, but in practice it
doesn't seem to make a difference, so it's unused for now.
2015-09-26 15:58:12 -10:00
Simon Michael
4326f88c26 lib: memoise aliasReplace for fast regex aliases (#244)
Roughly speaking, the time to apply regular expression account aliases
was O(aliases x transactions), and should now be O(aliases x accounts).
Also, the constant factor was reduced a lot by the recent commit
memoising toRegex. So now, regex aliases should be "free" like simple
aliases - use as many as you want, the slowdown shouldn't be noticeable.
2015-09-26 15:45:44 -10:00
Simon Michael
041541e466 lib: memoised versions of regexReplace[CI] (#244) 2015-09-26 15:45:17 -10:00
Simon Michael
f8f2d457b9 lib: memoize toRegex[CI] (#244)
The regex helpers were converting strings to regex-tdfa regular
expressions on the fly every time, but this appears to be quite
expensive. The simplest memoisation lib seems to solve it nicely.
2015-09-26 15:39:21 -10:00
Simon Michael
591abefe9e clarify modifiedaccountnamep 2015-09-24 14:23:52 -10:00
Simon Michael
f4c963b648 whitespace 2015-09-22 12:59:25 -07:00
Simon Michael
821f1b7120 lib: fix tests for zero amount style (#230, #276) 2015-09-02 16:38:45 -07:00
Simon Michael
b770190942 lib: clarify flattenAccounts 2015-09-02 16:22:08 -07:00
Simon Michael
b8d75b7728 balance, etc: fix amount style loss (fixes #230, #276)
hledger-lib-0.24's "track the commodity of zero amounts when
possible (useful eg for hledger-web's multi-commodity charts)" preserved
the commodity when normalising a zero mixed amount, but not the amount
style. This showed up as occasionally incorrect amount style (commodity
symbol placement, decimal point character, etc.) in balance reports with
certain journals, like this:

  $ hledger bal
              €3000.00  a     <------ not using the canonical € style
              4000,58€    1
             -1000,58€    D
             -3000,00€  e
  --------------------
                     0

I thought this would require a big rewrite of amount arithmetic, but it
seems that just being a little more careful is enough. When normalising
a mixed amount containing multiple zeros in the same commodity, we now
preserve the last zero with its amount style, instead of replacing them
all with a new one.
2015-09-02 16:21:56 -07:00
Simon Michael
92038b7d72 web: fix options breakage, add test code to tags 2015-08-28 15:23:49 -07:00
Simon Michael
74512814ec cli/ui/web: rename X.Options modules to X.XOptions
Make these modules' names more like the heavily-used types they
define (CliOpts, UIOpts, WebOpts). This is consistent with
RawOptions and ReportOptions, and helps with code navigation.
2015-08-28 12:43:51 -07:00
Simon Michael
8673332c8e ui, web: show fewer other accounts in acct register
To reduce noise in the "other accounts" field of hledger-ui's and
hledger-web's account register: if there are both real and virtual
postings to other accounts, show only the accounts posted to by real
postings.

Use case: in many transactions I have extra balanced-virtual postings
which adjust budget envelopes (subaccounts of checking). These clutter
up the register's other accounts field making it useless. Excluding them
(when there are also real postings) makes it more useful for me and
probably others.
2015-08-28 11:58:57 -07:00
Simon Michael
f3dd5eb830 fix options breakage with GHC < 7.10 2015-08-28 11:17:49 -07:00
Simon Michael
0d02262463 validate --depth/depth:'s argument is positive 2015-08-28 09:57:30 -07:00
Simon Michael
4dd1e9c725 clean up options validation a little 2015-08-28 09:57:01 -07:00
Simon Michael
5fa06453f1 lib: note depth's filtering and display control uses 2015-08-28 08:04:54 -07:00
Simon Michael
19c3749b50 balance: move -V helpers to the *Report modules 2015-08-26 10:38:45 -07:00
Simon Michael
d23d9acf33 fix haddock failures (#281) 2015-08-26 10:11:32 -07:00
Simon Michael
3a7a5d6035 lib: 6-tuple accessors 2015-08-24 16:24:11 -07:00
Simon Michael
866414a528 ui: provide a more useful transaction register
The register screen is now like the register view in hledger-web (and
other accounting systems), rather than hledger's register command.
This means:

- it shows transactions affecting a particular current account, rather
  than postings matching a pattern.

- Each line represents a whole transaction.

- The account field shows the *other* account being transacted with.
  When there is more than one, they are all listed, abbreviated and
  marked with "(split)".

- The amount field shows the effect of the transaction on the current
  account; positive for an inflow to this account, negative for an
  outflow.

- The balance field should usually show the current account's historic
  balance as of the transaction date, even when you change the report
  start date. (Not working yet - currently it always shows the running
  total).

- Transactions are listed most recent first, currently.
2015-08-24 16:24:11 -07:00
Simon Michael
6fd1e965ed fix cabal file regression breaking GHC<7.10 (#280) 2015-08-21 12:19:43 -07:00
Simon Michael
cc98ee39f7 balance, lib: --format/StringFormat improvements
The balance command's --format option (in single-column mode) can now
adjust the rendering of multi-line strings, such as amounts with multiple
commodities. To control this, begin the format string with one of:

 %_  - renders on multiple lines, bottom-aligned (the default)
 %^  - renders on multiple lines, top-aligned
 %,  - render on one line, comma-separated

Also the final total (and the line above it) now adapt themselves to a
custom format.
2015-08-19 20:53:51 -07:00
Simon Michael
7aecbac851 lib: split up Utils more 2015-08-19 20:53:50 -07:00
Simon Michael
69c870c6f0 balance, lib: make StringFormat singular; cleanup
Pass around a StringFormat rather than [StringFormat].
Also more balance report item rendering refactoring.
2015-08-19 20:53:50 -07:00
Simon Michael
36dd64cf02 balance, lib: clarify --format implementation
The --format option's OutputFormat type was named confusingly like the
--output-format option.  It has been renamed StringFormat to distinguish
it from StorageFormat (aka the data file format, referenced by
--output-format). Related code and types have been consolidated.
Also the (single-column) balance report's item rendering has had
some cleanup.
2015-08-19 20:53:49 -07:00
Simon Michael
2b339667e2 Merge branch 'perf-polyparse' (early part) 2015-08-13 13:10:10 -07:00
Simon Michael
632a000f08 derive NFData in a way compatible with GHC < 7.10
The DeriveAnyClass extension requires GHC 7.10, so instead do this in a
more verbose backwards-compatible way. Adds a dependency on deepseq.
2015-08-13 12:58:44 -07:00
Simon Michael
790d42bfa4 derive NFData (and Generic) for all types
so we can benchmark things more easily with criterion.

As well as NFData, the Generic instance and a bunch more GHC extensions
seemed necessary. This is a little scary, impact unknown.
2015-08-13 12:58:35 -07:00
Simon Michael
42d452f99c abstract parsec's SourcePos so as to derive NFData
The NFData instance helps us time things with criterion.
2015-08-13 12:56:15 -07:00
Simon Michael
fcb7d297c8 use canonical bugs.hledger.org url in cabal yamls 2015-08-13 10:02:06 -07:00
Simon Michael
48e31d4f8c bump version to 0.26.98 2015-08-12 22:49:04 -07:00
Simon Michael
a9b2e5409c switch to hpack-generated cabal files
The hledger-lib, hledger and hledger-web cabal files are now generated
from the package.yaml files with hpack, plus some manual fixups.
2015-08-12 22:45:08 -07:00
Simon Michael
b91f2b85d0 update hpack package.yaml files 2015-08-12 09:25:28 -07:00
Simon Michael
94094252be rename historical prices to market prices
Simpler and clearer. We now have "transaction prices" (recorded as part
of transaction amounts) and "market prices" (recorded with P
directives). Both are matters of historical record, also this avoids
confusion with the balance command's "historical balances".
2015-08-09 16:20:02 -07:00
Simon Michael
49be1f646e balance: add -V/--value to show as market value
Initial support of market value reporting and currency conversion,
similar in spirit to Ledger's.  The balance command now has a -V/--value
flag that converts all the reported amounts using their "default market
price". That is the latest market price (P directive, formerly called
"historical prices") found in the journal for their commodity that is on
or before the report end date.

Unlike Ledger, hledger's -V only uses the market prices recorded with P
directives, ignoring transaction prices recorded as part of posting
amounts (which -B/--cost uses). Using -B and -V together is allowed.
2015-08-09 16:03:16 -07:00
Simon Michael
040d00e8fb also canonicalise historical price amounts
So that when we convert amounts to market value, the result will have
the canonical style of the target commodity.
2015-08-09 15:12:16 -07:00
Simon Michael
78018cc24d tools: yaml definitions for the hledger cabal files
Here are hpack package.yaml files for the other hledger cabal files.
These remove a lot of human-error-prone duplication.
They are not used yet as hpack isn't quite mature enough -
when it supports flags and benchmarks we will probably switch.
2015-07-14 17:32:49 -07:00
Simon Michael
087f3a49bc note older tested-with versions based on hackage builder 2015-07-13 20:23:59 -07:00
Simon Michael
0b2ccdd298 0.26 changelogs/release notes 2015-07-12 17:58:02 -07:00
Simon Michael
90ae65eda9 cherry pick 0.25.1 changelogs 2015-07-12 15:48:21 -07:00
Simon Michael
e5c0d75117 bump version to 0.26 2015-07-12 15:29:10 -07:00
Simon Michael
73e4ccee80 allow year parser to handle arbitrarily large years 2015-07-12 12:32:53 -07:00
Simon Michael
7a050d65c8 bs/is/cf: recognise "debt..." as a synonym for "liabilities..." 2015-07-12 12:32:53 -07:00
Simon Michael
cddaa2724d rendering a June 30 date span properly (#272)
30 days hath september, april, JUNE and november
2015-07-02 20:44:39 -07:00
Simon Michael
b827f1a146 more balanceTransaction cleanup
Clarify: it's fine to try to infer prices on a transaction that has had
an amount inferred, it just won't have any effect.
2015-07-02 18:06:03 -07:00
Simon Michael
b735107f43 print: show inferred unit prices with at least 2 decimal places
We don't do a good job of calculating good-looking unit prices when the
commodity display precisions are low. Eg when a journal doesn't use any
decimal places, any inferred unit prices are shown by the print command
also with no decimal places, which makes them look wrong.

Now inferred unit prices always have a minimum display precision of 2,
which helps a bit. Could do better.
2015-07-02 17:36:09 -07:00
Simon Michael
5978a19b15 finish refactoring balanceTransaction 2015-07-02 16:59:43 -07:00
Simon Michael
61e4034de5 Journal's Show instance reported one too many accounts 2015-06-28 14:14:56 -07:00
Simon Michael
ba18f4a25a begin refactoring balanceTransaction 2015-06-28 12:03:42 -07:00
Simon Michael
b9883d9eb1 query: make real: equivalent to real:1 2015-06-12 06:23:34 -07:00
Simon Michael
ba6269981b begin reviving journalreader unit tests 2015-06-11 10:16:46 -07:00
Simon Michael
d1769d9d62 journal: allow journal entries with no postings
We now parse, and also print, posting-less journal entries, as I
proposed on the lists.

These are not real General Journal entries/transactions, but here is my
rationale:

- Ledger and beancount parse them
- if we parse them, we should print them
- they provide a natural way to record and report non-transaction events
- most of all, they permit more gradual introduction and learning of the concepts.
  Eg a beginner can keep a simple journal even before learning about accounts and postings.
2015-06-11 10:16:46 -07:00
Imuli
49f1744ae5 read multiple files: internals 2015-05-28 10:40:48 -07:00
Simon Michael
46bbc9e0aa fix simple aliases that match the whole account name 2015-05-28 10:40:48 -07:00
Simon Michael
ef890e1b23 add: quote file name consistently in output
Don't show quotes around the journal file path in the "Creating..."
message since there aren't any in the subsequent "Adding..." message.
2015-05-27 14:41:23 -07:00
Simon Michael
8d75635505 print: limit display precision of generated prices (#262)
When a transaction posts to two commodities without specifying the
conversion price, we generate a price which makes it balance
(cf http://hledger.org/manual.html#prices).

Until now, these generated prices were always shown with full precision
(all available decimal digits) so that a manual calculation with the
displayed numbers would agree.

If there's just one posting in the commodity being priced, we can use an
exact total price and the precision is no problem.

But if there are multiple postings in the commodity being priced, we
must show the averaged unit price. This can be an irrational number,
which with our current Decimal-based implementation would display an
excessive 255 decimal digits. So in this case we now set the price's
display precision to the sum of the (max) display precisions of the
commodities involved. An example:

hledgerdev -f- print
<<<
1/1
    c    C 10.00
    c    C 11.00
    d  D -320.00
>>>
2015/01/01
    c  C 10.00 @ D 15.2381
    c  C 11.00 @ D 15.2381
    d     D -320.00

>>>=0

There might still be cases where this will show more price decimal
places than necessary. For now, YAGNI.
2015-05-27 14:21:19 -07:00
Simon Michael
87d5ddfb71 query: drop the empty: query term
This seems to be equivalent to the --empty option, and overlaps
a bit confusingly with amt:0. I think we can drop it.
2015-05-21 16:44:11 -07:00
Simon Michael
fdc507bd13 match tag names with a regexp, like everything else 2015-05-21 16:25:19 -07:00
Simon Michael
9e2111106b drop regexpr dependency 2015-05-17 08:32:45 -07:00
Simon Michael
68c71de25d tighten up status:X parsing, cleanups 2015-05-16 12:21:50 -07:00
Simon Michael
d1f63334ee handle pending status correctly, add --pending (#250)
A transaction/posting status of ! (pending) was effectively equivalent
to * (cleared). Now it's a separate state, not matched by --cleared.
The new Ledger-compatible --pending flag matches it, and so does
--uncleared. The equivalent search queries are now status:*, status:!
and status: (the old status:1 and status:0 spellings are deprecated).

Since we interpret --uncleared and status: as "any state except cleared",
it's not currently possible to match things which are neither cleared
nor pending.
2015-05-16 11:51:35 -07:00
Simon Michael
934d217523 changelogs 2015-05-14 13:39:54 -07:00
Simon Michael
077e3c6a02 journal: re-add non-regex aliases, as default (#252)
The regex account aliases added in 0.24 trip up people switching between
hledger and Ledger. (Also they are currently slow).

This change makes the old non-regex aliases the default; they are
unsurprising, useful, and pretty close in functionality to Ledger's.

The new regex aliases are also available; they must be enclosed in
forward slashes. Ledger effectively ignores these, which is ok.

Also clarify docs, refactor, and use the same parser for alias
directives and alias options
2015-05-14 13:01:50 -07:00
Simon Michael
70d87613f2 some cleanup of debug trace helpers 2015-05-14 13:01:49 -07:00
Simon Michael
7c3379db63 journal: allow whitespace following a comment directive 2015-05-09 13:25:31 -07:00
Simon Michael
61423bdad4 consistently require latest base-compat for sanity 2015-04-29 07:16:08 -07:00
Simon Michael
52ce7c1d93 make recent timelog commit ghc 7.8 compatible 2015-04-29 07:10:13 -07:00
Simon Michael
bb71b077a2 fix runExceptT breakage from recent PR (#248) 2015-04-29 07:08:33 -07:00
Simon Michael
5102eca9c3 timelog: support the description field (fix #247) 2015-04-28 13:54:36 -07:00
Simon Michael
fb37e99bc8 lib: simple dates must start with non-space; docs 2015-04-28 13:50:58 -07:00
Simon Michael
dac8a784f4 bump version to 0.26 alpha 2015-04-28 13:48:23 -07:00
Simon Michael
1bc9b71f28 bump version to 0.25 2015-04-28 13:42:41 -07:00
Simon Hengel
964a410b24 hledger-lib: Update for base-compat-0.8.0 (see #245) 2015-04-23 15:41:59 +08:00
Simon Michael
735f818c22 changelogs 2015-04-07 17:14:44 -07:00
Simon Michael
ab7ed99cc4 fix broken TimeLocale import for ghc 7.8 (#239) 2015-03-29 16:30:25 -07:00
Simon Michael
f8a24ccead fix parseTime warnings with time 1.5+ (#239) 2015-03-29 16:12:54 -07:00
Simon Michael
e838ed0637 fix a Control.Monad.Error warning (#239) 2015-03-29 16:12:05 -07:00
Simon Michael
e7376e4ea5 unnecessary CPP pragma 2015-03-29 16:10:39 -07:00
Simon Michael
f75849cdd6 fix ghc 7.10 Applicative import warnings (#239)
Still needed CPP, despite using base-compat.
2015-03-29 16:09:41 -07:00
Simon Michael
8e50395b7c ErrorT -> ExceptT, handle mtl <2.2.1 && >=2.2.1 (#239) 2015-03-29 14:16:42 -07:00
Simon Michael
216ebb8333 hledger-lib: mark the double flag as manual only
This would only be used for developer testing, cabal should never toggle
it automatically.
2015-03-27 15:46:57 -07:00
Simon Michael
b8b730226f hledger/hledger-lib: update tested-with
Add 7.10 and drop 7.2-7.6 which haven't been tested recently (but should
still work)
2015-03-27 15:44:39 -07:00
Simon Michael
4538745005 adapt to GHC-7.10's foldable/traversable changes (#239) 2015-03-27 15:43:28 -07:00
Simon Michael
e60eb71467 adapt to GHC-7.10's time-1.5 (#239) 2015-03-27 15:42:32 -07:00
Simon Michael
414a33f3e4 merge changelog updates 2015-03-15 13:20:55 -07:00
Simon Michael
c47463332a allow utf8-string-1 (fix fpco/stackage/#426) 2015-03-15 11:06:53 -07:00
Simon Michael
adf10c238d update changelogs 2015-02-27 08:37:16 -08:00
Simon Michael
592ae9a28e timelog: show hours with 2 decimal places, not 1 2015-02-27 08:37:16 -08:00
Simon Michael
099a1de3b6 clarify built-in commodities rounding 2015-02-27 08:37:16 -08:00
Simon Michael
d2877a919a add some type signatures in Utils, helps ghci-web 2015-02-09 17:42:51 +00:00
Simon Michael
3d5b269b3d fix rendering of week 52 heading in weekly reports 2015-01-18 09:32:14 -08:00
Julien Moutinho
af56ced3b0 lib: add eof parsing checks 2015-01-11 09:45:55 -08:00
Simon Michael
fabf8a743d changelogs 2015-01-10 22:28:36 -08:00
Simon Michael
257ce57383 fix balance accumulation across assertions (#195)
A sequence of balance assertions asserting first one commodity, then
another, then the first again, was not working.
2015-01-10 22:17:19 -08:00
Simon Michael
6543f44d82 doc: forgot add release date to changelogs 2015-01-10 17:03:44 -08:00
Simon Michael
6da4942633 balance: tweak flags a bit; we now use -N and -T
-N doesn't seem to be used by Ledger currently; we'll
use it as shortcut for --no-total.

-T is used by Ledger to set a custom value expression for the final
total. I'm going to take it as a shortcut for --row-total instead.
2014-12-27 15:34:23 -08:00
Simon Michael
ba0623165f balance: row totals/averages in multicolumn mode 2014-12-27 15:24:45 -08:00
Simon Michael
e794412a8f fix JournalReader ctx warning 2014-12-27 15:24:02 -08:00
Simon Michael
9c68944c79 journal, csv: comment lines can also start with *
As in Ledger. This means you can embed emacs org/outline-mode nodes in
your journal file and manipulate it like an outline.
2014-12-27 14:41:28 -08:00
Simon Michael
a719cb8f6e bump version to 0.25-unreleased 2014-12-26 11:08:20 -08:00
Simon Michael
e77225038f bump version to 0.24 2014-12-25 11:42:39 -08:00
Simon Michael
62bad65e5b tighten up status: docs and behaviour a bit (fix #227)
A status: query term no longer accepts * as a synonym for 1,
which was a bit confusing since 1 matches both * and !.
For now, it takes a value of 1 (true) or anything else (false).
2014-12-24 23:48:23 -08:00
Simon Michael
c138c35d3b register: support date:/date2:/--date2 better (fix #201, #221, #222) 2014-12-24 16:11:30 -08:00
Simon Michael
d1404adf3f note lack of date2 support in (eg) postingsReport 2014-12-24 14:54:56 -08:00
Simon Michael
6780c63ab3 simplify null Date2 queries too 2014-12-24 14:54:56 -08:00
Simon Michael
77c2c90290 cli: parse date2: correctly (#222) 2014-12-24 14:54:56 -08:00
Simon Michael
68a4adb0bd doc: draft changelogs for all three packages 2014-12-21 12:01:11 -08:00
Julien Moutinho
c65fea2b4b lib: fix combineJournalUpdates folding order
NOTE: this is important to correctly build JournalContext
NOTE: currently a list reverse must done at the end,
      maybe using a Data.Queue would be more efficient.
2014-12-11 04:37:10 +01:00
Simon Michael
855d4e1131 balance: with --tree and --flat, use the last (fix #219) 2014-12-05 12:56:33 -08:00
Simon Michael
d352bbedd2 cli: with a repeated flag, the last takes precedence
This is helpful eg for customising your reporting command aliases on the fly.
2014-12-04 12:41:47 -08:00
Simon Michael
bd39e5df99 showDateSpan: handle boundary-crossing 1-day spans
Eg recognise that 2014/11/30-2014/12/1 can be abbreviated to
2014/11/30d, similarly 2014/12/31-2015/1/1. Doesn't handle feb 29th
correctly, so eg 2000/2/28-2000/3/1 is wrongly abbreviated to
2000/2/28d.
2014-12-03 18:18:05 -08:00
Simon Michael
1708f0b441 csv: try to preserve order of same-day transactions
If the CSV records appear to have been in reverse date order,
we'll now reverse them all before also sorting by transaction date,
so that the original order of same-day transactions is preserved.
We detect this using a simple heuristic: if the first converted
transaction's date is later than the last's.
2014-12-02 11:16:51 -08:00