Merge pull request #40951 from frappe/mergify/bp/version-15-hotfix/pr-40833

fix: wrong value for total amount in payments (backport #40833)
This commit is contained in:
Nabin Hait
2024-04-11 11:12:07 +05:30
committed by GitHub

View File

@@ -441,6 +441,7 @@ class POSInvoice(SalesInvoice):
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))