1119: GROUP BY cql.inventory_item_id
1120: UNION ALL
1121: SELECT moq.inventory_item_id,
1122: ROUND(SUM(NVL((moq.transaction_quantity * moq.item_cost),0)),2) onhand
1123: FROM mtl_onhand_qty_cost_v moq,
1124: mtl_parameters mp
1125: WHERE moq.organization_id = l_organization_id
1126: AND moq.organization_id = mp.organization_id
1127: AND mp.primary_cost_method = 1
1128: GROUP BY inventory_item_id;
1129: /* Commented on Oct 25th as the transaction value is not calculated right
1130: SELECT inventory_item_id,
1131: ROUND(SUM(NVL((transaction_quantity * item_cost),0)),2) onhand
1132: FROM mtl_onhand_qty_cost_v
1133: WHERE organization_id = l_organization_id
1134: GROUP BY inventory_item_id; */
1135:
1136: CURSOR OPEN_TRNS IS