On 21/07/23 07:24, Eric Altendorf wrote:
I know in general the order of records in a beancount input file doesn't matter
It does not matter in the sense that directives are processed in date order and not in the order in which they appear in the ledger. Directives with the same date are processed in the order in which they appear in the ledger. For the details, you can refer to the function deriving the sorting key: https://github.com/beancount/beancount/blob/193645460fd7aafcb3d9e0359edabc21e389db81/beancount/core/data.py#L647-L658
I think that what you observe is completely explained by this.
Brainstorming workarounds: - hack the physical ordering to respect original tx timestamps
That's the way to go, IMO.
- artificially book transfers a day late (but that will break if there are further actions on that asset on the same day as the actual transfer)
This is required if what throws the booking algorithm out is the ordering of directives of different type with the same date. If you are dealing only with transactions, this is not necessary (and as you point out, may result in a cascade of date shifts).
Cheers, Dan -- You received this message because you are subscribed to the Google Groups "Beancount" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/b195621a-857a-5945-acb5-b22171acb77e%40grinta.net.
