Merge pull request #16823 from jay-parikh/sales-return
fix: Python 3 Sales Invoice Return Validation "validate_pos"
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py
index 44c373f..62d8ffd 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py
@@ -529,8 +529,8 @@
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):