From 45ff8fa296b47c809ecb643a4b67fc775d9e9848 Mon Sep 17 00:00:00 2001 From: Vishakh Desai Date: Wed, 11 Sep 2024 14:21:48 +0530 Subject: [PATCH] fix: set party_type null when payment_type is changed to Internal Transfer (cherry picked from commit 502cf0eb8d8001925b5c00583083a8f29a2d2115) --- .../accounts/doctype/payment_entry/payment_entry.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.js b/erpnext/accounts/doctype/payment_entry/payment_entry.js index b50dcd217e7c..f46c782112c5 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.js +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.js @@ -385,7 +385,15 @@ frappe.ui.form.on("Payment Entry", { payment_type: function (frm) { if (frm.doc.payment_type == "Internal Transfer") { $.each( - ["party", "party_balance", "paid_from", "paid_to", "references", "total_allocated_amount"], + [ + "party", + "party_type", + "party_balance", + "paid_from", + "paid_to", + "references", + "total_allocated_amount", + ], function (i, field) { frm.set_value(field, null); }