Commit Graph

578 Commits

Author SHA1 Message Date
Simon Michael
3ce34b145c add missing dbgN helpers 2014-07-28 18:57:54 -07:00
Simon Michael
40ab1e17f6 amounts cleanups, and support zeros with commodity 2014-07-28 18:45:13 -07:00
Simon Michael
1333b2650a more showDateSpan cleanup 2014-07-26 17:07:36 -07:00
Simon Michael
a7f7c3181f balance: show compact headings for common intervals
In periodic multicolumn balance reports, column headings now show a more
compact description of common periods (years, half-years, quarters,
months, weeks) for better readability and screen space efficiency.
2014-07-26 16:54:18 -07:00
Simon Michael
f2d9c6e9c1 web: more register chart improvements
- show a background color for future and less-than-zero regions
- show points for transactions, not all line corners
- hovering over point shows balance, date, posted amount and transaction
- clicking a point scrolls towards that date
2014-07-18 16:45:46 -07:00
Simon Michael
4333cae43f web: register chart improvements
- bigger
- plot is horizontal when balance is not changing
- legend for commodities
- some work towards stable commodity colors
2014-07-17 18:56:55 -07:00
Simon Michael
663c68e8e2 web: fix 0s with search by acct within a register 2014-07-17 16:53:36 -07:00
Simon Michael
d3ede5d676 web: remove debug code 2014-07-17 16:29:14 -07:00
Simon Michael
441cae645f web: account transactions report, register clarifications
Clarify the semantics and code of account transactions report a bit.

