Merge pull request #25531 from noahjacob/fix_mr_filter
fix: updated item filters for material request
This commit is contained in:
commit
1f4df80565
@ -433,13 +433,21 @@ erpnext.buying.MaterialRequestController = erpnext.buying.BuyingController.exten
|
||||
if (doc.material_request_type == "Customer Provided") {
|
||||
return{
|
||||
query: "erpnext.controllers.queries.item_query",
|
||||
filters:{ 'customer': me.frm.doc.customer }
|
||||
filters:{
|
||||
'customer': me.frm.doc.customer,
|
||||
'is_stock_item':1
|
||||
}
|
||||
}
|
||||
} else if (doc.material_request_type != "Manufacture") {
|
||||
} else if (doc.material_request_type == "Purchase") {
|
||||
return{
|
||||
query: "erpnext.controllers.queries.item_query",
|
||||
filters: {'is_purchase_item': 1}
|
||||
}
|
||||
} else {
|
||||
return{
|
||||
query: "erpnext.controllers.queries.item_query",
|
||||
filters: {'is_stock_item': 1}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user