always set the company from the POS Profile
diff --git a/erpnext/selling/page/point_of_sale/point_of_sale.js b/erpnext/selling/page/point_of_sale/point_of_sale.js
index 388605d..d1feab7 100644
--- a/erpnext/selling/page/point_of_sale/point_of_sale.js
+++ b/erpnext/selling/page/point_of_sale/point_of_sale.js
@@ -488,16 +488,15 @@
}
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 @@
}
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({