Index: branches/MSDB_2023_MS04/procedures/sp_create_n_order.sql =================================================================== diff -u -r252994 -r253211 --- branches/MSDB_2023_MS04/procedures/sp_create_n_order.sql (.../sp_create_n_order.sql) (revision 252994) +++ branches/MSDB_2023_MS04/procedures/sp_create_n_order.sql (.../sp_create_n_order.sql) (revision 253211) @@ -2,6 +2,7 @@ CREATE PROCEDURE "informix".sp_create_n_order( -- Order Creation Stored Procedure -- Modification History - +-- 113023 - CRM - MSAPP-1830 - Purchase Order Edit - NAPA order shows "Factory" instead of "Supersede" under column "Qty Order" -- 111623 - CRM - MSAPP-1798 - Updated DC_ONLY = Y to act as SU_ID = 0 (removed "and SU_ID = 1") -- 040323 - CRM - MSAPP 1625 - Added DC_ONLY = Y and SU_ID = 1 to act as SU_ID = 0 -- 020323 - CRM - TNSS-4884 - Orders are excluding parts that contain NULL values @@ -165,6 +166,7 @@ DEFINE fdiscount decimal(7,5); DEFINE xdiscount decimal(7,5); DEFINE delay_flag char(1); +DEFINE delay_flag_5 char(1); -- MSAPP-1830 DEFINE fp smallint; DEFINE v_fact_pre_dispc decimal(8,5); DEFINE v_fac_pre_qt_mul_d integer; @@ -689,6 +691,7 @@ issh50, fp, monstk, order_qty, delay_qty, x, i = 0,0,0,0,0,0,0,0,0,0,0,0; LET delay_flag=""; + LET delay_flag_5=""; -- MSAPP-1830 LET b_min=0; LET b_max=0; LET b_qoh=0; LET ostock_min=0; LET avslsq=0; @@ -1138,6 +1141,7 @@ IF order_qty > 0 THEN LET delay_flag = "5"; + LET delay_flag_5 = "5"; -- MSAPP-1830 END IF; END IF; @@ -1304,6 +1308,7 @@ --If the Delay Flag is still set to Superseded Set the Delay Quantity --and clear the Order Quantity. + IF delay_flag_5 = "5" THEN LET delay_flag = "5" END IF; -- MSAPP-1830 IF delay_flag = "5" THEN IF order_qty > 0 THEN LET delay_qty = order_qty;