From 61165127fcba1c62f2d568a7a94aa818bb992a03 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Tue, 2 May 2017 13:04:08 +0530 Subject: [PATCH] [fix] Default pos profile's customer not working for the POS --- erpnext/accounts/page/pos/pos.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/erpnext/accounts/page/pos/pos.js b/erpnext/accounts/page/pos/pos.js index 70067614b6..9c195f9512 100644 --- a/erpnext/accounts/page/pos/pos.js +++ b/erpnext/accounts/page/pos/pos.js @@ -327,6 +327,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({ this.name = null; this.load_data(true); this.setup(); + this.set_default_customer() }, load_data: function (load_doc) { @@ -360,6 +361,16 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({ } }, + set_default_customer: function() { + if (this.default_customer && !this.frm.doc.customer) { + this.party_field.$input.val(this.default_customer); + this.frm.doc.customer = this.default_customer; + this.numeric_keypad.show(); + this.toggle_list_customer(false) + this.toggle_item_cart(true) + } + }, + set_transaction_defaults: function (party) { var me = this; this.party = party; @@ -675,11 +686,6 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({ me.toggle_delete_button(); } - if (this.default_customer && !this.frm.doc.customer) { - this.party_field.$input.val(this.default_customer); - this.frm.doc.customer = this.default_customer; - } - this.party_field.awesomeplete = new Awesomplete(this.party_field.$input.get(0), { minChars: 0,