always set the company from the POS Profile
This commit is contained in:
parent
f7a83cb4f5
commit
4324f43a06
@ -446,16 +446,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();
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -509,7 +508,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