From 0a36139ef4fc55543b00ec7fdaac494c4fc59402 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 20 May 2024 18:36:48 +0530 Subject: [PATCH] fix: convert invoice_portion value from str to float (backport #41485) (#41555) fix: convert invoice_portion value from str to float (#41485) (cherry picked from commit a1d489195d7ad3f3508948b0654d798fa2a90ff2) Co-authored-by: Nabin Hait --- erpnext/controllers/accounts_controller.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index c527a02376c..40ce8b6bc57 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -2183,10 +2183,10 @@ class AccountsController(TransactionBase): for d in self.get("payment_schedule"): if d.invoice_portion: d.payment_amount = flt( - grand_total * flt(d.invoice_portion / 100), d.precision("payment_amount") + grand_total * flt(d.invoice_portion) / 100, d.precision("payment_amount") ) d.base_payment_amount = flt( - base_grand_total * flt(d.invoice_portion / 100), d.precision("base_payment_amount") + base_grand_total * flt(d.invoice_portion) / 100, d.precision("base_payment_amount") ) d.outstanding = d.payment_amount elif not d.invoice_portion: