summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaria <tuy_mearly@aleeas.com>2022-10-06 05:39:41 -0400
committerMartin Michlmayr <tbm@cyrius.com>2022-10-11 01:13:41 +0200
commit6cf04c38d21150153cd636be1325b0b204797d06 (patch)
treebdbe6350b999f77aa04cb5b09f40de87c525c521 /src
parent7cfc585deb5877c558f150a2fa90cfe5c705fcbb (diff)
downloadfork-ledger-6cf04c38d21150153cd636be1325b0b204797d06.tar.gz
fork-ledger-6cf04c38d21150153cd636be1325b0b204797d06.tar.bz2
fork-ledger-6cf04c38d21150153cd636be1325b0b204797d06.zip
Fix balancing commodity with smaller unit.
Diffstat (limited to 'src')
-rw-r--r--src/xact.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/xact.cc b/src/xact.cc
index 749eb3e5..0c7f65a1 100644
--- a/src/xact.cc
+++ b/src/xact.cc
@@ -265,7 +265,7 @@ bool xact_base_t::finalize()
DEBUG("xact.finalize", "per_unit_cost = " << per_unit_cost);
foreach (post_t * post, posts) {
- const amount_t& amt(post->amount);
+ const amount_t& amt(post->amount.reduced());
if (post->must_balance() && amt.commodity() == comm) {
balance -= amt;