13966: ELSE
13967: -- It however remains same for LPNs
13968: SELECT COUNT(*)
13969: INTO x_lot_num_lov_count
13970: FROM mtl_onhand_quantities_detail moq, mtl_lot_numbers_all_v mln, mtl_transaction_lots_temp mtlt, wms_lpn_contents wlc
13971: WHERE mln.organization_id = p_organization_id
13972: AND mln.inventory_item_id = p_item_id
13973: AND mln.lot_number LIKE(p_lot_number || '%')
13974: AND moq.lot_number = mln.lot_number
14004: IF (p_lpn_id IS NULL
14005: OR p_lpn_id = 0) THEN
14006: SELECT COUNT(*)
14007: INTO x_lot_num_lov_count
14008: FROM mtl_onhand_quantities_detail moq, mtl_lot_numbers_all_v mln, mtl_transaction_lots_temp mtlt
14009: WHERE mln.organization_id = p_organization_id
14010: AND mln.inventory_item_id = p_item_id
14011: AND mln.lot_number LIKE(p_lot_number || '%')
14012: AND moq.lot_number = mln.lot_number
14033: ) = 'Y';
14034: ELSE
14035: SELECT COUNT(*)
14036: INTO x_lot_num_lov_count
14037: FROM mtl_onhand_quantities_detail moq, mtl_lot_numbers_all_v mln, mtl_transaction_lots_temp mtlt, wms_lpn_contents wlc
14038: WHERE mln.organization_id = p_organization_id
14039: AND mln.inventory_item_id = p_item_id
14040: AND mln.lot_number LIKE(p_lot_number || '%')
14041: AND moq.lot_number = mln.lot_number