Simon Michael
72a9b612c1
;cli: fix "hledger CMD --info" with older info
...
This should open the info node for CMD, but was giving an
error with info 4.8 on macs. Now it's more robust.
2021-03-07 17:40:50 -08:00
Simon Michael
36aa01f67a
;update manuals
2021-03-07 10:25:13 -08:00
Simon Michael
5dc644d280
;update CLI usage texts
2021-03-07 10:25:08 -08:00
Simon Michael
3a7c578f2d
;bal: doc: tweaks
2021-03-05 14:55:24 -08:00
Simon Michael
e521518eb6
;bal: doc: tweaks
2021-03-05 10:43:47 -08:00
Simon Michael
2023e9cd65
;bal: doc: more updates & cleanups ( #1496 )
2021-03-05 10:21:46 -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
Simon Michael
ae73eea7cb
;bs,bse,cf,is: update docs
2021-03-04 10:26:58 -08:00
Simon Michael
7b8a873471
;check: update manual
2021-03-03 15:43:38 -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
Simon Michael
e9f04d5ed6
check: ordereddates now checks each file separately ( fix #1493 )
2021-03-03 06:44:50 -08:00
Simon Michael
642ad24b0e
;check: refactor
2021-03-03 06:06:39 -08:00
Simon Michael
cb0526381e
;bal: doc updates
2021-03-03 05:30:53 -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
Simon Michael
ff5e810c78
;bal: more doc updates
2021-03-03 04:10:23 -08:00
Simon Michael
4c9b72ea15
;bal: mention --valuechange ( #1480 )
2021-02-27 18:53:05 -08:00
Simon Michael
f63c38a7e2
bal: docs rewritten, and updated for new flags
2021-02-27 18:51:44 -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
Stephen Morgan
351648e4fa
lib,cli: Add --periodic option to indicate PeriodChange accumulation (renamed from --change).
2021-02-27 18:42:02 -08:00
Dmitry Astapov
582a1651b3
roi: cmdline help simplified
2021-02-23 15:13:19 -08:00
Dmitry Astapov
0fa51482c6
roi: check valuation on dates we have price directives for
2021-02-23 14:11:29 -08:00
Dmitry Astapov
8013d650f3
roi: honor all kinds of --value switches
2021-02-23 14:11:29 -08:00
Simon Michael
f4d81377af
print --match: show --match's argument in debug output
...
If you forget that the argument is required by the --match
option, and not the command as a whole - eg if instead of
hledger print --match somebank -x
you write:
hledger print --match -x somebank
that gets quietly parsed as:
hledger print --match="-x"
which is not great. Adding --debug now at least gives some insight:
hledger print --match -x somebank --debug
finding best match for description: "-x"
similar transactions:
...
2021-02-20 14:29:40 -08:00
Simon Michael
44508f58c8
add, lib: debug output, refactor similar transactions lookup
...
add --debug=1 shows the top hits for similar past transactions.
added:
Hledger.Cli.Utils.journalSimilarTransaction
provides --debug=1 output
changed:
Hledger.Cli.Commands.Add.transactionsSimilarTo -> Hledger.Data.Journal.journalTransactionsSimilarTo
now takes an extra number-of-results argument
2021-02-20 13:41:37 -08:00
Simon Michael
7979c7d74c
;import: doc: tweak
2021-02-18 18:43:22 -08:00
Simon Michael
125ba49992
;import: doc: tweak
2021-02-18 18:38:51 -08:00
Simon Michael
554f7a59fd
;import, print: better deduplication docs
2021-02-18 18:35:06 -08:00
Simon Michael
f7bbb39a77
;regenerate cabal files with the hpack version in current stack
...
To minimise warnings. They got regenerated by a commit for #1471 .
2021-02-18 13:42:40 -08:00
Simon Michael
b92a842728
;update manuals
2021-02-17 12:07:23 -08:00
Simon Michael
f4c8b52885
;update CLI usage texts
2021-02-17 12:07:06 -08:00
Arnout Engelen
ad2ab3c823
Make sure to round up for the 'to' date
2021-02-17 09:05:13 -08:00
Simon Michael
9cff45b2c5
;journal: doc: note same-day P overrides --infer-market-value
2021-02-13 15:34:47 -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
d865ec5d65
lib: refactor: more consistent amount precision helpers
...
Hledger.Data.Amount:
renamed:
setAmountPrecision -> amountSetPrecision
setFullPrecision -> amountSetFullPrecision
setMixedAmountPrecision -> mixedAmountSetPrecision
added:
mixedAmountSetFullPrecision
2021-02-05 16:09:49 -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
681965e2d4
;journal: doc: wording tweak for #1465
2021-02-04 08:13:55 -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
a91a2ed2ed
;csv: doc: note how CSV amounts affect display style ( #1465 )
2021-02-04 06:30:14 -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
Simon Michael
74f288a01d
;doc: valuation: fix typos
2021-01-31 13:33:50 -08:00
Stephen Morgan
e6cf2fb499
doc: Document new independent costing and valuation features in manual.
2021-01-28 13:57:49 -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
130739e3ef
lib,cli,ui: Introduce *ApplyCostValuation functions, which perform both
...
costing and valuation.
This currently is given a dummy NoCost argument and is equivalent to
"maybe id (*ApplyValuation ...)", but provides a constant interface so
that internal behaviour can be changed freely.
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
93e5355a2b
;areg: doc: clarify account selection
2021-01-28 07:22:21 -08:00
Simon Michael
6650a563fb
;areg: doc: try to clarify aregister's purpose
2021-01-27 12:53:49 -08:00
Simon Michael
a91ca6892b
;areg: doc: mention depth limit is ignored ( #1468 )
2021-01-24 10:02:34 -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
337bc989ab
;bal: notes for single-period html output
2021-01-21 16:44:26 -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
217bfc5e74
lib: Rename alignCell to textCell, minor cleanups.
2021-01-15 12:56:48 -08:00
Simon Michael
ce6939b304
;journal: doc: note commodity directives' position-sensitivity
2021-01-13 17:57:18 -08:00
Simon Michael
bd8074721e
journal: doc: clarify number formats, display styles ( #1461 )
2021-01-13 17:57:18 -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
aragaer
7bde3345b8
cli,csv: Fix --drop option in csv output format
2021-01-12 12:11:56 -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
b203822cd1
lib: Make sure to add a newline to the end of aregister report.
2021-01-10 20:50:46 -08:00
Simon Michael
b5ab5ac9bc
;bal: doc: tweak
...
(cherry picked from commit 1dda703651ffe64dcf14c6a026fdead836224d1b)
2021-01-10 15:50:49 -08:00
Simon Michael
50a7914b3b
;update manuals
2021-01-10 15:37:32 -08:00
Simon Michael
de5dfe2d1b
;update CLI usage texts
2021-01-10 15:35:48 -08:00
Simon Michael
0d418fc86e
;bal: update command docs ( #1441 )
2021-01-10 15:35:01 -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
6931eec3ce
;check: uniqueleafnames: short circuit to avoid wasted work
2021-01-09 18:59:10 -08:00
Simon Michael
b96713a584
check: uniqueleafnames: fancy error message like the others
2021-01-09 18:54:33 -08:00
Simon Michael
e82e1db464
;check: ordereddates: fix double "Error"
2021-01-09 18:54:33 -08:00
Simon Michael
a3e94290e4
;csv: doc: amount tips: tweaks
2021-01-09 18:54:33 -08:00
Doug Goldstein
62cd34ae8a
;doc: adjust traditional top level accounts
...
Across the rest of the documentation and other accounting documentation
it appears to imply that the more traditional top level name would be
revenue. In fact the income statement says that is a subtraction between
revenue and expenses to derive the income. While the account types that
hledger supports are named revenue so it seems more natural to name this
revenue.
2021-01-09 12:58:18 -08:00
Simon Michael
eafdae3886
;csv: doc: amount tips: tweaks
2021-01-07 10:15:13 -08:00
Simon Michael
c21b666130
csv: handle more sign variations, eg a sign by itself
...
simplifySign now covers a few more sign combinations that might arise.
And in particular, it strips a standalone sign with no number,
which simplifies sign flipping with amount-in/amount-out.
2021-01-07 10:06:38 -08:00
Simon Michael
6035cdf1e0
;csv: doc: setting amounts: tweaks
2021-01-07 09:30:37 -08:00
Simon Michael
62d9e46adc
;csv: doc: tweaks
2021-01-06 15:33:54 -08:00
Simon Michael
07a96c47c9
;csv: doc: improve setting amounts tips
2021-01-06 11:01:12 -08:00
Simon Michael
b15a634a44
;check: accept parseable/autobalanced/assertions as arguments, for completeness
2021-01-05 16:25:43 -08:00
Simon Michael
7510d99aec
check: accept case-insensitive prefixes as arguments
...
Might a bad idea, but avoiding wasteful typing..
2021-01-05 16:18:24 -08:00
Simon Michael
9abb33d8e7
;valuation: document the price search limit ( #1439 )
2021-01-05 15:59:58 -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
5ba6215c47
cli: Remove redundant import, add some CPP.
2021-01-02 15:08:09 +11:00
Stephen Morgan
2bc2710017
test: Update for tests failing now that it's 2021.
2021-01-02 15:08:09 +11:00
Stephen Morgan
7d3cf1747a
lib: Make consistent naming scheme for showMixedAmount* functions,
...
add conversion between old API and new API in the documentation.
2021-01-02 15:08:09 +11:00
Stephen Morgan
e63138ef7d
lib,cli: Assorted fixes for older GHC.
2021-01-02 15:08:09 +11:00
Stephen Morgan
e4e533eb9f
lib,cli,ui: Replace some uses of String with Text, get rid of some unpacks, clean up showMixed options.
2021-01-02 15:08:09 +11:00
Stephen Morgan
07a7c3d3a8
lib: Use Text and Text builder only in postingAsLines.
2021-01-02 15:08:09 +11:00
Stephen Morgan
13c111da73
lib,cli,ui: Use WideBuilder for Tabular.AsciiWide.
...
Move WideBuilder to Text.WideString.
2021-01-02 15:08:09 +11:00
Stephen Morgan
b9c00dce61
lib,cli,ui: Implement all showMixed* functions in terms of DisplayAmountOpts and WideBuilder.
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
Stephen Morgan
089564b04b
lib,cli: Use Text for CompoundPeriodicReport titles.
2021-01-02 15:08:09 +11:00
Stephen Morgan
541c4fc18c
lib,cli: Use Text for CSV values.
2021-01-02 15:08:09 +11:00
Stephen Morgan
e3ec01c3c6
lib,cli,ui: Use Text for showDate and related.
2021-01-02 15:08:09 +11:00
Stephen Morgan
74b296f865
lib,cli: Make showTransaction return Text rather than String.
2021-01-02 15:08:09 +11:00
Stephen Morgan
dbe7015502
cli: Refactor compoundBalanceCommand.
2021-01-02 15:08:09 +11:00
Stephen Morgan
7e44b89bb4
lib: Remove unused label on TranspactionReport and AccountTransactionsReport.
2021-01-02 15:08:09 +11:00
Stephen Morgan
5752f1c5cb
lib,cli: Use Text Builder for Account Transaction Reports.
2021-01-02 15:08:09 +11:00
Stephen Morgan
b9dbed6713
cli: Use Text Builder for Entries Reports.
2021-01-02 15:08:09 +11:00
Stephen Morgan
12a6435c51
lib: Add wrap convenience function.
2021-01-02 15:08:09 +11:00
Stephen Morgan
646ee0bce5
cli: Using Text Builder for posting reports.
2021-01-02 15:08:09 +11:00
Simon Michael
ac39d59016
;check: doc: link to payee directive
2020-12-31 12:57:39 -08:00
Simon Michael
fdeaa3cd8b
doc: journal: document payee directive
2020-12-31 12:55:24 -08:00
Simon Michael
3898a66dda
;check: doc: wording
2020-12-31 12:40:46 -08:00
Simon Michael
c8eb347835
;check: no longer experimental
2020-12-31 12:17:48 -08:00
Simon Michael
2ffed3aec7
check: ordereddates: test --date2, clarify --unique and QUERY dropped
2020-12-31 11:43:51 -08:00
Simon Michael
bb1d49c573
;update CLI usage texts
2020-12-31 11:23:56 -08:00
Simon Michael
01bfeda4fb
;update cabal files
2020-12-31 11:23:36 -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
8306420b61
check: also check "accounts"/"commodities" on demand
...
(cherry picked from commit 0c2bf54f2955e3a25fd0282acc42608f957abaea)
2020-12-31 08:33:36 -08:00
Simon Michael
5d8669d4f3
;check: separate func test files for each check
2020-12-31 08:29:15 -08:00
Simon Michael
31ea37a785
;check: accounts, commodities, payees, ordereddates: improve errors
...
Error messages for these four are now a bit fancier and more
consistent. But not yet optimised for machine readability.
Cf #1436 .
Added to hledger-lib: chomp1, linesPrepend[2].
2020-12-30 18:13:34 -08:00
Damien Cassou
b47d582583
;check: fixes
2020-12-30 18:08:31 -08:00
Simon Michael
de56d09024
;check: start some functional tests, for payees
2020-12-30 18:08:31 -08:00
Simon Michael
3c232fbd7d
check: add "payees" check requiring payee declarations
2020-12-30 18:08:30 -08:00
Simon Michael
8ab2316604
;cli: doc: data formats: wording
2020-12-30 17:06:01 -08:00
Simon Michael
22c6f056c2
;update manuals
2020-12-29 10:27:48 -08:00
Simon Michael
6f08631be3
;doc: changelog updates
2020-12-29 10:21:27 -08:00
Simon Michael
a5f9f8ce0c
;update CLI usage texts
2020-12-29 09:43:24 -08:00
Simon Michael
4a48e5f8aa
;doc: changelogs
...
(cherry picked from commit 3031c0e7b9bd9384ac390d3f3705455f057dd8c8)
2020-12-29 09:39:35 -08:00
Simon Michael
4ce681348d
;update changelogs
...
(cherry picked from commit 1b389961587720be10f7cced91d3b6cb9fc47415)
2020-12-29 09:38:58 -08:00
Simon Michael
f2d2272737
;update changelogs
...
(cherry picked from commit 15e290955f8ae2ed636b4e144e84fc4c73f4228b)
2020-12-29 09:37:54 -08:00
Simon Michael
d126ceead2
;cli: tests: allow func tests to run on NixOS
2020-12-28 15:23:51 -08:00
Simon Michael
21ce0c30cc
;print: cleanup; discuss unbalanced output ( #1429 )
2020-12-28 07:07:45 -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
Simon Michael
b66d8f0f3c
;update manuals
2020-12-26 17:29:02 -08:00
Simon Michael
cee1c69ac0
;update CLI usage texts
2020-12-26 17:28:47 -08:00
Simon Michael
4330427f6b
cli: make --help/--version always CMD-specific
...
This simplifies the --help/-h and --version flags by making them
position independent: no matter where they appear in the command line,
if there is a command argument they will show the command's help or
version (where applicable), instead of the hledger executable's.
2020-12-26 17:27:28 -08:00
Simon Michael
ae9595c321
cli/help: --info/--man/help show CMD/topic-specific docs
...
hledger CMD --info will now open CMD's info node,
hledger CMD --man will scroll the man page to CMD's section, and
hledger help -i/-m/-p TOPIC will do similar.
This is not perfectly robust but hopefully will be good enough in
practice.
Also the help command's long --info/--man/--pager flags have been
dropped in favour of -i/-m/-p.
2020-12-26 17:27:28 -08:00
Simon Michael
54af71a0b1
cli: general --man, --info flags show the manual
2020-12-26 17:27:28 -08:00
Simon Michael
f20cd2b112
help: show only the hledger manual, for now
2020-12-26 17:27:27 -08:00
Simon Michael
7d3f05b16a
help: add -i/-m/-p short flags
2020-12-26 17:27:27 -08:00
Simon Michael
9beff54b27
help: drop --cat
2020-12-26 17:27:27 -08:00
Simon Michael
ab55be6d64
;doc: link updates
2020-12-26 17:27:27 -08:00
Simon Michael
201ea210fb
;cli: doc: intro wording
2020-12-26 17:27:27 -08:00
Simon Michael
8a16b2b1b0
;update CLI usage texts
2020-12-26 08:21:45 -08:00
Simon Michael
45a5658396
cli: drop deprecated command aliases a, b, p, r, txns
2020-12-26 08:21:45 -08:00
Simon Michael
8d320bc1fe
;update manuals
2020-12-24 17:26:17 -08:00