Commit Graph

15 Commits

Author SHA1 Message Date
Simon Michael
f68309b106 acc: integrate CLI help & manual 2019-01-26 17:01:55 -08:00
Simon Michael
763903ebda journal: save account directives' comments, tags, declaration order 2019-01-18 16:40:35 -08:00
Simon Michael
4a399e50cb acc: don't require an explicit --flat to make --drop work 2018-10-13 13:22:11 -07:00
Simon Michael
0d6803e4b5 accounts: drop obsolete --codes flag 2018-10-10 20:35:53 -07:00
Simon Michael
cf25ef5cf5 accounts: filtering by anything other than account name was broken 2018-10-10 20:32:19 -07:00
Simon Michael
3de8c11de1 journal: a new account sorting mechanism, and a bunch of sorting fixes
A bunch of account sorting changes that got intermingled.

First, account codes have been dropped. They can still be parsed and
will be ignored, for now. I don't know if anyone used them.
Instead, account display order is now controlled by the order of account
directives, if any. From the mail list:

  I'd like to drop account codes, introduced in hledger 1.9 to control
  the display order of accounts. In my experience,

  - they are tedious to maintain
  - they duplicate/compete with the natural tendency to arrange account
    directives to match your mental chart of accounts
  - they duplicate/compete with the tree structure created by account
    names

  and it gets worse if you think about using them more extensively,
  eg to classify accounts by type.

  Instead, I plan to just let the position (parse order) of account
  directives determine the display order of those declared accounts.
  Undeclared accounts will be displayed after declared accounts,
  sorted alphabetically as usual.

Second, the various account sorting modes have been implemented more
widely and more correctly. All sorting modes (alphabetically, by account
declaration, by amount) should now work correctly in almost all commands
and modes (non-tabular and tabular balance reports, tree and flat modes,
the accounts command). Sorting bugs have been fixed, eg #875.
Only the budget report (balance --budget) does not yet support sorting.

Comprehensive functional tests for sorting in the accounts and balance
commands have been added. If you are confused by some sorting behaviour,
studying these tests is recommended, as sorting gets tricky.
2018-09-22 21:45:07 -10:00
Simon Michael
059ad9eb76 refactor: jaccounts -> jdeclaredaccounts 2018-09-17 05:52:13 -07:00
Simon Michael
cd67f8ea68 tests: clear out old boilerplate 2018-08-31 18:12:17 -07:00
Simon Michael
d778a92561 tests: export HUnit/EasyTest from Hledger.Utils.Test; more helpers 2018-08-18 15:19:59 +01:00
Simon Michael
84579bb1b4 silence redundant import warnings with ghc 8.4 2018-03-24 22:51:56 +00:00
Simon Michael
d420a8b534 journal: account directive: parse and store a numeric account code also 2018-01-23 11:33:23 -08:00
Simon Michael
4ddb748d9c acc: rename --posted -> --used 2018-01-19 12:41:03 -08:00
Simon Michael
37a4d71f1b acc: report --declared and/or --posted accounts 2018-01-18 18:43:21 -08:00
Simon Michael
bc66c75bd2 cli: some new short command aliases
accounts: a
balance: b
print: p, txns
register: r
2017-09-14 05:53:12 -07:00
Simon Michael
55cebad0d5 cli: refactor: move commands to a subdirectory, reinstate test command 2017-09-12 10:04:36 -07:00