From 277935be79ee59d479ab03c1f8cf601cb1a2b506 Mon Sep 17 00:00:00 2001 From: Fahim Ali Zain TP Date: Mon, 12 Feb 2018 11:59:07 +0530 Subject: [PATCH] Deduct Rejected Item's Raw materials in SubContracting (#12837) * Deduct Rejected Item's Raw materials in SubContracting frappe/erpnext#12752 * Travis Build Fix --- erpnext/controllers/buying_controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/buying_controller.py b/erpnext/controllers/buying_controller.py index 4b7b43cc19..b141455b19 100644 --- a/erpnext/controllers/buying_controller.py +++ b/erpnext/controllers/buying_controller.py @@ -218,7 +218,7 @@ class BuyingController(StockController): if not exists: rm = self.append(raw_material_table, {}) - required_qty = flt(flt(bom_item.qty_consumed_per_unit) * flt(item.qty) * + required_qty = flt(flt(bom_item.qty_consumed_per_unit) * (flt(item.qty) + getattr(item, 'rejected_qty', 0)) * flt(item.conversion_factor), rm.precision("required_qty")) rm.reference_name = item.name rm.bom_detail_no = bom_item.name