Thanks for the explanation, Martin. The lot dates are already inferred from the transaction. I wonder why would the cost not be inferred from the price, either. It would be a shortcut of convenience.
On Friday, 9 May 2025 at 9:42:27 am UTC+2 [email protected] wrote: > * 'Alen Šiljak' via Beancount <[email protected]> [2025-05-04 > 05:49]: > > During the migration, I have identified a record that causes problems > and I > > don't really understand why. > > > 2013-02-25 txn "Buy BYE" > > Assets:Investments:Shares:BYE 10595 BYE @ 0.47 YEN > > Expenses:Commissions 19.95 YEN > > Assets:Investments:Cash -4999.60 YEN > > Stefano already answered your question but just to expand a bit. > > Ledger treats costs ({...}) and prices (@ ...) as very similar whereas > there's an explicit difference in beancount. > > So if we take your transaction: > > 2013-02-25 * "Buy BYE" > Assets:Investments:Shares:BYE 10595 BYE @ 0.47 YEN > Expenses:Commissions 19.95 YEN > Assets:Investments:Cash -4999.60 YEN > > If you look at the ledger balance report with --lots, you'll see that > ledger added a cost: > > ledger -f a1 bal :bye --lots > 10595 BYE {0.47 YEN} [2013-02-25] Assets:Investments:Shares:BYE > > But this is not how it works in beancount. You need to specify a cost > explicitly if you want one -- in many cases (e.g. cash / currencies) I > won't want FOO @ BAR to create a cost (ledger "lot). > > People are often not aware of this in ledger-land because ledger > allows you to remove a lot that doesn't exist (*); which beancount > wisely doesn't allow. > > (*) You only see the mess if you look at it with "bal --ledger". > > -- > Martin Michlmayr > https://www.cyrius.com/ > -- You received this message because you are subscribed to the Google Groups "Beancount" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/beancount/6658f55b-f3fc-4909-ba05-3b02e3876b20n%40googlegroups.com.
