From 7cea2d3d77e62a25e6d93b07053f64798c886646 Mon Sep 17 00:00:00 2001 From: HarryPaulo Date: Tue, 2 Apr 2024 09:50:30 -0300 Subject: [PATCH] fix: wrong value for total amount in payments --- erpnext/accounts/doctype/pos_invoice/pos_invoice.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/accounts/doctype/pos_invoice/pos_invoice.py b/erpnext/accounts/doctype/pos_invoice/pos_invoice.py index f9d52290f80..045b5734998 100644 --- a/erpnext/accounts/doctype/pos_invoice/pos_invoice.py +++ b/erpnext/accounts/doctype/pos_invoice/pos_invoice.py @@ -440,6 +440,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)) -- GitLab