-- To calculate the prorate quantity for the last line
IF c_positive_onhand%ROWCOUNT =
l_child_items.total_rows
THEN
l_prorate_qty :=
l_prorate_qty
+ (l_order_qty - (l_qty_temp + l_excl_temp));
END IF;