mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-15 19:19:17 +00:00
Revert "refactor: add supplier filter in buying"
This commit is contained in:
@@ -71,6 +71,14 @@ erpnext.accounts.PurchaseInvoice = class PurchaseInvoice extends erpnext.buying.
|
|||||||
if (this.frm.doc.supplier && this.frm.doc.__islocal) {
|
if (this.frm.doc.supplier && this.frm.doc.__islocal) {
|
||||||
this.frm.trigger("supplier");
|
this.frm.trigger("supplier");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.frm.set_query("supplier", function () {
|
||||||
|
return {
|
||||||
|
filters: {
|
||||||
|
is_transporter: 0,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
refresh(doc) {
|
refresh(doc) {
|
||||||
|
|||||||
@@ -502,6 +502,17 @@ erpnext.buying.PurchaseOrderController = class PurchaseOrderController extends (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onload() {
|
||||||
|
super.onload();
|
||||||
|
this.frm.set_query("supplier", function () {
|
||||||
|
return {
|
||||||
|
filters: {
|
||||||
|
is_transporter: 0,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
get_items_from_open_material_requests() {
|
get_items_from_open_material_requests() {
|
||||||
erpnext.utils.map_current_doc({
|
erpnext.utils.map_current_doc({
|
||||||
method: "erpnext.stock.doctype.material_request.material_request.make_purchase_order_based_on_supplier",
|
method: "erpnext.stock.doctype.material_request.material_request.make_purchase_order_based_on_supplier",
|
||||||
|
|||||||
@@ -17,16 +17,6 @@ erpnext.buying = {
|
|||||||
this.setup_queries(doc, cdt, cdn);
|
this.setup_queries(doc, cdt, cdn);
|
||||||
super.onload();
|
super.onload();
|
||||||
|
|
||||||
if (["Purchase Order", "Purchase Receipt", "Purchase Invoice"].includes(this.frm.doctype)) {
|
|
||||||
this.frm.set_query("supplier", function () {
|
|
||||||
return {
|
|
||||||
filters: {
|
|
||||||
is_transporter: 0,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
this.frm.set_query("shipping_rule", function () {
|
this.frm.set_query("shipping_rule", function () {
|
||||||
return {
|
return {
|
||||||
filters: {
|
filters: {
|
||||||
|
|||||||
@@ -199,6 +199,17 @@ erpnext.stock.PurchaseReceiptController = class PurchaseReceiptController extend
|
|||||||
super.setup(doc);
|
super.setup(doc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onload() {
|
||||||
|
super.onload();
|
||||||
|
this.frm.set_query("supplier", function () {
|
||||||
|
return {
|
||||||
|
filters: {
|
||||||
|
is_transporter: 0,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
refresh() {
|
refresh() {
|
||||||
var me = this;
|
var me = this;
|
||||||
super.refresh();
|
super.refresh();
|
||||||
|
|||||||
Reference in New Issue
Block a user