402: l_batch_qty := l_so_line_rec.ordered_quantity - l_total_primary_rsv_qty;
403: ELSE
404: /* Align the UOM to match the order line */
405: l_res_qty_so_um :=
406: inv_convert.inv_um_convert(l_so_line_rec.inventory_item_id,
407: null,
408: l_so_line_rec.ship_from_org_id,
409: 5,
410: l_total_primary_rsv_qty,
534: END IF;
535: /* Deduct any ATR from the manufacture qty */
536: /* Convert atr quantity into Orderline UOM */
537: IF l_so_line_rec.order_quantity_uom <> l_primary_uom_code THEN
538: l_atr_qty_in_so_um := inv_convert.inv_um_convert(l_so_line_rec.inventory_item_id,
539: null,
540: l_so_line_rec.ship_from_org_id,
541: 5,
542: l_atr,
691: IF (g_debug <= gme_debug.g_log_statement) THEN
692: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' analyse auto lot generation'||l_mto_rules_rec.auto_lot_generation);
693: END IF;
694: IF l_item_rec.SECONDARY_UOM_CODE is not null then
695: l_batch_qty2 := inv_convert.inv_um_convert(l_so_line_rec.inventory_item_id,
696: null,
697: l_so_line_rec.ship_from_org_id,
698: 5,
699: l_batch_qty,