On Fri, Jan 22, 2021 at 01:17:23AM -0800, henry wrote in <[email protected]>:
Say I have an entry in ledger.dat like this

2021/01/20 stocks
   Assets:Brokerage
   Assets:Bank:Checking           30 "XXX" @ €100.00

Then the output of  `ledger bal bank:checking' will be 3000€
With this entry in my price-db file

P 2021-01-20  XXX       €100.00

It will be the same. But when the share value changes some days later and I
add a new entry
to the price-db file

P 2021-01-22  XXX       €200.00

from then on the bank account amount changes retroactively to 6000€. Which
would be great anyway, but it does not mirror the current situation, since
I sold
the shares and want the price to be set for the day of the sale.

Hi Henry,

I think the problem here is that you are putting 30 XXX's into your checking
account. That is not what you want, you no longer have XXX's, but you have the
monetary value of them instead.

Do you get the expected result with a booking more like this?:

2021/01/20 stocks
    Assets:Bank:Checking                      €3000.00
    Assets:Brokerage              -30 "XXX" @  €100.00

--

--- 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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ledger-cli/YAv9qf80FME/9wXq%40settler.

Reply via email to