Merge pull request #2101 from nabinhait/hotfix
Required raw materials qty in PP tool
This commit is contained in:
commit
b748115609
@ -31,6 +31,16 @@ cur_frm.cscript.download_materials_required = function(doc, cdt, cdn) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
cur_frm.fields_dict['pp_so_details'].grid.get_field('sales_order').get_query = function(doc) {
|
||||||
|
var args = { "docstatus": 1 };
|
||||||
|
if(doc.customer) {
|
||||||
|
args["customer"] = doc.customer;
|
||||||
|
}
|
||||||
|
|
||||||
|
return { filters: args }
|
||||||
|
}
|
||||||
|
|
||||||
cur_frm.fields_dict['pp_details'].grid.get_field('item_code').get_query = function(doc) {
|
cur_frm.fields_dict['pp_details'].grid.get_field('item_code').get_query = function(doc) {
|
||||||
return erpnext.queries.item({
|
return erpnext.queries.item({
|
||||||
'is_pro_applicable': 'Yes'
|
'is_pro_applicable': 'Yes'
|
||||||
|
@ -276,7 +276,7 @@ class ProductionPlanningTool(Document):
|
|||||||
item_list.append([item, flt(item_details.qty) * so_qty[1], item_details.description,
|
item_list.append([item, flt(item_details.qty) * so_qty[1], item_details.description,
|
||||||
item_details.stock_uom, item_details.min_order_qty, so_qty[0]])
|
item_details.stock_uom, item_details.min_order_qty, so_qty[0]])
|
||||||
|
|
||||||
self.make_items_dict(item_list)
|
self.make_items_dict(item_list)
|
||||||
|
|
||||||
def make_items_dict(self, item_list):
|
def make_items_dict(self, item_list):
|
||||||
for i in item_list:
|
for i in item_list:
|
||||||
|
Loading…
Reference in New Issue
Block a user