fix: debit credit difference case with rounding adjustment

(cherry picked from commit ad2c64f3ff)
This commit is contained in:
Saqib Ansari
2022-03-01 13:32:34 +05:30
committed by mergify-bot
parent 40c0f79291
commit d93a41e0d0
2 changed files with 51 additions and 1 deletions

View File

@@ -221,7 +221,7 @@ def make_round_off_gle(gl_map, debit_credit_diff, precision):
debit_credit_diff += flt(d.credit)
round_off_account_exists = True
if round_off_account_exists and abs(debit_credit_diff) <= (1.0 / (10**precision)):
if round_off_account_exists and abs(debit_credit_diff) < (1.0 / (10**precision)):
gl_map.remove(round_off_gle)
return