Warehouse based on selected Company

This commit is contained in:
Kanchan Chauhan 2016-10-22 21:42:28 +05:30
parent 44e9195378
commit 55106ab66b

View File

@ -7,7 +7,13 @@ frappe.ui.form.on('Material Request', {
onload: function(frm) {
// formatter for material request item
frm.set_indicator_formatter('item_code',
function(doc) { return (doc.qty<=doc.ordered_qty) ? "green" : "orange" })
function(doc) { return (doc.qty<=doc.ordered_qty) ? "green" : "orange" }),
frm.fields_dict["items"].grid.get_field("warehouse").get_query = function(doc, cdt, cdn){
return{
filters: {'company': doc.company}
}
}
}
});