diff --git a/erpnext/public/js/controllers/buying.js b/erpnext/public/js/controllers/buying.js index 8c0be8042ac..e0e68c37451 100644 --- a/erpnext/public/js/controllers/buying.js +++ b/erpnext/public/js/controllers/buying.js @@ -17,7 +17,17 @@ erpnext.buying = { this.setup_queries(doc, cdt, cdn); super.onload(); - this.frm.set_query('shipping_rule', function() { + 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 () { return { filters: { "shipping_rule_type": "Buying"