Fix Sales Invoice Return Validation "validate_pos"

This commit is contained in:
Jay Parikh 2019-03-02 12:19:32 +00:00
parent 9ce994a320
commit c2090939d7

View File

@ -523,8 +523,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):