Howdy!
I'm trying to automate a transaction. The below gives the expected
outcome, and it appears to balance as expected:
= %/inventory/
(Equity:$account) (-amount)
(Equity:USD) (market(amount))
2022/01/02 Interest
Assets:OBJ 1 OBJ @ $5.00 ; :inventory:
Income:OBJs $-5.00
1 OBJ Assets:OBJ
-1 OBJ Equity:Assets:OBJ
$5.00 Equity:USD
$-5.00 Income:OBJs
--------------------
0
But I need this to be a real transaction. However if I make it real, or
even if I use [balanced virtual accounts], I get an error that it doesn't
balance anymore:
= %/inventory/
Equity:$account (-amount)
Equity:USD (market(amount))
2022/01/02 Interest
Assets:OBJ 1 OBJ @ $5.00 ; :inventory:
Income:OBJs $-5.00
While parsing file "/Users/[...]/Documents/2022/Ledger/testfile.ledger",
line 7:
While balancing transaction from
"/Users/[...]/Documents/2022/Ledger/testfile.ledger", lines 5-7:
> 2022/01/02 Interest
> Assets:OBJ 1 OBJ @ $5.00 ; :inventory:
> Income:OBJs $-5.00
Unbalanced remainder is:
$5.00
-1 OBJ {$5.00} [2022/01/02]
Amount to balance against:
$10.00
While applying automated transaction from
"/Users/[...]/Documents/2022/Ledger/testfile.ledger", lines 1-3:
> = %/inventory/
> Equity:$account (-amount)
> Equity:USD (market(amount))
While extending transaction from
"/Users/[...]/Documents/2022/Ledger/testfile.ledger", lines 5-7:
> 2022/01/02 Interest
> Assets:OBJ 1 OBJ @ $5.00 ; :inventory:
> Income:OBJs $-5.00
Error: Transaction does not balance
This looks like a bug, but it's also possible I'm doing something broken
that shouldn't work.
Any suggestions on how this should be done?
--
---
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/24ce40bf-32d7-441a-8762-2d0cc8a1fe34n%40googlegroups.com.