Merge pull request #33098 from ssiyad/fix/pos/warehouse_selection

fix(pos): warehouse selection
This commit is contained in:
Deepesh Garg 2022-11-29 10:15:31 +05:30 committed by GitHub
commit 8253f4379f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,16 +14,27 @@ erpnext.selling.POSInvoiceController = class POSInvoiceController extends erpnex
company() {
erpnext.accounts.dimensions.update_dimension(this.frm, this.frm.doctype);
this.frm.set_value("set_warehouse", "");
this.frm.set_value("taxes_and_charges", "");
}
onload(doc) {
super.onload();
this.frm.ignore_doctypes_on_cancel_all = ['POS Invoice Merge Log', 'POS Closing Entry'];
if(doc.__islocal && doc.is_pos && frappe.get_route_str() !== 'point-of-sale') {
this.frm.script_manager.trigger("is_pos");
this.frm.refresh_fields();
}
this.frm.set_query("set_warehouse", function(doc) {
return {
filters: {
company: doc.company ? doc.company : '',
}
}
});
erpnext.accounts.dimensions.setup_dimension_filters(this.frm, this.frm.doctype);
}