Merge pull request #16823 from jay-parikh/sales-return

fix: Python 3 Sales Invoice Return Validation "validate_pos"
This commit is contained in:
Rushabh Mehta 2019-03-05 08:05:00 +05:30 committed by GitHub
commit 1f0792d5ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -529,8 +529,8 @@ class SalesInvoice(SellingController):
def validate_pos(self):
if self.is_return:
if flt(self.paid_amount) + flt(self.write_off_amount) - flt(self.grand_total) < \
1/(10**(self.precision("grand_total") + 1)):
if flt(self.paid_amount) + flt(self.write_off_amount) - flt(self.grand_total) > \
1.0/(10.0**(self.precision("grand_total") + 1.0)):
frappe.throw(_("Paid amount + Write Off Amount can not be greater than Grand Total"))
def validate_item_code(self):