From dede5e71bf562f43000bc88bad67688fb88f841e Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 28 Jul 2008 02:04:29 -0400 Subject: Corrected a bad rounding bug that affecting very small commodity entries. --- journal.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'journal.cc') diff --git a/journal.cc b/journal.cc index e3937b8b..638cce8b 100644 --- a/journal.cc +++ b/journal.cc @@ -259,13 +259,14 @@ bool entry_base_t::finalize() } } + balance.round(); + if (balance) { error * err = new balance_error("Entry does not balance", new entry_context(*this, "While balancing entry:")); DEBUG_PRINT("ledger.journal.unbalanced_remainder", "balance = " << balance); - balance.round(); err->context.push_front (new value_context(balance, "Unbalanced remainder is:")); throw err; -- cgit v1.2.3