Skip to content

Commit

Permalink
fix: partial return on POS invoice
Browse files Browse the repository at this point in the history
  • Loading branch information
Nihantra-Patel committed Sep 17, 2024
1 parent e29e1e4 commit 76289fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions erpnext/accounts/doctype/pos_invoice/pos_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,8 +453,8 @@ def validate_payment_amount(self):
if self.is_return:
invoice_total = self.rounded_total or self.grand_total
total_amount_in_payments = flt(total_amount_in_payments, self.precision("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))
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))

def validate_company_with_pos_company(self):
if self.company != frappe.db.get_value("POS Profile", self.pos_profile, "company"):
Expand Down

0 comments on commit 76289fa

Please sign in to comment.