In the web account register view, emphasise the "historical balance" vs
"running total" distinction; show it as a label for the chart as well,
to reduce confusion.
2014-07-17 16:20:34 -07:00
Simon Michael
b3da48aaa0 identify the commodity in balance assertion errors
Now that balance assertions are checking only a single commodity, it can
be confusing. Eg say all your amounts are in dollars, an assertion like
"= 0" checked the dollar balance in hledger 0.23 but always succeeds in
hledger 0.24. When an assertion fails, we now report which commodity was
checked to help troubleshooting.
2014-07-17 15:23:03 -07:00
Simon Michael
528913d1bd balance: -E adds all starting accounts to multicol rpts
multicolumn balance reports only show accounts with activity (postings)
during the report period, by default. Sometimes you want to show
accounts which have an interesting balance, even if they have no
activity during the period. -E now does this, in addition to showing
leading & trailing empty columns.
2014-07-17 15:18:40 -07:00
Simon Michael
8aec855d04 note dbg0 is like ltrace 2014-07-17 15:06:28 -07:00
Simon Michael
2bfbdd175b queryEndDate 2014-07-15 07:01:01 -07:00
Simon Michael
19d42f8c99 clarify failed balance assertion message 2014-07-15 06:55:46 -07:00
Simon Michael
9f991fa94b tweak Regex haddock 2014-07-08 11:50:19 -07:00
Simon Michael
5bebc2beb0 regex haddock fix 2014-07-06 14:08:45 -07:00
Simon Michael
3a16e6cfc7 mostly replace slow regexpr with regex-tdfa (fixes #189) 2014-07-06 14:03:28 -07:00
Simon Michael
04f6162e19 extract regular expression utils module 2014-07-06 10:11:02 -07:00
Simon Michael
16f8b78305 balance: show multi-commodity amts on one line (fixes #186)
To avoid totally breaking the layout of multicolumn balance reports when
there are multi-commodity balances, these are now rendered on a single
line, comma separated. Simple balance reports still use the old vertical
format for now.
2014-07-03 07:45:55 -07:00
Simon Michael
c31710d942 look harder for decimal point & digit groups (fixes #196)
Amount display styles have been reworked a bit; they are now calculated
after journal parsing, not during it. This allows the fix for #196:
we now search through the amounts until a decimal point is detected,
instead of just looking at the first one; likewise for digit groups.
Digit groups are now implemented with a better type.

Digit group size detection has been improved a little:
1000,000 now gives group sizes [3,4,4,...], not [3,3,...], and
10,000 gives groups sizes [3,3,...] not [3,2,2,..].
(To get [3,2,2,...] you'd use eg 00,00,000.)

There are still some old (or new ?) issues; I don't think we handle
inconsistent decimal points & digit groups too well. But for now all
tests pass.
2014-07-02 23:26:16 -07:00
Simon Michael
647d5833ff clarify dbgAtM issue 2014-07-02 23:24:58 -07:00
Simon Michael
330dfe6891 commodity & amount style parser cleanups, part 2 2014-07-02 17:41:33 -07:00
Simon Michael
9b4b85b4bf commodity & amount style parser cleanups 2014-07-02 11:23:30 -07:00
Simon Michael
8ae303f685 assert only a single commodity, like Ledger (fixes #195)
This change means you can make assertions on a multi-commodity account
balance (asserting one commodity at a time). On the flip side, you can
no longer assert the complete balance of an account (new unexpected
commodities will not be detected.) We might restore that ability later,
using the == syntax.
2014-07-02 07:35:06 -07:00
Simon Michael
0c3148ac7b add an --ignore-assertions flag
Can be helpful when reading Ledger files, where assertions may have
different semantics; or for getting some answers from your journal
to help you fix your assertions.

Could be called --no-assertions, but this might create surprise when it
has an effect contrary to --no-new-accounts.

I had to add another flag throughout the parsers & journal read
functions, ok for now.
2014-07-01 18:26:37 -07:00
Simon Michael
04cfdac0ce query: add >= and <= for amt queries 2014-06-29 11:09:13 -07:00
Simon Michael
201521dc5a a few tweaks 2014-06-24 14:51:09 -07:00
Simon Michael
2eb74d19c6 changelog 2014-06-21 20:14:11 -07:00
Simon Michael
6393293414 allow transformers 0.4* 2014-06-21 20:13:16 -07:00
Simon Michael
5af4ef33ab web: fix a warning 2014-06-13 00:21:26 +01:00
Simon Michael
ec51d28839 web: a bunch of ui cleanup & improvement
- the web UI has been streamlined; edit form, raw & entries views dropped
- we now remember whether sidebar is open or closed
- better help dialog
- keyboard shortcuts are now available
- better add form
- more bootstrap styling
- static file cleanups
- report filtering fixes
- upgrade jquery to 2.1.1, bootstrap to 3.1.1, drop select2, add typeahead, cookie, hotkeys
- clarify debug helpers a little
- refactoring
2014-06-13 00:19:00 +01:00
Simon Michael
34f4800e82 Revert "remove Setup.hs files again, fixing a yesod devel warning"
Setup.hs are required by the Hydra buildbot.

This reverts commit 97ab3db8f0.
2014-05-24 13:39:09 -07:00
Simon Michael
b22cb66319 refactor amount filtering helpers 2014-05-23 13:10:36 -07:00
Simon Michael
97ab3db8f0 remove Setup.hs files again, fixing a yesod devel warning
These were removed and re-added in 2011 because "hackage needed them".
Let's try again.
2014-05-23 09:04:00 -07:00
Simon Michael
cf3d21afef csv and general reader fixes, cleanups
- The CSV reader no longer writes a "(stdin).rules" file when reading
  from stdin.

- Selection of reader(s) is now smarter when input is coming from stdin.
  Previously, all readers were considered applicable for stdin.  This
  meant that when reading a CSV file from stdin, the journal and timelog
  readers were always tried first, and if the CSV file was unparseable,
  you'd see the first (journal) reader's error instead of the CSV
  reader's.  Now, the readers do some basic content sniffing when
  reading stdin, so it generally tries only the one right reader and
  we'll see the right errors.

- The read system now has more debug output.
2014-05-09 17:55:32 -07:00
Simon Michael
6871c4cce5 dbgtrace, does a trace if --debug was used 2014-05-09 17:52:23 -07:00
Simon Michael
2bba4dbe3c update changelogs 2014-05-08 14:35:20 -07:00
Simon Michael
25ccead21c register: also fix date (or date2) sorting of postings (#184) 2014-05-08 14:20:12 -07:00
Simon Michael
2bd785c3fb aregister: fix date filtering with disordered txns (fixes #184)
Fix a refactoring-related regression that the tests missed: if
transactions were not ordered by date in the journal, register
could include postings before the report start date in the output.
2014-05-07 06:31:34 -07:00
Simon Michael
88f18adbc4 show posting dates in debug output 2014-05-06 21:35:38 -07:00
Simon Michael
41add3ffeb oh fine still cant do that, bump to 0.23.98 2014-05-03 17:18:12 -07:00
Simon Michael
87f1e83d78 bump version to 0.24dev 2014-05-03 15:51:57 -07:00
Simon Michael
4740c7082e csv: allow an empty first name in fields list (fixes #178) 2014-05-03 15:05:35 -07:00
Simon Michael
dedd26bbf5 csv: don't count fields in skipped lines (fixes #177) 2014-05-03 14:54:15 -07:00
Simon Michael
07a82724ed lib, cli, web: change from "beta" to "stable"
Also add the hackage Console category to the first two.
2014-05-01 08:20:05 -07:00
Simon Michael
1eeedfe551 bump versions to 0.23 2014-05-01 08:17:17 -07:00
Simon Michael
524bfe73c6 final changelogs 2014-05-01 08:14:36 -07:00
Simon Michael
a28d4fd400 register: drop --display, use --historical instead
We provided a very limited implementation of --display only for one use
case: to see an accurate running balance. Now that is achieved more easily
with -H/--historical, similar to the balance command, and --display
can be dropped.
2014-04-30 17:24:41 -07:00
Simon Michael
0132ed7bea balance: a fix for starting balance with --date2 2014-04-30 17:20:02 -07:00
Simon Michael
70ad5b26ff journal: really don't parse + before an amount as part of the commodity (fixes #181 harder) 2014-04-30 11:28:47 -07:00