Skip to content

Commit

Permalink
fix (pos closing entry): validation for 100 pc discount on pos invoic…
Browse files Browse the repository at this point in the history
…e (backport #44899) (#44930)

fix (pos closing entry): validation for 100 pc discount on pos invoice (#44899)

(cherry picked from commit cfcc24a)

Co-authored-by: Diptanil Saha <50792171+diptanilsaha@users.noreply.github.com>
  • Loading branch information
mergify[bot] and diptanilsaha authored Dec 30, 2024
1 parent 7dd2b0c commit 40f46b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion erpnext/accounts/doctype/sales_invoice/sales_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ def validate_pos_return(self):
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):
Expand Down

0 comments on commit 40f46b7

Please sign in to comment.