From c673b9669106412d75912124d16db5c975bb60bf Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 17 Jul 2008 20:51:28 -0400 Subject: Round unbalanced remainders before reporting them, because that will make a whole lot more sense to the user, rather than reporting the internal precision. --- journal.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/journal.cc b/journal.cc index 4b3da90c..e3937b8b 100644 --- a/journal.cc +++ b/journal.cc @@ -263,6 +263,9 @@ bool entry_base_t::finalize() 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