Round unbalanced remainders before reporting them, because that will make a
whole lot more sense to the user, rather than reporting the internal precision.
This commit is contained in:
parent
595452e332
commit
c673b96691
1 changed files with 3 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue