Does ledge have some "ifdef" like capability that would allow me to exclude certain transactions if a given file is included?
My use case: I'd like keep track of different bank accounts in separate ledger files and I'd like to be able to look at these individual files and get the "whole picture" and also be able to look at all files at the same time. My example: I have a bank account that ran for a fixed number of years. At the end of this period, I moved the money from this bank account to another bank account. The last transaction of bank1.ledger is to move the money from bank1 to bank2. My bank2.ledger starts with the opening balance, i.e. the transfer from bank1 to bank2. When I look at bank1.ledger individually or at bank2.ledger individually everything is fine, but when I look at them both at the same time this transaction is obviously counted twice. Can I somehow "ifdef" the first transaction in bank2.ledger so it won't be used if bank1.ledger is included? Another use case: I'd like to split my transactions in files for each year. My 2010 file starts with the opening balance. However, this transaction should be ignored when I also include the 2009 file since ledger can figure out the opening balance from the previous year. It would be great if this feature would work both with -f and !include. And it should look at the full path (so I can exclude depending on a filename like 2009/bank.ledger when I also have 2010/bank.ledger). -- Martin Michlmayr http://www.cyrius.com/ -- To unsubscribe, reply using "remove me" as the subject.
