hledger/hledger-lib/Hledger/Data
Simon Michael c1236fa6e9 journal: account directives can declare account types
Previously you had to use one of the standard english account names
(assets, liabilities..) for top-level accounts, if you wanted to use
the bs/bse/cf/is commands.
Now, account directives can specify which of the big five categories
an account belongs to - asset, liability, equity, revenue or expense -
by writing one of the letters A, L, E, R or X two or more spaces after
the account name (where the numeric account code used to be).

This might change. Some thoughts influencing the current syntax:
- easy to type and read
- does not require multiple lines
- does not depend on any particular account numbering scheme
- allows more types later if needed
- still anglocentric, but only a little
- could be treated as syntactic sugar for account tags later
- seems to be compatible with (ignored by) current Ledger

The current design permits unlimited account type declarations anywhere
in the account tree. So you could declare a liability account somewhere
under assets, and maybe a revenue account under that, and another asset
account even further down. In such cases you start to see oddities like
accounts appearing in multiple places in a tree-mode report. In theory
the reports will still behave reasonably, but this has not been tested
too hard. In any case this is clearly too much freedom. I have left it
this way, for now, in case it helps with:

- modelling contra accounts ?
- multiple files. I suspect the extra expressiveness may come in handy
  when combining multiple files with account type declarations,
  rewriting account names, apply parent accounts etc.
  If we only allowed type declarations on top-level accounts, or
  only allowed a single account of each type, complications seem likely.
2018-10-09 14:24:59 -10:00
..
Account.hs journal: a new account sorting mechanism, and a bunch of sorting fixes 2018-09-22 21:45:07 -10:00
AccountName.hs rename easytests_* to tests_* 2018-09-06 13:13:26 -07:00
Amount.hs lib: fix balance --budget in the presence of --value 2018-09-23 07:45:34 -10:00
Commodity.hs tests: clear out old boilerplate 2018-08-31 18:12:17 -07:00
Dates.hs lib: switch to megaparsec 7 2018-09-30 20:15:12 -06:00
Journal.hs journal: account directives can declare account types 2018-10-09 14:24:59 -10:00
Ledger.hs journal: a new account sorting mechanism, and a bunch of sorting fixes 2018-09-22 21:45:07 -10:00
MarketPrice.hs tests: clear out old boilerplate 2018-08-31 18:12:17 -07:00
Period.hs bs/bse/cf/is: fix display of abbreviated name for December 2018-01-19 12:45:51 -08:00
PeriodicTransaction.hs tests: update doctests after Transaction Show change 2018-09-04 14:02:04 -07:00
Posting.hs rename easytests_* to tests_* 2018-09-06 13:13:26 -07:00
RawOptions.hs csv: merge lucamolteni's cassava/custom separators (squashed) (#829) 2018-09-07 12:34:51 -07:00
StringFormat.hs rename easytests_* to tests_* 2018-09-06 13:13:26 -07:00
Timeclock.hs rename easytests_* to tests_* 2018-09-06 13:13:26 -07:00
Transaction.hs rename easytests_* to tests_* 2018-09-06 13:13:26 -07:00
TransactionModifier.hs tests: update doctests after Transaction Show change 2018-09-04 14:02:04 -07:00
Types.hs journal: account directives can declare account types 2018-10-09 14:24:59 -10:00