Allow only submitted Blanket Order in PO/SO

This commit is contained in:
Kanchan Chauhan 2018-06-26 09:31:27 +05:30
parent f845e749f2
commit bddebb52d6
2 changed files with 10 additions and 3 deletions

View File

@ -25,11 +25,10 @@ frappe.ui.form.on("Purchase Order", {
frm.set_indicator_formatter('item_code',
function(doc) { return (doc.qty<=doc.received_qty) ? "green" : "orange" })
frm.set_query("reserve_warehouse", "supplied_items", function() {
frm.set_query("blanket_order", "items", function() {
return {
filters: {
"company": frm.doc.company,
"is_group": 0
"docstatus": 1
}
}
});

View File

@ -32,6 +32,14 @@ frappe.ui.form.on("Sales Order", {
}
});
frm.set_query("blanket_order", "items", function() {
return {
filters: {
"docstatus": 1
}
}
});
erpnext.queries.setup_warehouse_query(frm);
},