diff --git a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.js b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.js index 93f52d6ec42..4beb17d7cf6 100644 --- a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.js +++ b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.js @@ -16,6 +16,14 @@ erpnext.buying.SupplierQuotationController = class SupplierQuotationController e return !doc.qty && me.frm.doc.has_unit_price_items ? "yellow" : ""; }); + this.frm.set_query("warehouse", "items", (doc, cdt, cdn) => { + return { + filters: { + company: doc.company, + is_group: 0, + }, + }; + }); super.setup(); } diff --git a/erpnext/selling/doctype/quotation/quotation.js b/erpnext/selling/doctype/quotation/quotation.js index 480ca04b6a9..bb82310d9c5 100644 --- a/erpnext/selling/doctype/quotation/quotation.js +++ b/erpnext/selling/doctype/quotation/quotation.js @@ -36,6 +36,15 @@ frappe.ui.form.on("Quotation", { }; }); + frm.set_query("warehouse", "items", (doc, cdt, cdn) => { + return { + filters: { + company: doc.company, + is_group: 0, + }, + }; + }); + frm.set_indicator_formatter("item_code", function (doc) { return !doc.qty && frm.doc.has_unit_price_items ? "yellow" : ""; });