Merge pull request #8651 from rohitwaghchaure/pos_default_customer_issue
[fix] Default pos profile's customer not working for the POS
This commit is contained in:
commit
8811cc6b5b
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user