>
>> 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.
>>
>
> Actually, that's not really what you would want the system to do, because
> that's ambiguous: which of the houses are you selling? The fact that Ledger
> does not fail on this is not reassuring to me. What you would want in this
> case is for the system to barf an error indicating that you need to
> disambiguate which of the HOU units you're selling: the one at 100000 CAD
> or the one at 120000 CAD?
>
> In fact, you might as well put any amount in the gains postings and Ledger
> will accept it; try putting 15000 instead:
>
> 05/01 Sell House A
>   Assets:HOU            -HOU 1
>   Assets:CAD             CAD 105000
>   Income:Gains          -CAD 15000
>
> Here are the balances I get
>
>
>
> ledger -f /Users/blais/tmp/charlton.ledger bal --lot-prices --no-color
>
>           385000 CAD
>
>   -1 HOU {90000 CAD}
>
>   1 HOU {100000 CAD}
>
>   1 HOU {120000 CAD}  Assets
>
>           385000 CAD    Bank
>
>   -1 HOU {90000 CAD}
>
>   1 HOU {100000 CAD}
>
>   1 HOU {120000 CAD}    House
>
>          -500000 CAD  Equity:Capital
>
>           -15000 CAD  Income:Gains
>
> --------------------
>
>          -130000 CAD
>
>   -1 HOU {90000 CAD}
>
>   1 HOU {100000 CAD}
>
>   1 HOU {120000 CAD}
>
>
>
> In the cases which aren't ambiguous, down the road, this will be allowed
> in Beancount:
>
> 2014-05-01 * "Sell House A"
>   Assets:House            -1 HOU {}
>   Assets:Bank         100000 USD @ 1.05 CAD
>   Income:Gains         -5000 CAD
> See this working doc for more detail:
> http://furius.ca/beancount/doc/proposal-inventory
>
>
I fat-fingered this one somewhat (sometimes I despise writing mail in a web
browser textarea on a laptop loosely hanging off my knees).

I also meant to add: notice how no error is issued in the Ledger example
with -15000 CAD in gains. This will only match the correct HOU unit if you
get your capital gains right.  This means if you make an error, it goes
unnoticed and you get funky inventory results (not only you still have both
houses, you're now "short" a house at a cost of 90000 CAD). Moreover,
unless you put the cost in yourself - and you better get it right - you
can't let it calculate the gains for you automatically.

The inventory booking method I enforced in Beancount firmly prevents this
mistake from occurring. Lot reductions _always_ must match existing
inventory. This is one of the main differences between our systems and this
example is illustrative of the kind of pitfalls I'm trying hard to prevent
users (and myself) from falling into. It's so, so easy to make small
numerical mistakes when entering data (and some data is inevitably entered
by hand in practice).

For more, read here:
https://docs.google.com/document/d/1dW2vIjaXVJAf9hr7GlZVe3fJOkM-MtlVjvCO1ZpNLmg/edit#heading=h.kqx4yya021of

-- 

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