>>>>> "SB" == Soren Bjornstad <[email protected]> writes:

SB> Is there any way to apply an automated transaction to another automated
SB> transaction? Alternatively, does anyone have other ideas as to how I can
SB> solve this issue?

This is an interesting use case, and one that I had never considered. The
point in the code where automatically generated postings get added to a
transaction is here:

    https://github.com/ledger/ledger/blob/next/src/xact.cc#L808

What you're asking for is that we take this new posting, and recursively apply
the set of automated postings to it, I imagine with some of guard that will
trigger an error if you get yourself into infinite recursion.

The code would need to be reorganized a bit for this. Instead of "extending a
transaction", we'd want to break the work into two phases: given a posting,
generate all automated postings for it (possibly recursively); and then, add
all those new postings to the transaction obeying balancing rules.

Anyone up for trying?

John

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to