From f0b9cb4019ff6a13fc2166f5023ecae9c4c65af3 Mon Sep 17 00:00:00 2001 From: Sugesh393 Date: Fri, 22 Nov 2024 11:36:57 +0530 Subject: [PATCH] fix: set price_list_currency only if it exists --- erpnext/public/js/controllers/transaction.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 97a98a78c27..f499b2c4c12 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -1914,8 +1914,14 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe callback: function(r) { if (!r.exc) { frappe.run_serially([ - () => me.frm.set_value("price_list_currency", r.message.parent.price_list_currency), - () => me.frm.set_value("plc_conversion_rate", r.message.parent.plc_conversion_rate), + () => { + if (r.message.parent.price_list_currency) + me.frm.set_value("price_list_currency", r.message.parent.price_list_currency); + }, + () => { + if (r.message.parent.plc_conversion_rate) + me.frm.set_value("plc_conversion_rate", r.message.parent.plc_conversion_rate); + }, () => { if(args.items.length) { me._set_values_for_item_list(r.message.children);