[fix] [minor] _round function - implement round halfs to nearest even number

This commit is contained in:
Anand Doshi
2013-08-19 19:58:23 +05:30
parent c46d044efe
commit 2e31e097fa
5 changed files with 12 additions and 12 deletions

View File

@@ -13,7 +13,7 @@ def execute():
where account = %s and voucher_type = 'Sales Invoice' and voucher_no = %s
and ifnull(is_cancelled, 'No') = 'No' limit 1""", (r.debit_to, r.name), as_dict=1)
if gle:
diff = round((flt(r.grand_total) - flt(gle[0]['debit'])), 2)
diff = flt((flt(r.grand_total) - flt(gle[0]['debit'])), 2)
if abs(diff) == 0.01:
# print r.name, r.grand_total, gle[0]['debit'], diff