Commit Graph

12022 Commits

Author SHA1 Message Date
Simon Michael
aa7b329e3a ;errors: balance assertion: wording 2023-09-03 08:23:43 +01:00
Simon Michael
29ff5468bf dev:journalBalanceTransactions: styling comment 2023-09-02 06:46:14 +01:00
Simon Michael
d8a3c9fa3e dev: no need to style amounts when converting to cost 2023-09-02 06:46:14 +01:00
Simon Michael
c215f920aa dev: update tests 2023-09-02 06:46:14 +01:00
Simon Michael
644635b918 imp: print: show a disambiguating decimal mark when needed
Eg "1,000" (with , as a thousands separator and no decimal digits) is
now displayed with a decimal mark: "1,000.".

"1 000" (where space is a thousands separator) is less ambiguous,
but we do the same thing (eg "1 000.") for consistency, and also to
help disambiguate when forgetting to quote a numeric commodity symbol
(eg "1234 0" where 1234 is a symbol that should have been in double quotes).
2023-09-02 06:46:14 +01:00
Simon Michael
f620a3e0ea dev: showAmountB: clarify 2023-09-02 06:46:14 +01:00
Simon Michael
4bd0dd7ab0 fix: print: don't round in implicit conversions (fix #2079) 2023-09-02 06:46:14 +01:00
Simon Michael
fd97c40266 lib: amount styling: add a final styling pass to all reports 2023-09-02 06:46:14 +01:00
Simon Michael
77aeb18bbd fix:print:style balance assertion costs; more styling api; HasAmounts class 2023-09-02 06:46:14 +01:00
Simon Michael
97be1646f1 dev: AmountStyle: make setting the precision optional
This simplifies the code for styling amounts with or without precision.
But it complicates the semantics (Nothing is useful only when setting style).
Not sure if it's the best way.
2023-09-02 06:46:14 +01:00
Simon Michael
85845e51b2 dev: AmountStyle: rename, reorder fields more mnemonically
Since this type is about to change anyway.
2023-09-02 06:46:14 +01:00
Simon Michael
9f0840456d dev: consolidate amount styling as a new (interim) api 2023-09-02 06:46:14 +01:00
Simon Michael
9b15d34f9c dev: amounts: cleanups 2023-09-02 06:46:14 +01:00
Simon Michael
d3cc31780a dev: AmountStyle: improve debug output 2023-09-02 06:46:14 +01:00
Simon Michael
00a8abd46d dev: commodity-styles tests: cleanup 2023-09-02 06:46:14 +01:00
Jonathan Dowland
1ebd244abb ;dev: Add a ghc-tags.yaml file
Provide a ghc-tags.yaml file to make use of ghc-tags with Hledger easy.

ghc-tags is a standalone tool to replace the formerly-built-in
":ctags" feature (and I presume ":etags") in GHCi. These walked over
the source and produced a TAGS file (in vim-compatible ctags or
Emacs-compatible etags format) that allows the relevant editors to
quickly navigate around function definitions.

ghc-tags trips over some of the CPP used in Hledger. The solution
is to provide ghc-tags with explicit CPP defines via a YAML file.
However, if a YAML file is provided, one also must specify the source
paths, as the tool XORs config file | paths-on-command-line.

See <https://github.com/arybczak/ghc-tags/issues/6> for more
information.

Signed-off-by: Jonathan Dowland <jon@dow.land>
2023-08-31 19:12:49 +01:00
Simon Michael
ff730f775b imp:print: zero posting amounts are now shown with commodity & style
print now shows zero posting amounts with their original commodity
symbol and the corresponding style (instead of stripping the symbol).

If an inferred amount has multiple zeroes in different commodities,
a posting is displayed for each of these.

Possible breaking changes:

