hledger/hledger-lib/Hledger
Stephen Morgan 07d1b01287 imp: cost: Allow inferring cost from conversion equity postings with --infer-costs.
When given --infer-equity, hledger will change transaction prices to balancing equity postings. This introduces the inverse operation, --infer-costs, which will match balancing equity postings and transform them into a transaction price, allowing --cost to work properly with them. This is only a partial inverse as it needs to use some heuristics to match the postings which will not work in complicated cases.

Specifically, when hledger finds exactly two conversion postings in a transaction (by default, subaccounts of equity:conversion or equity:trad(e|ing)), it will find the first posting in the transaction whose amount is negative one of the conversion posting amounts, and inserts the corresponding transaction price.
2022-07-15 12:32:38 +01:00
..
Data imp: cost: Allow inferring cost from conversion equity postings with --infer-costs. 2022-07-15 12:32:38 +01:00
Read imp: cost: Allow inferring cost from conversion equity postings with --infer-costs. 2022-07-15 12:32:38 +01:00
Reports dev: errors: update doctests 2022-07-13 19:00:00 +01:00
Utils imp: errors: more error prettification 2022-07-13 03:59:44 +01:00
Data.hs ref: move journal checking/pretty errors down further, to Hledger.Data 2022-05-21 18:29:13 -10:00
Query.hs fix: tags: also match accounts declared but not used (#1857) 2022-04-14 12:28:43 -10:00
Read.hs fix!: Revert "fix!: utf-8: Use with-utf8 to ensure all files are read and written with utf8 encoding. (#1619)" 2022-06-01 09:35:18 +10:00
Reports.hs cln: tests: Remove test and tests, which are just aliases for testCase 2021-08-30 16:32:19 -10:00
Utils.hs fix!: Revert "fix!: utf-8: Use with-utf8 to ensure all files are read and written with utf8 encoding. (#1619)" 2022-06-01 09:35:18 +10:00