Merge pull request #5908 from nabinhait/pe_precision_fix

Set difference amount in Payment Entry as per field precision
This commit is contained in:
Nabin Hait 2016-07-28 17:51:57 +05:30 committed by GitHub
commit 33b10a0405

View File

@ -267,6 +267,8 @@ class PaymentEntry(AccountsController):
if d.amount: if d.amount:
self.difference_amount -= flt(d.amount) self.difference_amount -= flt(d.amount)
self.difference_amount = flt(self.difference_amount, self.precision("difference_amount"))
def clear_unallocated_reference_document_rows(self): def clear_unallocated_reference_document_rows(self):
self.set("references", self.get("references", {"allocated_amount": ["not in", [0, None, ""]]})) self.set("references", self.get("references", {"allocated_amount": ["not in", [0, None, ""]]}))