On Apr 28, 2010, at 7:52 AM, Peter Ross wrote:

> With the above the balance sheet and income and expense report don't
> match.  The balance sheet should change by the amount of profit earnt.

Ah, you need a bit more then:

D 1,000.00 AUD
D 1,000.00 EUR

2009/01/01 First sale
      Assets:Bank                              10000.00 AUD
      Income:Sales

2009/02/01 Marketing (1 EUR = 2.00 AUD)
      Expenses:Marketing                        2000.00 AUD
      Liabilities:Accounts Payable:EUR         -1000.00 EUR

2009/03/01 Pay Marketing Invoice (1 EUR = 1.95 AUD)
      Liabilities:Accounts Payable:EUR          1000.00 EUR {2 AUD}
      Assets:Bank                              -1950.00 AUD
      Income:Currency Exchange                   -50.00 AUD

The use of {2 AUD} matches up those particular EUR with the ones you received 
on 2/1, yielding a 50 capital gain which must be balanced (into Income in this 
case).  Now I get:

~ $ ledger -f /tmp/bug.dat bal assets
        8,050.00 AUD  Assets:Bank
~ $ ledger -f /tmp/bug.dat bal income expense
        2,000.00 AUD  Expenses:Marketing
      -10,050.00 AUD  Income
          -50.00 AUD    Currency Exchange
      -10,000.00 AUD    Sales
--------------------
       -8,050.00 AUD

John

Reply via email to