always set the company from the POS Profile
This commit is contained in:
parent
e8e3fb175d
commit
c2ed03f77a
@ -488,16 +488,15 @@ erpnext.pos.PointOfSale = class PointOfSale {
|
||||
}
|
||||
|
||||
setup_company() {
|
||||
this.company = frappe.sys_defaults.company;
|
||||
return new Promise(resolve => {
|
||||
if(!this.company) {
|
||||
if(!frappe.sys_defaults.company) {
|
||||
frappe.prompt({fieldname:"company", options: "Company", fieldtype:"Link",
|
||||
label: __("Select Company"), reqd: 1}, (data) => {
|
||||
this.company = data.company;
|
||||
resolve(this.company);
|
||||
}, __("Select Company"));
|
||||
} else {
|
||||
resolve(this.company);
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -551,7 +550,9 @@ erpnext.pos.PointOfSale = class PointOfSale {
|
||||
}
|
||||
|
||||
set_pos_profile_data() {
|
||||
this.frm.doc.company = this.company;
|
||||
if (this.company) {
|
||||
this.frm.doc.company = this.company;
|
||||
}
|
||||
|
||||
return new Promise(resolve => {
|
||||
return this.frm.call({
|
||||
|
Loading…
x
Reference in New Issue
Block a user