From b07620aacf8fe4e003e8f78bc445b161f27cefc0 Mon Sep 17 00:00:00 2001 From: barredterra <14891507+barredterra@users.noreply.github.com> Date: Thu, 16 Sep 2021 17:22:46 +0200 Subject: [PATCH] feat: child table triggers calculation of totals --- erpnext/accounts/doctype/dunning/dunning.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/erpnext/accounts/doctype/dunning/dunning.js b/erpnext/accounts/doctype/dunning/dunning.js index 5777583dee..ede5cf44b1 100644 --- a/erpnext/accounts/doctype/dunning/dunning.js +++ b/erpnext/accounts/doctype/dunning/dunning.js @@ -122,6 +122,12 @@ frappe.ui.form.on("Dunning", { dunning_fee: function (frm) { frm.trigger("calculate_totals"); }, + overdue_payments_add: function(frm) { + frm.trigger("calculate_totals"); + }, + overdue_payments_remove: function (frm) { + frm.trigger("calculate_totals"); + }, calculate_overdue_days: function (frm) { frm.doc.overdue_payments.forEach((row) => { if (frm.doc.posting_date && row.due_date) {