Hello.  I'm new to accounting, ledger and this mailing list :-)  So far I'm
finding it all fascinating!  Thank you very much for such a great piece of
software.  Like many people, I tried out GnuCash and would have stuck with
it except that a friend suggested that I try Ledger.  I am now convinced
that CLI accounting is the only sane way of doing it.

Anyway, I ran into a problem that I think might be a bug/feature deficiency
in Ledger.  First I will describe something that works currently and then
modify it to show my problem.  I am using the example of buying and selling
houses in Peter Slinger's tutorial on currency trading accounts.

01/01 Opening Balance
  Assets:CAD         CAD 500000
  Capital

02/01 Buy House A
  Assets:HOU         HOU 1 @ CAD 100000
  Assets:CAD

03/01 Buy House B
  Assets:HOU         HOU 1 @ CAD 120000
  Assets:CAD

As you can see, I start with $500,000 and buy one house for $100,000 and
the other for $120,000.  I can sell the house and realize the capital gains
with:

05/01 Sell House A
  Assets:HOU            -HOU 1
  Assets:CAD             CAD 105000
  Income:Gains          -CAD 5000

I was impressed that Ledger even figures out the cost of the house and
removes the correct lot price when I inspect the balance with
--lot-prices!  So far so good.

But let's say that someone wants to buy my house for USD.  Ideally I would
like this to work

05/01 Sell House A
  Assets:HOU            -HOU 1
  Assets:CAD             USD 100000 @ CAD 1.05
  Income:Gains          -CAD 5000

Unfortunately, this does not balance.  Even the following does not balance:

05/01 Sell House A
  Assets:HOU            -HOU 1 {CAD 100000}
  Assets:CAD             USD 100000 @ CAD 1.05
  Income:Gains          -CAD 5000

The only thing that appears to work is:

05/01 Sell House A
  Assets:HOU            -HOU 1 {CAD 100000} @@ USD 100000
  Assets:CAD             USD 100000 @ CAD 1.05
  Income:Gains          -CAD 5000

(at which point you can let Ledger calculate the Income:Gains).

I'm guessing this is a bug.  I often have to deal with multiple currencies
and I have to buy one with the other.  For example, my main currency is
JPY, but I have CAD, GBP and EUR and will buy GBP with CAD or EUR with GBP,
for example.  As I am new to accounting, it's very possible I am
misunderstanding how I should calculate capital gains.  Does anyone one
else do this?

Mike

-- 

--- 
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.

Reply via email to