Stephen Morgan
30f02b0882
lib: account name clipping takes Maybe Int as depth.
2020-07-17 07:41:27 -07:00
Stephen Morgan
51ea6d9f25
lib: Make queryDepth return Maybe Int.
2020-07-16 10:05:53 -07:00
Stephen Morgan
463eee7bf4
lib: Replace {pr,prr}Negate with fmap negate.
2020-07-10 09:08:03 -07:00
Stephen Morgan
f5e1fb2625
lib: Refactor BudgetReport to re-use MultiBalanceReport code.
2020-07-07 18:46:34 -07:00
Stephen Morgan
bfda10ff20
lib: Refactor MultiBalanceReport row sorting, make sure totals are calculated after pruning.
2020-07-07 18:46:34 -07:00
Stephen Morgan
bde4d7e2e4
lib: Use last column of historical balance as total. Use totals for balanceReport.
2020-07-07 17:56:38 -07:00
Stephen Morgan
1425301a8c
lib, cli: Use --flat as the default mode for all reports.
2020-07-07 15:49:08 -07:00
Stephen Morgan
df84a417d7
doc: Remove references to old limitations of boring parent ellision.
2020-07-07 15:49:08 -07:00
Stephen Morgan
c811ea4c7b
lib, cli, ui, web: intopt and friends now make sure their arguments fit
...
inside bounds.
2020-07-03 12:35:51 -07:00
Stephen Morgan
4fc72328d2
lib, cli: Introduce convienience function compoundBalanceReport.
2020-06-28 07:29:49 -07:00
Stephen Morgan
604868cea5
lib, cli: Move CompoundBalanceReport into ReportTypes, compoundReportWith into MultiBalanceReport, share postings amongst subreports.
2020-06-28 07:29:49 -07:00
Stephen Morgan
d09a90b38b
lib: Refactor multiBalanceReportWith into getPostingsbyColumn and generateMultiBalanceReport.
2020-06-28 07:29:49 -07:00
Stephen Morgan
e089358758
lib: Using --drop in tree mode with boring parent ellision no longer considers all parents boring. Add tests to check this fact.
2020-06-25 18:05:50 -07:00
Stephen Morgan
015492553e
lib: Move unifyMixedAmount to Hledger.Data.Amount, make it return Maybe Amount, export it.
2020-06-24 10:24:11 -07:00
Stephen Morgan
ded4f42218
lib: multiBalanceReport: Accounts with no subaccounts are never interesting parents, even if no_elide_ is set.
2020-06-23 13:19:52 +10:00
Stephen Morgan
826faa18c2
lib: Tweaks to work with stack-8.2.
2020-06-22 23:08:22 +10:00
Stephen Morgan
5168d136ed
lib: multiBalanceReport: Enable --drop for tree mode.
2020-06-22 22:28:08 +10:00
Stephen Morgan
fcaec1540a
lib: multiBalanceReport: Remove unnecessary addition of parent accounts.
2020-06-22 22:27:11 +10:00
Stephen Morgan
e079c8b808
lib: multiBalanceReport: Remove old balanceReport code, update some tests.
2020-06-22 22:27:09 +10:00
Stephen Morgan
edb28d51c5
lib: multiBalanceReport: Get boring parent ellision working for multiBalanceReport.
2020-06-22 22:25:23 +10:00
Stephen Morgan
cd41404fd4
lib: multiBalanceReport: Get --drop working with multiBalanceReports.
2020-06-22 22:21:31 +10:00
Stephen Morgan
6467c252c7
lib: multiBalanceReport: Move responsibility for display name into displayedAccounts
2020-06-22 22:21:30 +10:00
Stephen Morgan
5f0918217a
multibalanceReport: Move responsibility for determining displayed name in multiBalanceReportWith, not at point of consumption.
2020-06-22 22:20:09 +10:00
Stephen Morgan
0dedcfbe15
lib: multiBalanceReport: Miscellaneous simplifications.
2020-06-22 22:11:54 +10:00
Stephen Morgan
1e7e80504f
lib: multiBalanceReport: Keep Account around longer so we can use both aibalance and aebalance.
2020-06-22 22:10:24 +10:00
Stephen Morgan
0e89a389d6
lib: multiBalanceReport: Split displayedAccounts, calculateReportQuery into separate functions.
2020-06-22 22:07:55 +10:00
Stephen Morgan
b106850391
lib: multiBalanceReport: Split postprocessReport and calculateTotalsRow into separate functions.
2020-06-22 21:59:15 +10:00
Stephen Morgan
baa5844d4e
lib: multiBalanceReport: Change indentation.
2020-06-22 21:54:38 +10:00
Stephen Morgan
0b30b2f9fb
lib: multiBalanceReport: Split sortRows into a separate function.
2020-06-22 21:51:38 +10:00
Stephen Morgan
7a9bf998e5
lib: multiBalanceReport: Split buildReportRows into a separate function, remove unnecessary query and valuation.
2020-06-22 21:50:27 +10:00
Stephen Morgan
a81c6d0397
lib: multiBalanceReport: Split accumValueAmounts into a separate function.
2020-06-22 21:48:20 +10:00
Stephen Morgan
b2bed03b4c
lib: multiBalanceReport: Don't import BalanceReport in MultiBalanceReport.
2020-06-22 21:45:42 +10:00
Stephen Morgan
0dcfddd201
lib: multiBalanceReport: Break calculateAccountChanges and acctChangesFromPostings separate functions.
2020-06-22 21:43:30 +10:00
Stephen Morgan
a72c4f285b
lib: multiBalanceReport: Break calculateColumns into a separate function.
2020-06-22 21:39:41 +10:00
Stephen Morgan
fc6a30b234
lib: multiBalanceReport: Break calculateColSpans into a separate function.
2020-06-22 21:38:16 +10:00
Stephen Morgan
44dcd613e8
lib: multiBalanceReport: Break getPostings and makeReportQuery into separate functions.
2020-06-22 21:36:30 +10:00
Stephen Morgan
f21bf53610
lib: multiBalanceReport: Break startingBalances into separate function.
2020-06-22 21:33:16 +10:00
Simon Michael
e3cae4aadc
valuation: implement new --infer-value flag & semantics ( #1239 , #1253 )
2020-06-19 14:40:20 -07:00
Simon Michael
06d5014f5f
;lib: multibalancereport: apply debug output policy
2020-06-16 21:00:08 -07:00
Simon Michael
660ba7e1d9
lib: clarify zero-checking function names
...
isZeroAmount -> amountLooksZero
isReallyZeroAmount -> amountIsZero
isZeroMixedAmount -> mixedAmountLooksZero
isReallyZeroMixedAmount -> mixedAmountIsZero
isReallyZeroMixedAmountCost dropped
2020-05-29 18:57:22 -07:00
Dmitry Astapov
cbacef21eb
lib: multiBalanceReport derives query from ReportOpts
2020-05-25 15:50:14 -07:00
Stephen Morgan
228edf6ba6
Don't store leaf name in PeriodReport.
...
Calculate at the point of consumption instead.
2020-01-04 21:15:42 -08:00
Stephen Morgan
2e20d0717f
lib: Generalise PeriodicReport to be polymorphic in the account labels.
2020-01-04 17:23:17 -08:00
Stephen Morgan
88dc619257
lib: Use records instead of tuples in PeriodicReport.
2020-01-04 17:23:17 -08:00
Stephen Morgan
beb8b6d7c8
lib: Use PeriodicReport in place of MultiBalanceReport.
2020-01-04 17:23:17 -08:00
Stephen Morgan
74778efcf5
Use nubSort instead of nub . sort.
2020-01-04 08:31:10 -08:00
Stephen Morgan
38904372b2
Calculate MultiReportBalance columns more efficiently.
...
Only calculate posting date once for each posting, and calculate their
columns instead of checking each DateSpan separately.
2020-01-03 16:11:46 -08:00
Simon Michael
47567cd770
;fix some warnings with GHC 8.10 alpha
...
hledger is GHC 8.10 ready!
2019-12-14 17:30:19 -08:00
Simon Michael
2b2a0b3cf8
;tests: use "test" alias for testCase everywhere
...
Easier to type and read, and a little clearer to my eyes;
"testCase" implies a single case, but it can contain many assertions.
2019-11-28 15:33:33 -08:00
Simon Michael
b36f6df110
tests: port all unit tests to tasty, second pass ( #1090 )
...
Hledger.Util.Tests helpers have been cleaned up, and test names are
now shown.
Tests have been cleaned up a bit. Some groups of unnamed tests have
been collapsed into a single named test containing a sequence of
assertions. The test command counts named tests, not assertions, so
the reported unit test count has dropped from 199 to 188.
2019-11-27 13:17:34 -08:00