Commit Graph

471 Commits

Author SHA1 Message Date
Simon Michael
ad83919c6a ; lib: drop the Maybe from SummaryPosting 2019-05-31 15:29:09 -07:00
Simon Michael
34a0ad00b1 ;lib: encapsulate Prices db 2019-05-25 05:29:34 -07:00
Simon Michael
aa99743096 make -V do --value=end in multiperiod reports (#329) 2019-05-24 10:30:35 -07:00
Simon Michael
ea5050963f web: try to fix RegisterR warning 2019-05-23 22:34:31 -07:00
Simon Michael
20bc386b80 restore TransactionsReport
hledger-web's register chart uses it, I didn't see it
because it's called from a hamlet template.
2019-05-23 22:15:40 -07:00
Simon Michael
7212b92079 cleanups (#329) 2019-05-23 22:07:50 -07:00
Simon Michael
54c1529638 lib: drop TransactionsReport, BalanceHistoryReport
They seem unused.
2019-05-23 21:55:19 -07:00
Simon Michael
04a30fa084 lib: TransactionsReport/AccountTransactionsReport cleanup
Split them into separate files, rename journalTransactionsReport to
transactionsReport.
2019-05-23 21:55:19 -07:00
Simon Michael
9977739c76 bal etc.: replace --value=transaction with --value=cost (#329) 2019-05-23 21:55:18 -07:00
Simon Michael
adbce22152 bal: --budget: don't always convert to cost
And don't show a percentage when budgeted and actual amounts are in
different commodities.
2019-05-23 21:55:18 -07:00
Simon Michael
2355da0f93 reg: replace --value=transaction with --value=cost 2019-05-23 21:55:18 -07:00
Simon Michael
ace215f5f3 print: replace --value=transaction with --value=cost 2019-05-23 21:55:18 -07:00
Simon Michael
37c0edb1f9 lib: drop postingValueAtDate 2019-05-23 21:55:18 -07:00
Simon Michael
f999bf78e6 opts: new -B/--cost, -V/--market, --value flags (#329) 2019-05-23 13:11:20 -07:00
Simon Michael
e21afc466a bal/bs/bse: -H or --cumulative now disables -T (#329)
To reduce confusion, multiperiod balance reports using -H/--historical
or --cumulative, which show end balances, no longer show a Totals
column since summing end balances generally doesn't make sense.
Also the underlying MultiBalanceReport now returns zero for those
totals when in cumulative or historical mode.
2019-05-11 20:43:28 -07:00
Simon Michael
76342a3fd0 bal/bs/cf/is: mention valuation type in report title 2019-05-09 15:39:43 -07:00
Simon Michael
e5339218f7 lib: valueTypeFromOpts helper 2019-05-09 15:36:26 -07:00
Simon Michael
d15869f855 ;doc: typo
[ci skip]
2019-05-09 12:22:48 -07:00
Simon Michael
d77fd5743d bal/bs/cf/is: support --value-at with -H; fix row/col/grand totals
This also includes a big cleanup of multiBalanceReport, which got
accidentally mingled.
2019-05-09 07:58:45 -07:00
Simon Michael
2ffe7914be ;improve valuation code docs 2019-05-07 16:19:49 -07:00
Simon Michael
72214a5747 reg: fix --value-at=transaction with -M (#329) 2019-05-06 08:07:16 -07:00
Simon Michael
ad00da244b reg: support --value-at with -H (#329) 2019-05-05 17:47:38 -07:00
Simon Michael
2ba0281335 bal: fix --value-at for old-style single period balance reports (#329) 2019-05-05 10:51:07 -07:00
Simon Michael
629b590de1 ;lib: cleanup 2019-05-05 10:38:13 -07:00
Simon Michael
1ad82d5b77 ;lib: balanceReport cleanup 2019-05-05 09:57:03 -07:00
Simon Michael
f4b0381043 ;lib: more docs for balanceReport 2019-05-05 09:50:29 -07:00
Simon Michael
8d7eacd73f bal: support --value-at=p/t with multiperiod reports (#329) 2019-05-05 09:30:01 -07:00
Simon Michael
74c381cc88 ;lib: more docs for multiBalanceReport 2019-05-04 17:46:52 -07:00
Simon Michael
66b1599058 ;lib: postingsReport cleanup 2019-05-04 17:09:16 -07:00
Simon Michael
cc05f48697 ;lib: multiBalanceReport cleanup 2019-05-04 12:34:59 -07:00
Simon Michael
12c0bfb39b ;lib: brValue cleanup 2019-05-04 12:22:00 -07:00
Simon Michael
ec1b98434c reg: support --value-at=period with periodic reports (#329) 2019-05-04 12:22:00 -07:00
Simon Michael
dd8c403c81 ;cli: option help tweaks 2019-05-04 12:22:00 -07:00
Simon Michael
ebf5ed93f2 valuation: more thorough --value-at; document status (#329, #999)
This feature turns out to be quite involved, as valuation interacts
with the many report variations. Various bugs/specs have been
fixed/clarified relating to register's running total, balance totals
etc. Eg register's total should now be the sum of the posting amount
values, not the values of the original sums. Current level of support
has been documented.

When valuing at transaction date, we once again do early valuation of
all posting amounts, to get more correct results. variants. This means
--value-at=t can be slower than other valuation modes when there are
many transactions and many prices. This could be revisited for
optimisation when things are more settled.
2019-05-03 12:24:02 -07:00
Simon Michael
696e3098c8 reg: support --value-at in register reports; cleanups, tests 2019-04-26 12:08:46 -07:00
Simon Michael
7306e61646 bal: support --value-at in single column balance reports 2019-04-26 12:08:32 -07:00
Simon Michael
00975fb226 bal*: support --value-at in multicolumn balance reports 2019-04-26 12:08:31 -07:00
Simon Michael
65934958f9 rename --value-date -> --value-at; --value-at implies -V 2019-04-26 12:08:31 -07:00
Simon Michael
9adae02973 print: add --value-date general option; implement for print -V 2019-04-26 12:08:31 -07:00
Simon Michael
9d3eb8c069 bal, reg, print: -V prefers non-future valuation dates again (#999) 2019-04-24 08:31:21 -07:00
Simon Michael
ef9c4a29c4 lib: save the current date in ReportOpts
We need this for choosing a valuation date, otherwise, report
functions would have to be in IO or we'd have to pass in yet another
argument.

It's optional because it's useful to be able to create report opts
purely (I think ?) This is not ideal but maybe not a problem.
2019-04-24 08:25:55 -07:00
Simon Michael
c23fc8b671 speed up -V/--value by converting reports, not the journal (#999)
Instead of converting all journal amounts to value early on, we now
convert just the report amounts to value, before rendering.

This was basically how it originally worked (for the balance command),
but now it's built in to the four basic reports used by print,
register, balance and their variants - Entries, Postings, Balance,
MultiBalance - each of which now has its own xxValue helper.

This should mostly fix -V's performance when there are many
transactions and prices (the price lookups could still be optimised),
and allow more flexibility for report-specific value calculations.

+------------------------------------------++-----------------+-------------------+--------------------------+
|                                          || hledger.999.pre | hledger.999.1sort | hledger.999.after-report |
+==========================================++=================+===================+==========================+
| -f examples/1000x1000x10.journal bal -V  ||            1.08 |              0.96 |                     0.76 |
| -f examples/2000x1000x10.journal bal -V  ||            1.65 |              1.05 |                     0.73 |
| -f examples/3000x1000x10.journal bal -V  ||            2.43 |              1.58 |                     0.84 |
| -f examples/4000x1000x10.journal bal -V  ||            4.39 |              1.96 |                     0.93 |
| -f examples/5000x1000x10.journal bal -V  ||            7.75 |              2.99 |                     1.07 |
| -f examples/6000x1000x10.journal bal -V  ||           11.21 |              3.72 |                     1.16 |
| -f examples/7000x1000x10.journal bal -V  ||           16.91 |              4.72 |                     1.19 |
| -f examples/8000x1000x10.journal bal -V  ||           27.10 |              9.83 |                     1.40 |
| -f examples/9000x1000x10.journal bal -V  ||           39.73 |             15.00 |                     1.51 |
| -f examples/10000x1000x10.journal bal -V ||           50.72 |             25.61 |                     2.15 |
+------------------------------------------++-----------------+-------------------+--------------------------+

There's one new limitation, not yet resolved: -V once again can pick a
valuation date in the future, if no report end date is specified and
the journal has future-dated transactions. We prefer to avoid that,
but reports currently are pure and don't have access to today's date.
2019-04-23 17:39:01 -07:00
Jakob Schöttl
4444b8bc8f Change unused argument to undefined to make possible bugs more obvious 2019-04-18 22:38:41 +02:00
Jakob Schöttl
593ee39284 Fix behavior of options like -Mp2019
This fixes the issue #1008
2019-04-18 22:38:41 +02:00
Simon Michael
13dc1096a5 reg: test and fix for --average, broken since 1.12 (#1003) 2019-04-06 11:00:38 -07:00
Simon Michael
0bc16d4af6 lib, cli, web: rename porigin -> poriginal 2019-02-20 20:23:54 -08:00
Jakob Schöttl
161ca660dc Support register --invert option to negate amounts 2019-02-09 15:55:41 -08:00
Dmitry Astapov
f2aaaf3310 lib, cli: merge --show-unbudgeted into --empty 2019-01-25 12:53:09 -08:00
Dmitry Astapov
5711cdf9ba cli: added --transpose to "balance" command 2019-01-24 15:06:35 -08:00
Dmitry Astapov
f3366c7256 lib: fix behavior of nested budgets and --show-unbudgeted 2019-01-24 14:56:22 -08:00
Dmitry Astapov
92e7370f1f lib: fix alignment in budget report 2019-01-24 14:56:22 -08:00
Simon Michael
6f36702141 lib: rename, reposition tprecedingcomment field 2019-01-05 07:35:54 +00:00
Simon Michael
5908414d77 lib: amultiplier -> aismultiplier 2019-01-05 07:35:54 +00:00
Simon Michael
b053942e9b lib: flip the arguments of (divide|multiply)[Mixed]Amount (api change)
Also, start using a mapMixedAmount helper.
2018-11-13 17:28:24 -08:00
Simon Michael
74611a7be1 ui: accounts: fix balances when there's only periodic txns
And clarify multiBalanceReport.
2018-10-18 14:43:00 -07:00
Simon Michael
4a399e50cb acc: don't require an explicit --flat to make --drop work 2018-10-13 13:22:11 -07:00
Alex Chen
3d2584d869 lib: switch to megaparsec 7 2018-09-30 20:15:12 -06:00
Simon Michael
855bd54d19 budget: declaration and (actual) amount sorting for bal --budget
Account declaration-aware sorting is the default throughout hledger now.
2018-09-24 08:31:19 -10: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
8d3cddc907 drop another old csv import 2018-09-07 12:51:10 -07:00
Simon Michael
91b111b60d rename easytests_* to tests_* 2018-09-06 13:13:26 -07:00
Simon Michael
4003264129 lib: drop HUnit helpers, rename expectEqPP 2018-09-04 13:52:36 -07:00
Simon Michael
09d9fbf487 tests: Reports -> easytest 2018-09-04 12:23:07 -07:00
Simon Michael
241d0dbebd tests: ReportOptions -> easytest 2018-09-04 11:54:40 -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
4d578c008f typo 2018-08-18 13:40:01 +01:00
Simon Michael
1e0a7ec8f1 remove some unneeded CPP pragmas 2018-08-02 08:25:49 +01:00
Simon Michael
9d2e80aa2c lib: Debug: simplify pprint, export ppShow as pshow (api change) 2018-07-16 12:51:50 +01:00
Simon Michael
816ba0f89d consistent comment wording 2018-06-18 17:54:25 -07:00
Simon Michael
061aad0431 remove some CPP that's obsolete since we require base 4.8+ 2018-06-04 17:33:21 -07:00
Simon Michael
1c6702d598 budget: note some todos
[ci skip]
2018-05-17 08:12:14 -07:00
Simon Michael
cfee04215f bal: always ignore --drop when not in flat mode (fix #754) 2018-05-05 16:12:27 -07:00
Simon Michael
9151f5004e budget: show a budget report even with no interval (for whole journal period) 2018-04-24 23:12:42 -07:00
Simon Michael
568a442307 budget: tweak hiding/grouping of unbudgeted accounts
It now works slightly differently. Eg:

- <unbudgeted>'s subaccounts are hidden by default
- --show-unbudgeted shows all unbudgeted accounts, including subaccounts of budgeted parents
- --show-unbudgeted doesn't affect the grouping under <unbudgeted>

IMHO it's a nice simplification and increase in consistency, while still meeting the original intent.
2018-04-24 13:42:12 -07:00
Simon Michael
8b650d8e4f budget: fix inconsistent hiding of unbudgeted accounts
Accounts which have no budget goals within the report period are now
grouped under <unbudgeted> - not just accounts with no budget goals ever.

Haddocks have been clarified, especially for budgetRollup. In some
ways things are much clearer without this feature, but it remains
enabled by default for now.
2018-04-23 18:52:28 -07:00
Simon Michael
8759f12b63 budget: more consistent display of percentage 2018-04-23 18:52:28 -07:00
Simon Michael
0c140d7238 budget: allow multi-interval budgets again
Budgets were restricted to a single interval in 1.9, but this was
a mistake. This restores the 1.5 behaviour, where a budget can be built
up from multiple periodic transactions with different intervals.
2018-04-23 18:52:28 -07:00
Simon Michael
e2c55aafa9 budget: --drop preserves the <unbudgeted> top-level account 2018-04-23 18:52:28 -07:00
Simon Michael
43287a3e26 budget: use a new first-class BudgetReport for --budget 2018-04-23 18:52:28 -07:00
Simon Michael
4b3c6afe75 lib: new generic PeriodicReport, and some report-related type aliases 2018-04-23 18:52:28 -07:00
Dmitry Astapov
f6ec26e321 lib, app, web, ui: rename readJournalFile[s]WithOpts to readJournalFile, same for tryReader[s]WithOpts 2018-04-17 15:25:02 -07:00
Dmitry Astapov
ecf49b1e4b lib: auto postings generated before amount inference and balance checks (#729) 2018-04-17 14:33:32 -07:00
Simon Michael
2b34ff1184 lib: reportSpan debug output 2018-03-30 02:41:03 +01:00
Simon Michael
ebaac2866b lib: fix reportStartEndDates, rename to reportSpan 2018-03-30 00:16:35 +01:00
Simon Michael
083d9190fd budget: only periodic txns with the selected interval are used 2018-03-29 15:51:52 +01:00
Simon Michael
d3fde29b36 bal: --invert flag to flip all signs 2018-01-29 14:53:23 -08:00
Simon Michael
9b88fc2ed0 bal/bs/cf/is: sort accounts by account code, if any, then account name
If any accounts have numeric codes assigned via account directives,
those accounts will be listed first, lowest account codes first.
2018-01-23 11:33:24 -08:00
Simon Michael
88ef586480 lib: rename, clarify purpose of balanceReportFromMultiBalanceReport 2018-01-23 11:32:24 -08:00
Simon Michael
6b349e3123 bs/bse/cf/is: show all balances as normally-positive (experimental)
Income, liability and equity balances, which until now we have
always displayed as negative numbers, are now shown as normally positive
by these reports.
Negative numbers now indicate a contra-balance (eg an overdrawn
checking account), a net loss, a negative net worth, etc.
This makes these reports more like conventional financial statements,
and easier to read and share with normal people.
2018-01-18 11:01:07 -08:00
Simon Michael
79812f974a rename NormalBalance -> NormalSign 2018-01-15 14:12:38 -08:00
Simon Michael
8f55b6137d uses today's prices, not those of last txn date, for -V (fix #683,#648) 2017-12-29 21:42:59 -08:00
Simon Michael
69e255cead lib: deduplicate, refactor valuation code 2017-12-29 16:52:08 -08:00
Dmitry Astapov
23f3da4e92 cli: --auto adds automated postings to reports
Ledger-style automated postings, previously supported only by
hledger-budget, have landed as a first-class feature.  The --auto
flag activates them, so that any postings they generate are
included in reports.
2017-11-26 14:57:41 +00:00
Dmitry Astapov
f101d5b515 cli: --forecast adds periodic transactions to reports
Ledger-style periodic transactions, previously supported only by
hledger-budget, have landed as a first-class feature.  The --forecast
flag activates them, so that any transactions they generate are
included in reports.
2017-11-26 14:57:41 +00:00
Simon Michael
b5602fd771 bal: --sort-amount sorts tree-mode multi-column balance reports 2017-09-29 18:49:47 -10:00
Simon Michael
d527384261 bal: --sort-amount sorts tree-mode single-column balance reports too 2017-09-28 09:49:03 -10:00
Simon Michael
cd998e7f2f slight fix for --sort-amount, don't flip when normal balance unspecified 2017-09-25 19:10:21 -10:00
Simon Michael
d9d92b3bf1 bs/bse/is: --sort-amount puts large liabilities/equities/incomes at top
Compound balance commands like these can now be aware of normal account
balance sign, and sort negative balances accordingly.

This also adds utility-ht as a dependency, only for the uncurry function
right now but it looks potentially useful to have.
2017-09-25 19:06:38 -10:00
Simon Michael
35e2e94228 bal/bs/cf/is: --sort-amount sorts by amount instead of account name 2017-09-25 06:17:46 -10:00
Simon Michael
e3c4a76119 add & use simpler readJournalFilesWithOpts/InputOpts api 2017-09-14 17:43:32 -07:00
Simon Michael
55cebad0d5 cli: refactor: move commands to a subdirectory, reinstate test command 2017-09-12 10:04:36 -07:00
Simon Michael
8851ebc29f bs/cf/is: support --output-file and --output-format=txt|csv
The CSV output should be reasonably ok for dragging into
a spreadsheet and reformatting.
2017-07-25 19:43:45 -07:00
Nicholas Niro
93fbc0e989 lib: Fix of a bug with the -H option.
This patch fixes a bug that happened when using the -H option on
a period without any transaction. Previously, the behavior was no
output at all even though it should have shown the previous ending balances
of past transactions. (This is similar to previously using -H with -E,
but with the extra advantage of not showing empty accounts)
2017-07-15 08:02:03 +01:00
Nicholas Niro
f0914ff08e lib: Added a new much more thorough test to MultiBalanceReports.
This test makes sure that -H works correctly and it does not show
empty accounts.
2017-07-15 08:02:03 +01:00
Nicholas Niro
9873bcfcba lib: Added a new transaction to samplejournal.
The new entry effectively adds a loan which is placed in the checking account.
This loan is then closed by the "pay off" transaction (which was already
present).

This is mainly to be used as a test point for the -H option; to make
sure -H does not show empty accounts.

All previous tests were changed to reflect the new change.
The documentation of the journal module was updated too.
2017-07-15 08:02:03 +01:00
Nicholas Niro
a7f6b551c5 lib: Implemented a testing context for the module MultiBalanceReports.
Of the 2 tests, the first is a simple test on a specific period.
The second is expected to fail at this point until the new upcoming
code to fix the issue with the history option is implemented.

For the record : this issue happens when we use the -H flag for a period
that does not contain any transactions. Currently, the ending balance
values are only taken into account if the current period contains
a Transaction containing one of the previous populated accounts.

For example, if we have a statement on the 2008/01/01 for $1
and we do a command (with -H) to check the value on the
(without transactions) 2008/01/02, we will not get the $1 from
2008/01/01. In that same example, if we had a transaction for the same
account as 2008/01/01 in say 2008/01/03 then the -H command would
successfully show the statement from 2008/01/03 with the initial amount
that we set in 2008/01/01.
2017-07-15 08:02:03 +01:00
Nicholas Niro
fe2a1b35da lib: Added 2 new tests to BalanceReport.
These tests verify the behavior when we input a very specific period.
The second test is meant to make sure that the new upcoming code in
MultiBalanceReports will not change anything in the behavior of
the module BalanceReport.
2017-07-15 08:02:03 +01:00
Nicholas Niro
a204908be6 lib: Added a comment to explain the type MultiBalanceReportTotals 2017-07-15 08:02:03 +01:00
Simon Michael
59af88b796 ui: add temporary --status-toggles for testing toggle styles (#564) 2017-06-18 16:20:30 -07:00
Simon Michael
22e751983b ui: allow multiple status filters to be active at once (#564) 2017-06-15 19:16:39 -07:00
Simon Michael
dcc58d4a2b lib: rename ClearedStatus type to Status
(and fix hard-coded enum count)
2017-06-15 19:16:39 -07:00
Simon Michael
430c49154a lib: rename Query's Status constructor to StatusQ 2017-06-15 19:16:39 -07:00
Simon Michael
e119941648 rename "uncleared" status to "unmarked" and --uncleared to --unmarked (#564)
See the issue and linked mail list discussion. Ambiguity between the
uncleared state, and the "not cleared" --uncleared flag causes confusion
and friction. At this point it seems best to break with Ledger and
past hledger, pick a new name and drop --uncleared to put an end to it.
2017-06-15 19:16:39 -07:00
Simon Michael
7fc921db86 lib, cli: -U/-P/-C flags can be combined (#564) 2017-06-15 19:16:39 -07:00
Simon Michael
10d85bedec bal: show negative amounts in red
The balance command now shows negative amounts in red, when it thinks
ANSI codes are supported, ie when TERM is not "dumb" and stdout is not
being redirected or piped somewhere.
2017-04-25 18:34:09 -07:00
Simon Michael
646cdf34e2 lib: mark todo for multicolumn balance/bs (#518) 2017-03-31 16:55:04 -07:00
Moritz Kiefer
f4b3f1c094 Add an option to use unicode in balance tables (#528)
* Add an option to use unicode in balance tables

fixes #522

* Add a test for unicode tables

* Document --pretty-tables

* Support --pretty-tables in BalanceView
2017-03-29 11:12:01 -07:00
Simon Michael
b402fc7e7d lib: optserror -> usageError, consolidate with other error functions (#529) 2017-03-29 08:00:51 -07:00
Justin Le
f47df67167 mapping function over journal amounts 2017-02-04 16:38:18 -08:00
Hans-Peter Deifel
dfbb683573 Prettify option parsing errors (#478)
Megaparsec's show instance for ParseError doesn't produce digestible
strings. parseErrorPretty has to be used instead.
2017-01-13 13:10:11 -08:00
Simon Michael
a1555ce964 Revert "Adding "--value"/"-V" option for balancesheet/incomestatement/cashflow and register (#361)"
This reverts commit b935cd2243.
2016-12-31 07:54:47 -08:00
Justin Le
b935cd2243 Adding "--value"/"-V" option for balancesheet/incomestatement/cashflow and register (#361)
* Added --value options for specialized balance ouputs balancesheet, incomestatement, cashflow

* --value option for 'register' command
lib: postingsValue to convert posting amounts to market value
2016-12-31 07:48:17 -08:00
Simon Michael
2b05970781 lib: report end date fix #403 #453 2016-12-30 14:36:27 -08:00
Simon Michael
66fcd0d4b2 lib: show report end date in debug output #403 #453 2016-12-30 14:36:15 -08:00
Simon Michael
1866d2375d bal: with same-date market prices, use the last parsed not the highest price #403 #453 2016-12-30 11:46:13 -08:00
Simon Michael
7dcfcb05ec lib: get effective report start/end dates 2016-12-30 11:46:13 -08:00
Simon Michael
ce8046bdb4 lib: add some debug output for market prices (#453) 2016-12-30 11:15:03 -08:00
Johannes Gerer
45401e538e Balance Assignments and accounts resetting (#438)
* Changed behavior of `readJournalFiles` to be identical to `readJournalFile` for singleton lists

* Balance Assertions have to be simple Amounts

* Add 'isAssignment' and 'assignmentPostings' to Hledger.Data.Posting and Transaction

* Implemented 'balanceTransactionUpdate', a more general version of 'balanceTransaction' that takes an update function

* Fixed test cases.

* Implemented balance assignment ("resetting a balance")

* Add assertions to show function

* updated the comments

* numbering is not needed in journalCheckBalanceAssertions

* remove prices before balance checks

* rename functions
2016-12-10 07:04:48 -08:00
Simon Michael
8c7e7c02c3 ui, lib: another historical balance fix for accountTransactionsReport 2016-09-06 08:43:25 -07:00
Simon Michael
b262be7838 ui: fix wrong register start balance in historical mode
90c0d40 a few weeks ago miscalculated the starting balance
in accountTransactionsReport. Possibly also affects
-web and -api.
2016-09-05 14:45:02 -07:00
Simon Michael
f3bcf570e5 lib: simplify account txns report running total
The account transactions report used for hledger-ui and -web registers
now gives either the "period total" or "historical total", depending
strictly on the --historical flag. It doesn't try to tell the user
whether the historical total is the accurate historical balance (which
depends on the report query).
2016-08-12 17:26:34 -07:00
Simon Michael
69ebc3b159 bal, reg, stats: clarify report modes, output, options
- try to clarify naming and meaning of balance/register report modes
  and kinds of "balance" displayed. Added balance --change and
  register --cumulative flags to clarify report modes.

- with multiple --change/--cumulative/--historical flags use the last
  instead of complaining

- register -A is now affected by -H

- options cleanups
2016-08-12 09:44:31 -07:00
Simon Michael
bc72aad6f0 lib: remove comment breaking doctests 2016-08-09 07:58:19 -07:00
Simon Michael
39c5eb9801 balance: make -H work with single-column reports #392
-H/--historical now makes a single-column balance report with a start
date show historical balances reflecting earlier postings.  This is
equivalent to specifying no start date, but it's more consistent.
2016-08-08 17:40:41 -07:00
Simon Michael
156922e419 lib: more history awareness for account transactions report #392
The account transactions report (and eg hledger-ui's register screen) no
longer aborts showing historical balances when -E/--empty/nonzero mode
or cur: are in effect.
2016-08-08 17:25:42 -07:00
Simon Michael
974b1e3be0 lib: simplify balance report types; haddocks 2016-08-08 17:23:21 -07:00
Simon Michael
67a76b297a hlint-clean BalanceReport, MultiBalanceReport 2016-08-08 08:31:01 -07:00
Simon Michael
b991103bcc BalanceHistoryReport is not used 2016-08-08 07:11:16 -07:00
Simon Michael
02845ccf3d whitespace clarifying this large module's structure, comments 2016-08-08 07:10:36 -07:00
Simon Michael
009fe6d09f Revert "add: suggest only one commodity at a time as default amount #383"
Overcommitted.

This reverts commit 92b97e7bd3.
2016-08-06 19:59:18 -07:00
Simon Michael
92b97e7bd3 add: suggest only one commodity at a time as default amount #383
Since we currently can't accept more than one commodity as input.
2016-08-04 11:55:46 -07:00
Simon Michael
985ca50814 doc: expand period expressions, rename "report interval" 2016-08-02 12:51:18 -07:00
Simon Michael
fe6d4cc7da lib: abstract period/interval/cleared in ReportOpts 2016-07-29 19:20:56 -07:00
Simon Michael
b7071dee84 lib: use Data.Default directly, not via cmdargs 2016-07-29 10:15:48 -07:00
Moritz Kiefer
4141067428 Replace Parsec with Megaparsec (see #289) (#366)
* Replace Parsec with Megaparsec (see #289)

This builds upon PR #289 by @rasendubi

* Revert renaming of parseWithState to parseWithCtx

* Fix doctests

* Update for Megaparsec 5

* Specialize parser to improve performance

* Pretty print errors

* Swap StateT and ParsecT

This is necessary to get the correct backtracking behavior, i.e. discard
state changes if the parsing fails.
2016-07-29 08:57:10 -07:00
Simon Michael
90c0d40777 lib, ui, web: more careful dates in account transactions report/registers
Clarify the account transactions report, and don't change original transactions' dates.

Show a more accurate date in hledger-ui and hledger-web's account registers
when postings have their own dates. This is now called the "transaction register date":
the date which is displayed for that transaction in a register for some current account
and filter query. It is either the transaction date from the journal ("transaction general date"),
or if postings to the current account and matched by the register's filter query have
their own dates, the earliest of those dates.
2016-07-27 12:12:42 -07:00
Simon Michael
74d8570da3 lib: note that depth does not affect transactions reports 2016-06-12 07:40:40 -07:00
Simon Michael
98cbcced57 lib: account transactions report filters by realness & status
Two fixes for this report when --real/--cleared/real:/status: are in effect,
affecting hledger-ui and possibly hledger-web:

1. exclude transactions which affect the current account via an excluded posting type.
    Eg when --real is in effect, a transaction posting to the current account with only
    virtual postings will not appear in the report.

2. when showing historical balances, don't count excluded posting types in the
    starting balance. Eg with --real, the starting balance will be the sum of only the
    non-virtual prior postings.

This is complicated and there might be some ways to confuse it still, causing
wrongly included/excluded transactions or wrong historical balances/running totals
(transactions with both real and virtual postings to the current account, perhaps ?)
2016-06-03 17:51:10 -07:00
Simon Michael
7c8d7e9820 ui: transaction: ignore real/cleared/empty, always show full txn (#354)
This commit clarifies the account transactions report: as before the included transactions
are the original unfiltered transactions, but now the change and running balance amounts
are calculated from the report-matched postings. This fixed the limitation noted in 509f558,
so that toggling real mode in any screen could work. Then I decided the transaction screen
shouldn't show a partial transaction after all, so real/cleared filtering is no longer allowed or indicated here.
2016-06-02 07:03:00 -07:00
Simon Michael
509f55864d ui: indicate real mode and toggle it with R key (#354)
There is a limitation/bug: disabling real mode in the transaction screen
won't show the non-real postings if it was entered from a real-mode
register screen.
2016-06-01 12:30:39 -07:00
Simon Michael
788021f5a4 ui: make --real/-R affect register/txn screens (#354) 2016-06-01 10:48:57 -07:00
Simon Michael
90c9735b7a lib: textification: descriptions & codes
Slightly higher (with small files) and lower (with large files) maximum
residency, and slightly quicker for all.

hledger -f data/100x100x10.journal stats
<<ghc: 42858472 bytes, 84 GCs, 193712/269608 avg/max bytes residency (3 samples), 2M in use, 0.000 INIT (0.015 elapsed), 0.016 MUT (0.042 elapsed), 0.011 GC (0.119 elapsed) :ghc>>
<<ghc: 42891776 bytes, 84 GCs, 190816/260920 avg/max bytes residency (3 samples), 2M in use, 0.000 INIT (0.004 elapsed), 0.017 MUT (0.025 elapsed), 0.010 GC (0.015 elapsed) :ghc>>

hledger -f data/1000x1000x10.journal stats
<<ghc: 349575240 bytes, 681 GCs, 1396425/4091680 avg/max bytes residency (7 samples), 11M in use, 0.000 INIT (0.000 elapsed), 0.137 MUT (0.146 elapsed), 0.050 GC (0.057 elapsed) :ghc>>
<<ghc: 349927568 bytes, 681 GCs, 1397825/4097248 avg/max bytes residency (7 samples), 11M in use, 0.000 INIT (0.000 elapsed), 0.126 MUT (0.133 elapsed), 0.050 GC (0.057 elapsed) :ghc>>

hledger -f data/10000x1000x10.journal stats
<<ghc: 3424029496 bytes, 6658 GCs, 11403141/41077288 avg/max bytes residency (11 samples), 111M in use, 0.000 INIT (0.000 elapsed), 1.278 MUT (1.310 elapsed), 0.493 GC (0.546 elapsed) :ghc>>
<<ghc: 3427418064 bytes, 6665 GCs, 11127869/37790168 avg/max bytes residency (11 samples), 109M in use, 0.000 INIT (0.001 elapsed), 1.212 MUT (1.229 elapsed), 0.466 GC (0.519 elapsed) :ghc>>

hledger -f data/100000x1000x10.journal stats
<<ghc: 34306546248 bytes, 66727 GCs, 77030638/414617944 avg/max bytes residency (14 samples), 1012M in use, 0.000 INIT (0.000 elapsed), 12.965 MUT (13.164 elapsed), 4.771 GC (5.447 elapsed) :ghc>>
<<ghc: 34340246056 bytes, 66779 GCs, 76983178/416011480 avg/max bytes residency (14 samples), 1011M in use, 0.000 INIT (0.008 elapsed), 12.666 MUT (12.836 elapsed), 4.595 GC (5.175 elapsed) :ghc>>
2016-05-24 19:00:58 -07:00
Simon Michael
2538d14ea7 lib: textification begins! account names
The first of several conversions from String to (strict) Text, hopefully
reducing space and time usage.

This one shows a small improvement, with GHC 7.10.3 and text-1.2.2.1:

hledger -f data/100x100x10.journal stats
string: <<ghc: 39471064 bytes, 77 GCs, 198421/275048 avg/max bytes residency (3 samples), 2M in use, 0.000 INIT (0.001 elapsed), 0.015 MUT (0.020 elapsed), 0.010 GC (0.014 elapsed) :ghc>>
text:   <<ghc: 39268024 bytes, 77 GCs, 197018/270840 avg/max bytes residency (3 samples), 2M in use, 0.000 INIT (0.002 elapsed), 0.016 MUT (0.022 elapsed), 0.009 GC (0.011 elapsed) :ghc>>

hledger -f data/1000x100x10.journal stats
string: <<ghc: 318555920 bytes, 617 GCs, 2178997/7134472 avg/max bytes residency (7 samples), 16M in use, 0.000 INIT (0.001 elapsed), 0.129 MUT (0.136 elapsed), 0.067 GC (0.077 elapsed) :ghc>>
text:   <<ghc: 314248496 bytes, 612 GCs, 2074045/6617960 avg/max bytes residency (7 samples), 16M in use, 0.000 INIT (0.003 elapsed), 0.137 MUT (0.145 elapsed), 0.067 GC (0.079 elapsed) :ghc>>

hledger -f data/10000x100x10.journal stats
string: <<ghc: 3114763608 bytes, 6026 GCs, 18858950/75552024 avg/max bytes residency (11 samples), 201M in use, 0.000 INIT (0.000 elapsed), 1.331 MUT (1.372 elapsed), 0.699 GC (0.812 elapsed) :ghc>>
text:   <<ghc: 3071468920 bytes, 5968 GCs, 14120344/62951360 avg/max bytes residency (9 samples), 124M in use, 0.000 INIT (0.003 elapsed), 1.272 MUT (1.349 elapsed), 0.513 GC (0.578 elapsed) :ghc>>

hledger -f data/100000x100x10.journal stats
string: <<ghc: 31186579432 bytes, 60278 GCs, 135332581/740228992 avg/max bytes residency (13 samples), 1697M in use, 0.000 INIT (0.008 elapsed), 14.677 MUT (15.508 elapsed), 7.081 GC (8.074 elapsed) :ghc>>
text:   <<ghc: 30753427672 bytes, 59763 GCs, 117595958/666457240 avg/max bytes residency (14 samples), 1588M in use, 0.000 INIT (0.008 elapsed), 13.713 MUT (13.966 elapsed), 6.220 GC (7.108 elapsed) :ghc>>
2016-05-24 19:00:49 -07:00
Simon Michael
207922a023 lib: Commodity now has a CommoditySymbol and style 2016-05-08 08:07:27 -07:00
Simon Michael
ce344f9b96 lib: fix a haddock error 2016-05-06 18:16:12 -07:00
Simon Michael
c9a892eabe lib: remove hopefully superfluous comment 2016-05-06 17:40:33 -07:00
Simon Michael
884c0b8a58 reg: fix sorting regression with --date2 (#326)
And rewrite/clarify postingsReport.
2016-05-06 17:19:43 -07: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
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
821f1b7120 lib: fix tests for zero amount style (#230, #276) 2015-09-02 16:38:45 -07:00
Simon Michael
92038b7d72 web: fix options breakage, add test code to tags 2015-08-28 15:23:49 -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
19c3749b50 balance: move -V helpers to the *Report modules 2015-08-26 10:38:45 -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
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
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
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
70d87613f2 some cleanup of debug trace helpers 2015-05-14 13:01:49 -07: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
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
77c2c90290 cli: parse date2: correctly (#222) 2014-12-24 14:54:56 -08:00
Simon Michael
855d4e1131 balance: with --tree and --flat, use the last (fix #219) 2014-12-05 12:56:33 -08:00
Simon Michael
7f6cf1f849 balance, register, register-csv: depth 0 shows summary items (#206)
Previously, a depth:0 query produced an empty report (since there are no
level zero accounts). Now, it aggregates all data into one summary item
with account name "...".

This makes it easier to see the kind of data Gwern was looking for from
register-csv (net worth over time). Eg this shows one line per month
summarising the total of assets and liabilities:

hledger register-csv -- -MHE ^assets ^liabilities depth:0

Single and multi-column balance reports behave similarly.
2014-10-19 17:53:20 -07:00
Simon Michael
2b39f68682 fix a warning in TransactionsReports 2014-10-18 10:32:01 -07:00
gwern
d1618aaca8 strip trailing whitespace from all Haskell files 2014-10-14 18:48:24 -07:00
Simon Michael
aa85e786b9 register: describe datespans briefly, like balance
Eg instead of 2014/01/01 - 2014/01/31, show 2014/01, as in a multicolumn
balance report. The data model is not very elegant, but works for now.
2014-08-08 07:34:11 -07:00
Simon Michael
f631e8e063 register: --average implies --empty
The -A flag now enables -E, so that with a report interval the averages
are always per-period and not per-report-line. (Without a report
interval, -E is already the default).
2014-08-07 14:03:56 -07:00
Julien Moutinho
a6190420b2 data: add source location to transactions 2014-08-07 16:38:44 +02:00
Simon Michael
40ab1e17f6 amounts cleanups, and support zeros with commodity 2014-07-28 18:45:13 -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
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
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
b22cb66319 refactor amount filtering helpers 2014-05-23 13:10:36 -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
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
eeb48c86d1 default report dates come from secondary dates with --date2 2014-04-24 14:44:30 -07:00
Simon Michael
c9d60fab73 balance, register: fix --date2 with report intervals 2014-04-19 15:54:58 -07:00
Simon Michael
4ef33c012a register: report intervals now include all postings in the interval
As with balance. For example, register -p 'weekly in jan' generates
these intervals: 2013/12/30-2014/01/05, 2014/01/06-2014/01/12,
2014/01/13-2014/01/19, 2014/01/20-2014/01/26, 2014/01/27-2014/02/02.
With this change, postings on 2013/12/30-31 and 2014/2/1-2 will be
included in the report, so all period totals are complete and
comparable.
2014-04-19 11:47:05 -07:00
Simon Michael
d0461c3ef7 cleanup 2014-04-19 11:26:01 -07:00
Simon Michael
3dd0894349 fix a warning 2014-04-19 11:25:45 -07:00
Simon Michael
6743f8c2a1 balance: multicolumn now includes all postings in the displayed periods 2014-04-19 08:45:46 -07:00
Simon Michael
1fca3e7472 orDatesFrom -> spanDefaultsFrom 2014-04-19 08:38:03 -07:00
Simon Michael
dd1f58b785 balance: oops, note multicolumn reports not yet using all period data
87e2d49 seems to work only in GHCI, gives <<loop>> when compiled.
2014-04-15 17:19:55 -07:00
Simon Michael
87e2d49714 balance: multicolumn reports now use all data in the displayed periods
Previously, the first period's heading would show the start date of a
full period, but postings after this date but before the user-specified
report start date were not shown. Now those postings will be included,
making the first column's numbers more correct. Similarly, the report
end date is now adjusted to the displayed end date on the last column.
2014-04-14 13:10:34 -07:00
Simon Michael
d008c810dc balance: restore prefix on debug output from multibalance reports 2014-04-14 12:08:06 -07:00
Simon Michael
5885914547 refactor & use reportSpans 2014-04-14 08:31:57 -07:00
Simon Michael
a761ae5b86 balance: support --date2 in multicolumn reports (cf #174) 2014-04-13 15:14:07 -07:00
Simon Michael
424db9a09e register: support --date2 with a report interval (fixes #174) 2014-04-13 14:57:40 -07:00
Simon Michael
2af04ec2fc balance: merge/improve multicol report implementations
Periodic, cumulative and historical multicolumn balance reports are now
generated by one code path, which helps with consistency and reducing
the bug/test surface. --tree now also works with --cumulative or
--historical.
2014-04-13 12:49:05 -07:00
Simon Michael
7d99ae5033 balance: --tree makes multicolumn reports show hierarchy
Multicolumn balance reports can now be switched to a hierarchical view
with --tree. This is similar to the single column balance report with
--no-elide, ie we do not elide boring parents into the following line.

The --flat and --tree flags are opposites; the last one to appear on
the command line is decisive (in future, if not already).
2014-04-06 21:56:47 -07:00
Simon Michael
125a72f874 avoid a haddock crash 2014-04-04 09:09:00 -07:00
Simon Michael
6a928a03a8 overhaul single- and multi-column balance reports
Changes include:

- flat mode now shows exclusive (subaccount-excluding) balances.
  This is a deviation from ledger, but seems simpler and clearer
  for users and implementors across the various modes.

- in flat mode, --depth now aggregates deeper accounts at the
  depth limit, rather than just excluding them from the report.
  This is more useful.

- in flat mode, --empty no longer shows parent accounts with
  no postings.

- more tests, more debug output, clearer code
2014-04-03 18:49:57 -07:00
Simon Michael
2844333857 less debug output from some low-level functions 2014-04-03 18:49:57 -07:00
Simon Michael
b69e6c6946 unused extensions 2014-03-28 16:23:40 -07:00
Simon Michael
882a9dbf1c cli, report & raw options cleanups 2014-03-25 19:03:56 -07:00
Simon Michael
25a8aa2970 fix hunit compilation warnings 2014-03-21 17:41:54 -07:00
Simon Michael
77d24fc241 split up Hledger.Reports 2014-03-19 17:31:18 -07:00