Patch for fixing floating point issue in gl entry

This commit is contained in:
Nabin Hait 2012-11-30 19:40:37 +05:30
parent 8b9f4ffcfc
commit 995b5c617b
2 changed files with 7 additions and 0 deletions

View File

@ -141,6 +141,9 @@ class DocType:
# ----------------
def save_entries(self, cancel, adv_adj, update_outstanding):
for le in self.entries:
# round off upto 2 decimal
le.debit, le.credit = round(le.debit, 2), round(le.credit, 2)
#toggle debit, credit if negative entry
if flt(le.debit) < 0 or flt(le.credit) < 0:
tmp=le.debit

View File

@ -701,4 +701,8 @@ patch_list = [
'patch_module': 'patches.november_2012',
'patch_file': 'production_order_patch',
},
{
'patch_module': 'patches.november_2012',
'patch_file': 'gle_floating_point_issue',
},
]