Skip to content

Commit 495ab6c

Browse files
fix: backflush raw material based on - Material Transferred for Manufacture
Hi @nabinhait , Issue : Manufacturing setting > Backflush Raw Material Based on “Material Transferred for Manufacture” doesn't fetch the actual raw material transferred qty. It fetches qty based on "BOM" The issue is because @creamdory in PR #frappe#13384 commit : https://github.com/frappe/erpnext/pull/13384/files#diff-91f0ed661ef4b6e1f167fc7961b1a79b ``` changed from: if trans_qty and manufacturing_qty >= (produced_qty + flt(self.fg_completed_qty)): to : if trans_qty and manufacturing_qty > (produced_qty + flt(self.fg_completed_qty)): ``` **'='** was added by her in the condition, which was not there before her commit. Kindly except the fix for the issue. https://github.com/frappe/erpnext/blob/develop/erpnext/stock/doctype/stock_entry/stock_entry.py#L1057 frappe#13384 https://github.com/frappe/erpnext/pull/13384/files#diff-91f0ed661ef4b6e1f167fc7961b1a79b **before fix gif** : Stock Entry = Manufacture shows raw material quantity as per BOM. ![FetchTransQtyError](https://user-images.githubusercontent.com/29812965/74123824-ffdd8600-4bf5-11ea-8873-95de24a7ef09.gif) **after fix gi**f : Stock Entry = "Manufacture" shows raw material quantity as per "Material Transfer for Manufacture". ![FetchTransQtyFix](https://user-images.githubusercontent.com/29812965/74123836-0c61de80-4bf6-11ea-86fb-d9619fd9b02b.gif)
1 parent 0e396a6 commit 495ab6c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

erpnext/stock/doctype/stock_entry/stock_entry.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1056,7 +1056,7 @@ def get_transfered_raw_materials(self):
10561056
req_qty_each = flt(req_qty / manufacturing_qty)
10571057
consumed_qty = flt(req_items[0].consumed_qty)
10581058

1059-
if trans_qty and manufacturing_qty >= (produced_qty + flt(self.fg_completed_qty)):
1059+
if trans_qty and manufacturing_qty > (produced_qty + flt(self.fg_completed_qty)):
10601060
if qty >= req_qty:
10611061
qty = (req_qty/trans_qty) * flt(self.fg_completed_qty)
10621062
else:

0 commit comments

Comments
 (0)