From 40f46b76fa748417bb4fe03a88e54b01eb0ab739 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 30 Dec 2024 13:58:58 +0530 Subject: [PATCH] fix (pos closing entry): validation for 100 pc discount on pos invoice (backport #44899) (#44930) fix (pos closing entry): validation for 100 pc discount on pos invoice (#44899) (cherry picked from commit cfcc24a3415f6a88b0c1988ad12a5cf2158ab8d9) Co-authored-by: Diptanil Saha <50792171+diptanilsaha@users.noreply.github.com> --- erpnext/accounts/doctype/sales_invoice/sales_invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index dc2b44e7527..cb501c1ffbc 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -507,7 +507,7 @@ class SalesInvoice(SellingController): frappe.throw(_("Total payments amount can't be greater than {}").format(-invoice_total)) def validate_pos_paid_amount(self): - if len(self.payments) == 0 and self.is_pos: + if len(self.payments) == 0 and self.is_pos and flt(self.grand_total) > 0: frappe.throw(_("At least one mode of payment is required for POS invoice.")) def check_if_consolidated_invoice(self):