on 09-22-2023 10:35 AM
Buenos días tengo el siguiente script para validar ofertas y pedidos de venta, pero solo me funciona para las ofertas (23) y no hace nada para los pedidos (17). Alguien tiene explicación? Gracias.
IF @object_type IN ( '17' , '23') and @transaction_type IN ('A', 'U')
BEGIN IF EXISTS (SELECT T1.U_PorteriaAncho, T1.U_PorteriaLargo, T1.U_PorteriaFS, T1.U_PorteriaFI, T1.U_PorteriaAlto
FROM OQUT T0 INNER JOIN QUT1 T1 ON T0.[DocEntry] = T1.[DocEntry] INNER JOIN OITM T2 ON T1.[ItemCode] = T2.[ItemCode] INNER JOIN OITB T3 ON T2.ItmsGrpCod = T3.ItmsGrpCod
WHERE T2.ItmsGrpCod IN ('140', '141' , '146') and
(T1.U_PorteriaAncho=0 or
T1.U_PorteriaLargo=0 or
T1.U_PorteriaFS=0 or
T1.U_PorteriaFI=0 or
T1.U_PorteriaAncho>=T1.U_PorteriaLargo or --Alto debe ser inferior a largo
T1.U_PorteriaFS>T1.U_PorteriaFI or -- FS debe se inferior a FI
T1.U_PorteriaAlto IS NULL) and T0.DocEntry = @list_of_cols_val_tab_del)
Begin
set @error ='1'
set @error_message = 'ERROR MEDIDAS'
end
end
User | Count |
---|---|
4 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.