diff --git a/erpnext/accounts/page/pos/pos.js b/erpnext/accounts/page/pos/pos.js index 70067614b6b..9c195f95128 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,