Re: Excluding some transactions if a file is included

2010-04-28 Thread John Wiegley
On Apr 27, 2010, at 8:01 PM, Martin Michlmayr wrote: > I've tried both > ledger -f - bal Assets: '!%type=Dup' > and > ledger -f - bal '!%type=Dup' Assets: > but in both cases it shows all accounts, not just my assets. > > My current workaround is: > ledger -f - print '!%type=Dup' > tmp.ledger

Re: Excluding some transactions if a file is included

2010-04-28 Thread Martin Michlmayr
* Martin Michlmayr [2010-04-05 07:53]: > * John Wiegley [2010-04-02 14:38]: > > Well, there is another, less hackish approach that Simon's post made me > > think of. Just add metadata to your "meta" transactions which close out > > the previous year: > > > > ; Type: Closing Transaction > >

Re: Excluding some transactions if a file is included

2010-04-04 Thread Martin Michlmayr
* John Wiegley [2010-04-02 14:38]: > Well, there is another, less hackish approach that Simon's post made me think > of. Just add metadata to your "meta" transactions which close out the > previous year: > > ; Type: Closing Transaction > > Then you can filter out such transactions by adding

Re: Excluding some transactions if a file is included

2010-04-02 Thread John Wiegley
On Apr 2, 2010, at 2:12 PM, Martin Michlmayr wrote: > I agree that this "meta" file approach would work but it seems a bit > like a hack to me. Don't you think the "ifdef" logic I suggested > would be useful? Well, there is another, less hackish approach that Simon's post made me think of. Jus

Re: Excluding some transactions if a file is included

2010-04-02 Thread Martin Michlmayr
* John Wiegley [2010-04-02 14:08]: > Usually the way I solve scenarios like this is with a "meta" file. > For example, you have two files: year2009.ledger and > year2010.ledger. Then you have a file allyears.ledger, which > includes them all, and also "only2009.ledger", which includes > year2009.

Re: Excluding some transactions if a file is included

2010-04-02 Thread Simon Michael
I have the same issue (your second use case). I was thinking the thing to do is have a close-out transaction at the end of the year, that zeroes out all accounts (that you have opening balances for in the next year). And when reporting, you may have to remember to exclude that close-out txn.

Re: Excluding some transactions if a file is included

2010-04-02 Thread John Wiegley
On Apr 2, 2010, at 2:02 PM, Martin Michlmayr wrote: > Does ledge have some "ifdef" like capability that would allow me to > exclude certain transactions if a given file is included? Usually the way I solve scenarios like this is with a "meta" file. For example, you have two files: year2009.ledg

Excluding some transactions if a file is included

2010-04-02 Thread Martin Michlmayr
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" a