hledger/hledger-lib/Hledger/Read
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
..
Common.hs imp: cost: Allow inferring cost from conversion equity postings with --infer-costs. 2022-07-15 12:32:38 +01:00
CsvReader.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
InputOptions.hs imp: cost: Allow inferring cost from conversion equity postings with --infer-costs. 2022-07-15 12:32:38 +01:00
JournalReader.hs ref: HledgerParseErrors type alias 2022-04-25 02:56:59 -10:00
LedgerReader.hs.disabled debug: move command parsing debug output down to level 8 2020-07-03 11:37:01 -07:00
TimeclockReader.hs cln!: Clean up journal parsing. 2022-03-26 15:35:19 -10:00
TimedotReader.hs cln!: Clean up journal parsing. 2022-03-26 15:35:19 -10:00