From fae90325d494407438d8895bad1633aa794c0692 Mon Sep 17 00:00:00 2001 From: AravindR97 Date: Fri, 13 Feb 2026 15:36:43 +0530 Subject: [PATCH] fix: Set grand total from expense claim in reference table rows --- .../doctype/payment_advice/payment_advice.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/payment_advice/payment_advice/doctype/payment_advice/payment_advice.js b/payment_advice/payment_advice/doctype/payment_advice/payment_advice.js index 6c36498..4009db9 100644 --- a/payment_advice/payment_advice/doctype/payment_advice/payment_advice.js +++ b/payment_advice/payment_advice/doctype/payment_advice/payment_advice.js @@ -325,6 +325,10 @@ frappe.ui.form.on('Payment Advice Reference', { (r) => { if (r) { + if (row.reference_doctype == "Expense Claim") { + frappe.model.set_value(cdt, cdn, 'amount', r.grand_total); + } + if (r.base_grand_total != null) { frappe.model.set_value(cdt, cdn, 'amount', r.base_grand_total); @@ -340,10 +344,6 @@ frappe.ui.form.on('Payment Advice Reference', { if (r.grand_total){ - if(row.reference_doctype == "Expense Claim"){ - frappe.model.set_value(cdt, cdn, 'amount', r.grand_total); - } - frappe.model.set_value(cdt, cdn, 'amount_in_currency', r.grand_total); if (r.outstanding_amount && r.outstanding_amount != null) { frappe.model.set_value(cdt, cdn, 'net_payable_amount_in_currency', r.outstanding_amount/r.conversion_rate);