mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-23 15:09:20 +00:00
* refactor: add supplier filter in buying
(cherry picked from commit 108b108d64)
# Conflicts:
# erpnext/public/js/controllers/buying.js
* chore: resolve conflicts
---------
Co-authored-by: manikandan-s-18 <manikandansundar18@gmail.com>
Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
This commit is contained in:
@@ -17,7 +17,17 @@ erpnext.buying = {
|
|||||||
this.setup_queries(doc, cdt, cdn);
|
this.setup_queries(doc, cdt, cdn);
|
||||||
super.onload();
|
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 {
|
return {
|
||||||
filters: {
|
filters: {
|
||||||
"shipping_rule_type": "Buying"
|
"shipping_rule_type": "Buying"
|
||||||
|
|||||||
Reference in New Issue
Block a user