From 5f0df33699d7dfef0b81051661c9c2cb249a018e Mon Sep 17 00:00:00 2001 From: "Nihantra C. Patel" <141945075+Nihantra-Patel@users.noreply.github.com> Date: Mon, 5 Aug 2024 15:45:49 +0530 Subject: [PATCH] fix: fetch overdue payments in dunning --- erpnext/accounts/doctype/sales_invoice/sales_invoice.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 4482831f60e0..a229ff900786 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -2653,6 +2653,7 @@ def postprocess_dunning(source, target): target.language = letter_text.get("language") # update outstanding + source.payment_schedule = [] if source.payment_schedule and len(source.payment_schedule) == 1: target.overdue_payments[0].outstanding = source.get("outstanding_amount")