From c084a060be4d9aa19cabcd5558a8400cf47cee11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernd=20Oliver=20S=C3=BCnderhauf?= <46800703+bosue@users.noreply.github.com> Date: Sat, 11 Nov 2023 11:13:51 +0100 Subject: [PATCH] fix: Always recalculate payment amounts when there is a payment schedule. --- erpnext/controllers/accounts_controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index a19e5259f973..c258a58b9787 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -1941,7 +1941,7 @@ def set_payment_schedule(self): ) self.append("payment_schedule", data) - if not automatically_fetch_payment_terms: + if self.get("payment_schedule"): for d in self.get("payment_schedule"): if d.invoice_portion: d.payment_amount = flt(