Merge pull request #6684 from KanchanChauhan/warehouse-based-on-company-MR

Warehouse based on selected Company
This commit is contained in:
Nabin Hait 2016-10-24 11:09:42 +05:30 committed by GitHub
commit 0e75956f81

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}
}
}
}
});