showMixedAmountLinesB, showAmountB, showAmountPrice now preserve
commodityful zeroes when rendering. This is intended to improve print output,
but it seems possible it might also affect balance and register reports,
though our tests show no change in those.
2023-08-27 07:34:09 +01:00
Simon Michael
35c0fd692c dev: clarify showAmountB 2023-08-27 07:34:09 +01:00
Simon Michael
28cdcd1bfd dev: clarify orderedAmounts 2023-08-27 07:34:09 +01:00
Simon Michael
3f050d45a9 dev: improve showMixedAmountLinesB doc 2023-08-27 07:34:09 +01:00
Simon Michael
c9e9145318 dev: clarify missingamt/missingmixedamt docs 2023-08-27 07:34:09 +01:00
Jay Neubrand
97943b206c make groupByDateSpan return data when first period has unbounded begin 2023-08-25 18:40:50 +01:00
Dmitry Astapov
c20ebae26d ;doc:roi: mention annualization differences, clean up TWR section 2023-08-24 18:42:52 +01:00
Simon Michael
50f26c280e ;doc:check: cleanup 2023-08-22 09:56:25 +01:00
Simon Michael
ea55c75c2e ;doc:journal:include: fix data formats link 2023-08-22 09:56:08 +01:00
Simon Michael
df9917be57 ;doc:bal: note an issue with the no-symbol commodity and hledger-bar 2023-08-22 08:45:13 +01:00
Simon Michael
115b639ec2 ;doc: update manuals 2023-08-22 08:41:22 +01:00
Simon Michael
95b67ef86b ;doc: update command help 2023-08-22 08:40:46 +01:00
Simon Michael
5f1bf0404a imp:check: more intuitive "balanced..." check names
balancedwithautoconversion -> autobalanced
balancednoautoconversion   -> balanced
2023-08-22 08:38:52 +01:00
Simon Michael
273c51165e ;dev: prepare for renaming balanced checks 2023-08-22 08:04:40 +01:00
Simon Michael
9579b7a4a6 ;imp:cli:help: move test to HELP 2023-08-22 07:35:57 +01:00
Simon Michael
e849a73aa8 ;imp:cli:help: move files to BASIC REPORTS 2023-08-22 07:29:32 +01:00
Simon Michael
dd559226d8 imp:demo: ignore a broken journal, like other HELP commands 2023-08-22 07:11:53 +01:00
Simon Michael
6a12ff1232 ;doc:csv: clarify intra-day-reversed 2023-08-14 13:17:51 +01:00
Dmitry Astapov
588d0dfd26 fix:cli:roi: report TWR per period and overall TWR for multi-period reports (fix #2068) 2023-08-01 14:35:33 -04:00
Simon Michael
f7dbfcf657 fix:cli:commands list: don't show bar when not in path (fix #2065) 2023-07-20 12:04:27 -07:00
Simon Michael
e1723b7d3b ;doc:csv: rewrite "amount field" section 2023-07-17 15:55:03 -10:00
Simon Michael
c1c28aea3f imp:journal: match equity conversion postings more tolerantly (fix #2041)
Equity conversion postings and cost amounts were being matched up too
exactly, causing valid entries with redundant conversion postings and
costs to be rejected. Now the amounts are compared with the precision
(number of decimal places) used in the conversion posting's amount.
Eg, here the first posting's 209.60495 GEL cost is recognised as a
match for the third posting's -209.60 GEL, using the latter's two
digit precision:

    2023-01-01
        Assets               -84.01 USD @ 2.495 GEL  ; 209.60495 GEL
        Equity:Conversion     84.01 USD
        Equity:Conversion   -209.60 GEL
        Assets               209.60 GEL
2023-07-15 16:21:00 -10:00
Simon Michael
d19690e5bd dev:Transaction: refactor/clarify transactionInferCostsFromEquity 2023-07-15 16:19:45 -10:00
Simon Michael
516a5cb448 dev: equity/cost analysis: process in parse order, better debug output
More intuitive posting numbering, making troubleshooting easier.
2023-07-15 16:17:08 -10:00
Simon Michael
c63fba88b6 ;doc: "Cost reporting" capitalisation 2023-07-15 16:09:18 -10:00
Simon Michael
b4a80f693d ;doc:import: link to the deduplicating/importing section in CSV docs #1862 2023-07-13 21:05:27 -10:00
Simon Michael
b27d74efa1 ;dev: cleanup 2023-07-13 20:57:56 -10:00
Simon Michael
ed456a3f8c imp:check:recentassertions: improve the error message's suggestion
The suggested sample balance assertion now uses the same commodity
symbol as in the failing posting (the first, if there are more than
one). Also the cleared mark has been removed.
2023-07-13 09:01:57 -10:00
Simon Michael
002773f650 imp:check:recentassertions: give a more useful error location
hledger check recentassertions now reports the error at the first
posting that's more than 7 days later than the latest balance
assertion (rather than at the balance assertion).  This is the thing
actually triggering the error, and it is more likely to be visible or
at least closer when you are working at the end of a journal file.
2023-07-12 19:54:18 -10:00
Simon Michael
2f64c3e385 ;doc:working with csv: edits 2023-07-12 15:20:40 -10:00
Simon Michael
c90efaba82 ;doc:cost reporting: cleanup 2023-07-12 15:20:19 -10:00
Simon Michael
a99a692736 ;doc:cli: Valuation -> Value reporting 2023-07-11 16:56:41 -10:00
Simon Michael
15c1ba3e15 ;doc:cost reporting: another rewrite 2023-07-11 16:51:40 -10:00
Simon Michael
a617778f64 ;doc:journal: note some equity+cost limitations (#2051, #2056) 2023-07-09 18:44:29 -10:00