Mirrored from https://github.com/davoodmehraban89/Aram.git
Synced Dec 3, 19:30 UTC
fix(finance): use exact Decimal context for per-account roll-forward check
davoodmehraban89 committed
Oct 31, 2026 at 06:50 UTC
ef3e1849dcee14ad52ddffe402606436d9d92c85
1 file changed
+1
-1
backend/src/aram_backend/trial_balance_diagnostic.py
+1
-1
@@ -150,7 +150,7 @@ def analyze_trial_balance(
150
_money(str(row[key])) for key in ("opening", "debit", "credit", "closing")
151
)
152
movement = _sum_exact([debit, -credit])
153
- if opening + movement != closing:
153
+ if _sum_exact([opening, movement, -closing]) != 0:
154
raise CoverageError("TRIAL_BALANCE_ROW_DELTA_INVALID")
155
if debit < 0 or credit < 0:
156
raise CoverageError("TRIAL_BALANCE_NEGATIVE_TURNOVER")