On May 15, 12:31 am, John Wiegley <[email protected]> wrote:
> This is not correct.  It shouldn't matter where a transaction came  
> from, if you are using the -S flag.  What version of Ledger is this?

Using Ledger 2.6.1 from the Ubuntu Jaunty repository.

Ledger does correctly sort the sample files that I just cooked up, but
for some reason, it doesn't work with the "real" files that I created
at home.  Might I have entered 2008 instead of 2009?  Will see later
tonight when I get home.

a.ledger:

2009/05/01 Opening balance
        Assets:Cash                     $100
        Equity:Opening Balances

2009/05/10 IGA
        Assets:Cash
        Expenses:Food                   $10

2009/05/13 Deposit
        Assets:Bank                     $10
        Assets:Cash

b.ledger:

2009/05/05 Opening balance
        Assets:Bank                     $200
        Equity:Opening Balances

2009/05/11 Withdrawal
        Assets:Cash                     $50
        Assets:Bank

2009/05/15 Withdrawal
        Assets:Cash                     $20
        Assets:Bank

master.ledger:

!include a.ledger
!include b.ledger

$ ledger --file master.ledger --sort d

2009/05/01 Opening balance
    Assets:Cash                                 $100
    Equity:Opening Balances

2009/05/05 Opening balance
    Assets:Bank                                 $200
    Equity:Opening Balances

2009/05/10 IGA
    Assets:Cash                                 $-10
    Expenses:Food

2009/05/11 Withdrawal
    Assets:Cash                                  $50
    Assets:Bank

2009/05/13 Deposit
    Assets:Bank                                  $10
    Assets:Cash

2009/05/15 Withdrawal
    Assets:Cash                                  $20
    Assets:Bank

$ ledger --file master.ledger bal

                $290  Assets
               $-300  Equity
                 $10  Expenses

Derek

Reply via email to