Commit Graph

65 Commits

Author SHA1 Message Date
Simon Michael
baa15d9bea ;lib: rename MultiBalanceReports.hs -> MultiBalanceReport.hs 2019-06-14 11:45:25 -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
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
91b111b60d rename easytests_* to tests_* 2018-09-06 13:13:26 -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
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
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
Simon Michael
b991103bcc BalanceHistoryReport is not used 2016-08-08 07:11:16 -07:00
Simon Michael
77d24fc241 split up Hledger.Reports 2014-03-19 17:31:18 -07:00
Simon Michael
bff69227f7 balance: more comment cleanups 2014-03-18 18:16:47 -07:00
Simon Michael
4d8d0d9aa6 balance: make BalanceReport more like MultiBalanceReport, doc cleanups 2014-03-18 18:01:24 -07:00
Simon Michael
e97b8b20b8 balance: make sym: filtering work as expected in multicolumn reports 2014-03-16 09:40:51 -07:00
Simon Michael
46d594bada balance, register now filter more strongly by sym: 2014-02-27 17:47:47 -08:00
Simon Michael
73c09f91d7 queryFromOptsOnly for when args aren't query terms 2014-02-27 17:46:05 -08:00
Simon Michael
c53732a4af balance: new multi-column reports & documentation
Two new multi-column balance report modes show ending balance per
period: `--cumulative`, starting from 0, and `--historical`, starting
from the historical starting balance.

The balance command's specification has been clarified and consolidated
in the Balance.hs haddock. Reports.hs has also had haddock updates. The
old AccountsReport type is now BalanceReport, still used by
single-column balance report. The new MultiBalanceReport type is used by
the multi-column reports.
2013-12-07 05:43:31 -08:00
Simon Michael
2de58e2ec0 fix haddock errors in Reports.hs 2013-09-28 10:14:43 -07:00
Simon Michael
7e06a6a24c balance: basic multi-column balance (change) reports 2013-09-26 15:06:48 -07:00
Simon Michael
671bb6c4a2 require data-pprint as a debugging aid and make some types compatible with it 2013-09-21 13:36:43 -07:00
Simon Michael
8444be6f88 docs: report haddock cleanups 2013-09-10 13:42:57 -07:00
Simon Michael
7ed0705398 register: --average/-A shows a running average, like ledger 2013-09-09 18:25:53 -07:00
Simon Michael
e13ea5706d oops, missed a build failure 2013-06-04 11:43:26 -07:00
Simon Michael
fd8de9558e web: show proper Y-values in register chart (fixes #122) 2013-06-03 23:15:30 -07:00
Simon Michael
2e5718d5ea web: show one line per commodity in charts. Needs more polish, but fixes #109. 2013-06-01 15:33:33 -07:00
Simon Michael
2a6a028222 register: date display refinements
- when showing multiple postings from a transaction, show their individual dates accurately
- with --date2, use that date for sorting
2013-02-14 21:12:35 +00:00
Simon Michael
7175c57992 reg: --related/-r flag to show other postings in the transaction 2012-12-22 00:24:38 +00:00
Simon Michael
621a91807e rename actual/effective dates to primary/secondary
The command-line flag is now --date2. Alternate spellings --effective and --aux-date
are accepted for compatibility.
2012-12-06 04:43:41 +00:00
Simon Michael
20e68f23a8 support effective dates on postings as well
We now preserve all dates while reporting, instead of overwriting one with the other.
2012-12-06 02:41:37 +00:00
Simon Michael
27621515ea bal, reg: use posting date if specified, clarify posting effective date not yet supported 2012-12-06 01:10:15 +00:00
Simon Michael
dfeafa6064 export accountBalanceHistory 2012-12-06 01:09:12 +00:00
Simon Michael
4aafeb32e6 refactor: clean up Posting construction 2012-12-06 00:03:07 +00:00
Simon Michael
26ad56e1b2 untested accountBalanceHistory calculator 2012-12-05 23:52:46 +00:00
Simon Michael
0913e54e93 94: fix a regression with non-flat balance report, caused by previous fix
Correct in all cases now, hopefully.
2012-12-05 23:51:42 +00:00
Simon Michael
f54e3299b9 94: fix 0.19 regression showing wrong total balance with balance --flat
and distinguish better between account depth and item indent level
2012-12-04 01:07:04 +00:00
Simon Michael
64180b18ef refactor: clarify that price amounts have only a single commodity 2012-11-19 23:17:55 +00:00
Simon Michael
4567e91409 refactor: move amount display settings out of commodity, simplify amount construction 2012-11-19 21:20:10 +00:00
Simon Michael
00f22819ae balance report speedup
This refactoring fixes an O(n^2) slowdown in the balance command with
large numbers of accounts. It's now speedy, and the implementation is
clearer. To facilitate this, the Account type now represents a tree of
accounts which can easily be traversed up or down (and/or flattened
into a list).

Benchmark on a 2010 macbook:

    +-------------------------------------------++--------------+------------+--------+
    |                                           || before:      | after:     |        |
    |                                           || hledger-0.18 | hledgeropt | ledger |
    +===========================================++==============+============+========+
    | -f data/100x100x10.journal     balance    ||         0.21 |       0.07 |   0.09 |
    | -f data/1000x1000x10.journal   balance    ||        10.13 |       0.47 |   0.62 |
    | -f data/1000x10000x10.journal  balance    ||        40.67 |       0.67 |   1.01 |
    | -f data/10000x1000x10.journal  balance    ||        15.01 |       3.22 |   2.36 |
    | -f data/10000x1000x10.journal  balance aa ||         4.77 |       4.40 |   2.33 |
    +-------------------------------------------++--------------+------------+--------+
2012-10-21 17:18:18 +00:00
Simon Michael
ec2f35ef07 split up accountsReport unit tests 2012-05-30 11:23:03 +00:00
Simon Michael
e6de8df97f balance: respect all query terms, not just acct 2012-05-30 11:24:08 +00:00
Simon Michael
9735d583d1 extra postingsReport test 2012-06-29 18:35:32 +00:00
Simon Michael
d4a897306c combine command-line flags like --depth properly with non-flag query patterns 2012-06-29 22:36:30 +00:00
Simon Michael
294a350993 promote Hledger.Query to second level 2012-05-16 07:57:10 +00:00
Simon Michael
a03fd1d89f fix haddock complaints 2012-05-27 18:20:18 +00:00
Simon Michael
2fb2aea056 rename metadata fields to tags 2012-05-27 22:59:06 +00:00
Simon Michael
3ee6a351f3 big query/tests/show refactoring
- use new query system for command line too, filterspec is no more
- move unit tests near the code they test, run them in bottom up order, add more
- more precise Show instances, used for debugging not ui
2012-05-27 18:14:20 +00:00
Simon Michael
1b7ffe2e5a fix for haddock 2012-05-14 17:22:12 +00:00