Hi, Take this example: #+BEGIN_EXAMPLE ; -*- mode: ledger; coding: utf-8 -*-
; version 1 = PartnerA:Expense:X (Company:Expense:X) (amount) = PartnerB:Expense:X (Company:Expense:X) (amount) ; version 2 = /^PartnerA:Expense/ (ExpertLedgerUsers:%(account)) (amount) = /^PartnerB:Expense/ (ExpertLedgerUsers:%(account)) (amount) 2014/05/01 X PartnerA:Expense:X 10 USD PartnerA:Assets -10 USD 2014/05/02 X PartnerB:Expense:X 20 USD PartnerB:Assets -20 USD #+END_EXAMPLE We have a partnership of person A and B, and they spend some amount of money on X at a company event. As they spend separately, they want to account this correctly, so the expenses are correctly allocated. But they have to report their spendings together to some government office, so they use automated transactions to create the account Company:Expense:X. This setup can be seen in "version 1", the problem with this setup is that they have to create the automated transactions for every account they use. So in a company of expert ledger users, they want to try something more advanced and they match on ^PartnerA:Expense account name and then account this to ExpertLedgerUsers:%(account), but actually what they want is this: ExpertLedgerUsers:%(ignore_first_part_of_name(account)). The only missing piece is the ignore_first_part_of_name function in the %() format string. Are the available functions documented somewhere? (I looked around in the source code for 10-20 mins without too much success.) Is there a function which can achieve this setup? Thanks, Gergely -- --- 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.
