Merge pull request #14676 from KanchanChauhan/allow-only-submitted-bo

Allow only submitted Blanket Order in PO/SO
This commit is contained in:
Manas Solanki 2018-06-26 11:46:23 +05:30 committed by GitHub
commit 7707cee6b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 3 deletions

View File

@ -25,11 +25,11 @@ 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,15 @@ frappe.ui.form.on("Sales Order", {
}
});
frm.set_query("blanket_order", "items", function() {
return {
filters: {
"company": frm.doc.company,
"docstatus": 1
}
}
});
erpnext.queries.setup_warehouse_query(frm);
},