From 01254da4e06b6e0114ecfc56e89aacdf5bab027b Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2025 15:01:23 +0530 Subject: [PATCH] fix: update customer contact details on pos (backport #45071) (#45106) fix: update customer contact details on pos (#45071) * fix: update customer contact details on pos * refactor: removed console log statement (cherry picked from commit d79e5612484a547cbe6828476d60a87a815568fd) Co-authored-by: Diptanil Saha --- erpnext/selling/page/point_of_sale/pos_item_cart.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/erpnext/selling/page/point_of_sale/pos_item_cart.js b/erpnext/selling/page/point_of_sale/pos_item_cart.js index 325f7b258a9..28cb1aef339 100644 --- a/erpnext/selling/page/point_of_sale/pos_item_cart.js +++ b/erpnext/selling/page/point_of_sale/pos_item_cart.js @@ -928,10 +928,13 @@ erpnext.PointOfSale.ItemCart = class { const me = this; dfs.forEach((df) => { this[`customer_${df.fieldname}_field`] = frappe.ui.form.make_control({ - df: { ...df, onchange: handle_customer_field_change }, + df: df, parent: $customer_form.find(`.${df.fieldname}-field`), render_input: true, }); + this[`customer_${df.fieldname}_field`].$input?.on("blur", () => { + handle_customer_field_change.apply(this[`customer_${df.fieldname}_field`]); + }); this[`customer_${df.fieldname}_field`].set_value(this.customer_info[df.fieldname]); });