>>>>> John Wiegley <
jo...@newartisans.com> writes:
> - A flag to ignore balance assertions altogether. This can be useful when
> trying to track something down.
This is now an additional meaning applied to --permissive.
> - If multiple entries with the same UUID are found, merged their metadata in
> some way.
Still not sure how to handle this in any correct way, so I'm deferring in
order to think about it.
The solution I had to come up with to properly support cross-file balance
assertions was to add a new concept: deferred postings. For example:
2014/04/13 Foo
; UUID: foouuid
Liabilities:Credit Card $100 = some value
<Assets:Checking>
and then later:
2014/04/13 Foo
; UUID: foouuid
Liabilities:Credit Card $100
Assets:Checking = some value
What happens is that when the first transaction is seen, the postings whose
accounts are marked with angle brackets are not applied at that time. It is
as if they had not been seen, except they will be used for balancing
calculations, as usual.
Later, when another transaction of the same UUID is seen, deferred postings
from that UUID, for the posted account, are applied as if they had been seen
then. Note: it applies the previously seen posting, not the posting from the
later transaction. Doing so would be a bit more complex, although I'm open to
thinking of a safe way to do it.
Lastly, I intend to add an error message if there are any "leftover" deferred
transaction at the end of parsing the journal.
John