fix: hide pending qty only if original item is assigned (#30599) (#30601)

(cherry picked from commit 8b090a9f7d)

Co-authored-by: Ankush Menat <ankush@frappe.io>
This commit is contained in:
mergify[bot]
2022-04-06 16:37:15 +05:30
committed by GitHub
parent 3fabc48744
commit 3c33a5e6ac

View File

@@ -607,8 +607,8 @@ function check_can_calculate_pending_qty(me) {
&& erpnext.stock.bom
&& erpnext.stock.bom.name === doc.bom_no;
const itemChecks = !!item
&& !item.allow_alternative_item
&& erpnext.stock.bom && erpnext.stock.items
&& !item.original_item
&& erpnext.stock.bom && erpnext.stock.bom.items
&& (item.item_code in erpnext.stock.bom.items);
return docChecks && itemChecks;
}