Stephen Morgan
28fd7c65f2
lib: When displaying amounts on a single line, always display at least one amount, even if that would exceed the requested maximum width. Addresses #1526 .
2021-04-13 15:29:58 -10:00
Simon Michael
f5121129ec
timeclock: print shows timeclock amounts with just 2 decimals, like pre-1.21 ( #1527 )
2021-04-12 18:40:33 -10:00
Stephen Morgan
493ed14629
lib,test: Make sure historical postings have prices stripped if necessary in PostingsReport (see issue #1522 ).
2021-04-11 18:31:30 -10:00
Stephen Morgan
f6feef7f80
lib,cli: Strip prices in MultiBalanceReport and PostingsReport whenever
...
we know we won't need them.
Knowing whether we need them is accomplished by pulling the "show-costs"
option used by the Close command up into ReportOpts.
2021-04-11 18:31:30 -10:00
Stephen Morgan
42d7009fef
test: Alter valuation tests to better distinguish between costing and
...
valuation. Replaces a redundant test with one which tests both costing
and valuation simultaneously.
2021-04-11 18:06:04 -10:00
Stephen Morgan
a529207ae7
lib: Do not round Decimal before applying JSON representation if
...
existing representation is small enough.
Previously the JSON representation of Decimal was rounded to 10 points
of precision before serialising. This sometimes results in an
unnecessary increase of precision.
2021-04-10 17:52:33 -10:00
Simon Michael
5db75c39df
bal: keep csv column and row labels consistently lower case
...
It was reported on #hledger that bal -O csv capitalises "account"
differently for single and multi-period reports. All lower case seems
to be the most common, so I have dropped the capitalisation. Also
the trailing colon from --transpose's "total:".
2021-03-29 07:50:43 -07:00
Eric Mertens
03f06128dc
Add a whitespace csv test
2021-03-26 16:39:24 -07:00
Stephen Morgan
b6e20dea13
lib,test: Simplify the JSON representation of AmountPrecision.
...
It now uses the same JSON representation as Maybe Word8. This means that
the JSON serialisation is now broadly compatible with that used before the
commit f6fa76bba7 , differing only in
how it handles numbers outside Word8 and that it can now produce null
for NaturalPrecision.
2021-03-25 15:47:34 -07:00
Stephen Morgan
4cb9dfb5b8
lib: Properly escape quotes in csv output.
2021-03-25 09:41:42 -07:00
Stephen Morgan
1702b8cca4
Revert "fix valuation tests after #1499 "
...
This reverts commit 696114cfa8 .
2021-03-10 12:29:06 +11:00
Simon Michael
696114cfa8
fix valuation tests after #1499
2021-03-09 10:17:26 -08:00
Stephen Morgan
2aae54a02c
test: Test bal --valuechange throws an error for bad --value options.
2021-03-05 10:09:14 -08:00
Stephen Morgan
efb37c3343
lib: Default to PeriodChange report when using ValueChangeReport.
2021-03-05 10:09:14 -08:00
Stephen Morgan
3f408c2117
lib,cli: Restore old --change option for per-period summation, use --sum for basic ValueChange balance report.
2021-03-05 10:09:14 -08:00
Stephen Morgan
d931e4919e
cli: Allow overriding with --periodic (rather than the old --change) and properly calculate requestedspan in CompoundBalanceReport.
2021-03-03 15:43:02 -08:00
Stephen Morgan
edaaef897b
lib: Do not include price directives in journalDateSpan. Only include
...
price directives after the last transaction/posting date if using
--value=end.
Also enlarges the reportspan to encompass full intervals for budget
goals.
2021-03-03 05:26:55 -08:00
Stephen Morgan
7f2536a2a7
lib,cli: Add --valuechange report type for calculating change of value
...
of accounts, restore --value=end behaviour to that of hledger-1.19.
2021-02-27 18:42:02 -08:00
Dmitry Astapov
8013d650f3
roi: honor all kinds of --value switches
2021-02-23 14:11:29 -08:00
Simon Michael
b9d33a4294
bs: just declaring a Cash account no longer hides Asset accounts
...
Since Cash is also an Asset, declaring an account as Cash also disabled the fallback regexp for Asset accounts.
2021-02-13 08:09:45 -08:00
Simon Michael
37e49ada70
cli: rename --infer-value to --infer-market-price
...
For clarity; infer-value was too vague. The old spelling remains
supported for compatibility, but is now deprecated.
When typing, --infer-market or even --infer (for now) is sufficient.
2021-02-05 15:16:39 -08:00
Simon Michael
6101368954
print: always show all decimal places ( #931 )
...
Ensures parseable and more sensible-looking output in more cases, and behaves more like Ledger's print.
There is still an issue with adding trailing zeroes, which would be nice to prevent.
2021-02-04 08:13:55 -08:00
Simon Michael
0274b30742
print: don't add decimal places in assertion/assignment amounts either ( #1465 )
2021-02-04 06:46:09 -08:00
Simon Michael
201f967411
print: show all decimal places in assertion/assignment amounts ( #1465 )
...
Overriding the commodity style, per https://hledger.org/hledger.html#commodity-display-style .
2021-02-03 18:11:44 -08:00
Stephen Morgan
b619b68f71
doc: Remove references to --value=cost, replacing them with --cost.
...
Since this is option is now just an alias for -B/--cost, and since it
may be removed soon, we make it undocumented, though it will still
behave as before. --value=cost,COMM is unsupported as well.
2021-01-28 13:57:48 -08:00
Stephen Morgan
c9eb7d1bcf
lib,cli,ui: Separate costing from valuation; each can now be specified
...
independently.
You can now combine costing and valuation, for example "--cost
--value=then" will first convert to costs, and then value according to
the "--value=then" strategy. Any valuation strategy can be used with or
without costing.
If multiple valuation and costing strategies are specified on the
command line, then if any of them include costing
(-B/--cost/--value=cost) then amounts will be converted to cost, and for
valuation strategy the rightmost will be used.
--value=cost is deprecated, but still supported and is equivalent to
--cost/-B. --value=cost,COMM is no longer supported, but this behaviour can be
achieved with "--cost --value=then,COMM".
2021-01-28 13:57:48 -08:00
Stephen Morgan
a632e2fee9
test: Period change reports should not see historical postings when performing valuation.
2021-01-28 13:57:48 -08:00
Stephen Morgan
9cf5015958
lib: bal --value=end without --historical should not report on fluctuation in value of historical postings.
2021-01-28 13:57:48 -08:00
Simon Michael
08c5857ac9
areg: ignore a depth limit, as in 1.19 ( #1468 )
...
aregister always shows transactions to subaccounts as well, ignoring any depth limit, so that the register's final total matches a corresponding balance report.
This was broken since 2020-09-02 c45663d41 .
2021-01-24 09:46:12 -08:00
Simon Michael
58df055f7c
;areg: add a commented test for #1468
2021-01-23 17:15:38 -08:00
Simon Michael
540c65994c
payees: add --used/--declared flags, like accounts
2021-01-17 16:37:38 -08:00
Simon Michael
63076d212d
;csv: csvtest.sh: add history note ( #1434 )
...
In case someone might want to find the old code.
2021-01-15 13:19:24 -08:00
Felix Van der Jeugt
a79a7cfdb8
make testscript POSIX and shellchecked
2021-01-15 13:18:51 -08:00
Stephen Morgan
2b545caae5
lib: Calculate value at posting date for register --value=then -M.
2021-01-12 18:20:21 -08:00
Dmitry Astapov
07a9f11962
roi: use MixedAmount more and keep styles when reporting commodities
2021-01-12 15:19:35 -08:00
Dmitry Astapov
14a3b9833c
roi: fix insane precision bug, discovered in #1417
2021-01-12 15:19:16 -08:00
Dmitry Astapov
fc32f22f86
lib: roi now supports --value/--infer-value
2021-01-12 11:53:00 -08:00
Dmitry Astapov
9869624c5c
lib: better message when roi fails to value commodity, fixes #1446
2021-01-12 11:53:00 -08:00
Stephen Morgan
0ef413bc25
doc,tests: Document new --value=then functionality and add tests.
2021-01-10 07:53:57 -08:00
Simon Michael
b96713a584
check: uniqueleafnames: fancy error message like the others
2021-01-09 18:54:33 -08:00
Stephen Morgan
83110e8820
lib,cli: Extend AtThen valuation to all report types.
...
Also adds a postingDate argument to amountApplyValuation, and re-orders
the ValuationType and (Transaction/Posting) arguments to
(transaction/posting)ApplyValuation, to be consistent with
amountApplyValuation.
2021-01-05 14:42:09 -08:00
Simon Michael
3d7d5c0db7
new price search that really finds the shortest path ( #1443 )
...
This one should also reliably prevent runaway searches in the event of more bugs, giving up after 1000 iterations.
2021-01-04 18:42:51 -08:00
Simon Michael
e179685f3c
;valuation: commented test for #1443
2021-01-04 16:26:48 -08:00
Simon Michael
108b020f23
;valuation: add functional test for #1439 slowdown
2021-01-04 15:45:58 -08:00
Stephen Morgan
2bc2710017
test: Update for tests failing now that it's 2021.
2021-01-02 15:08:09 +11:00
Stephen Morgan
f998a791cf
lib: Remove unused optional width argument for StringFormat.
2021-01-02 15:08:09 +11:00
Stephen Morgan
462a13cad7
lib,cli: Use Text Builder for Balance commands.
2021-01-02 15:08:09 +11:00
Simon Michael
2ffed3aec7
check: ordereddates: test --date2, clarify --unique and QUERY dropped
2020-12-31 11:43:51 -08:00
Simon Michael
4491325bb0
;check: ordereddates/uniqueleafnames: print on stderr, refactor
2020-12-31 11:22:32 -08:00
Simon Michael
1d4c4c5b8b
check: drop old checkdates/checkdupes commands, consolidate
2020-12-31 10:49:17 -08:00
Simon Michael
a6ec7bcc11
;check: add tests for all on-demand checks
2020-12-31 10:27:50 -08:00
Simon Michael
5d8669d4f3
;check: separate func test files for each check
2020-12-31 08:29:15 -08:00
Simon Michael
de56d09024
;check: start some functional tests, for payees
2020-12-30 18:08:31 -08:00
Simon Michael
d126ceead2
;cli: tests: allow func tests to run on NixOS
2020-12-28 15:23:51 -08:00
Simon Michael
9ff53ab1e0
;cli: convert cli.test to latest format
2020-12-28 06:28:31 -08:00
Simon Michael
323303daba
;cli: another fix for 4330427f
2020-12-28 06:24:56 -08:00
Stephen Morgan
0c23619ae7
lib: Valuation has changed; and -V now acts like --value=end.
2020-12-19 11:59:44 -08:00
Stephen Morgan
8981b3e196
lib: Include empty columns in MultiBalanceReports.
...
This was previously done for CompoundBalanceReport and when --empty was
called; this makes the behaviour consistent.
2020-12-18 20:54:08 -08:00
Stephen Morgan
439eddc8b9
lib: Include price directives when calculating journal end date.
2020-12-16 19:04:33 -08:00
Simon Michael
94b3f090be
csv, timedot, timeclock: respect --alias options ( fix #859 )
...
Command-line account aliases now also affect transactions read
from these formats (not just journal format).
lib: journalApplyAliases, transactionApplyAliases, postingApplyAliases
helpers have been added.
2020-11-24 09:17:01 -08:00
Simon Michael
221a6d9001
lib: new more robust price lookup implementation, fixing #1402
2020-11-23 18:08:41 -08:00
Simon Michael
d60c1f764d
lib: partial valuation fix, more debug output for #1402
2020-11-22 13:10:31 -08:00
Simon Michael
6847f0e6a8
; lib: valuation: add a commented test for #1402
2020-11-21 07:35:32 -08:00
Simon Michael
6948b05db6
;bal: budget: add tests clarifying a surprising behaviour
2020-11-19 15:15:04 -08:00
Simon Michael
5bb9006b6c
bal: support CSV output for --budget reports ( #1155 )
2020-11-18 16:29:04 -08:00
Simon Michael
ec2a774b18
cli, lib: move functional tests into hledger/test/
2020-11-16 08:47:41 -08:00
Simon Michael
5639b47d85
;ci: use --pedantic for all; fix a warning with unit test suites
2020-03-07 14:43:50 -08:00
Simon Michael
7ad0f9dd6d
;lib, cli: fix success-hiding in unit test suites
2020-03-07 14:10:22 -08:00
Simon Michael
5ab31f1111
;lib, cli: hide successes in unit test suites' output
2020-03-07 04:00:55 -08:00
Simon Michael
caf8cdf0ca
;test: consistent singular naming for test suites and files
2019-11-29 06:35:29 -08:00
Simon Michael
c7574b8005
;lib, cli: test suite cleanups, don't run hledger-lib tests twice
2019-11-29 06:11:25 -08:00
Simon Michael
fa6f0e8d1a
cli: make cabal test suite run the test command, not just hunit tests
2018-08-18 15:20:15 +01:00
Simon Michael
85e5bd0978
cli: hide successes in hledger package's tests output, also
2017-06-09 18:26:33 -07:00
Simon Michael
335deec496
cli: cabal test suite cleanup
2015-06-18 09:48:18 -07:00