14848: ELSE
14849: /*Bug#7139549 check if the lot exists but it is a pending product lot */
14850:
14851: SELECT count(1) into l_lot_onhand
14852: FROM mtl_onhand_quantities_detail
14853: WHERE INVENTORY_ITEM_ID = p_inventory_item_id
14854: AND ORGANIZATION_ID = p_organization_id
14855: AND lot_number = p_lot_number
14856: AND PRIMARY_TRANSACTION_QUANTITY > 0