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 cfcc24a341)

Co-authored-by: Diptanil Saha <50792171+diptanilsaha@users.noreply.github.com>
This commit is contained in:
mergify[bot]
2024-12-30 13:58:58 +05:30
committed by GitHub
parent 7dd2b0c189
commit 40f46b76fa

View File

@@ -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):