Strange assertion error

7 views
Skip to first unread message

Ivan Popovych

unread,
Jan 5, 2024, 1:36:05 AMJan 5
to hle...@googlegroups.com
My hledger --version is hledger 1.30.1, linux-x86_64

Not sure if this is a bug or I am just incorrectly writing my
transactions, I can open a bug ticket in github if it is a bug.

I noticed this at the end of the year when closing my balances that
there was one posting that was being reported as not balanced by
assertions even though it is balanced according what hledger reg -I and
hledger bal -I reports and after a few tries managed to reproduce it
down to following journal file:

2023-02-12 Withdraw
assets:cash:mono:saved:rent 400 UAH
equity:test

2023-06-17 Exchange
assets:cash:petty:saved:rent 4.00 EUR @@ 400 UAH
assets:cash:mono:saved:rent = 0 UAH

2023-12-31 closing balances
assets:cash:petty:saved:rent -4.00 EUR = 0.00 EUR
equity:opening/closing balances

When running hledger with this it reports balances as unbalanced.
Removing the currency from assertion in "closing balances" transaction
or removing assertion entirely from "Exchange" transaction removes the
error.

Simon Michael

unread,
Jan 5, 2024, 2:05:57 AMJan 5
to hledger
Hello.. hmm. I see it works in 1.29. I would guess it's caused by this change in 1.30:

- Balancing a transaction with a balance assignment now properly respects costs.

Related:

If you wouldn't mind, please do open an issue, it needs more investigation.


Reply all
Reply to author
Forward
0 new messages