Skip to content

Commit

Permalink
Merge pull request #43342 from frappe/mergify/bp/version-14-hotfix/pr…
Browse files Browse the repository at this point in the history
…-43253

fix: partial return on POS invoice (backport #43253)
  • Loading branch information
Nihantra-Patel authored Sep 23, 2024
2 parents 43ba79f + 5ce4dae commit 5ba9fb7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion erpnext/accounts/doctype/pos_invoice/pos_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ def validate_payment_amount(self):
if self.is_return and entry.amount > 0:
frappe.throw(_("Row #{0} (Payment Table): Amount must be negative").format(entry.idx))

if self.is_return:
if self.is_return and self.docstatus != 0:
invoice_total = self.rounded_total or self.grand_total
if total_amount_in_payments and total_amount_in_payments < invoice_total:
frappe.throw(_("Total payments amount can't be greater than {}").format(-invoice_total))
Expand Down

0 comments on commit 5ba9fb7

Please sign in to comment.