on 11-12-2019 9:42 PM
Muy buenas tardes estimados
Favor solicito el apoyo de la comunidad pues me entrampado y no se como resolver el requerimiento, ocurre que se necesita hacer una validacion que no permita el ingreso de los productos gestionados por lote que no cuenten con fecha de vencimiento, he intentado hacerla desde la entrada de mercancia y tambien desde la ventana de lotes y no logro que funcione. Utilizamos SBO 9.3 PL7
Favor su apoyo y gracias.
Buena tardes estimados
Logre resolver mi problema, les dejo el query por si alguien llega a necesitarlo.
IF @object_type = '20' AND @transaction_type IN ('A')
begin
declare @v_loteSinFec int
set @v_loteSinFec = ( SELECT COUNT(1) FROM IBT1 T1
inner JOIN OPDN T2 ON T2."DocEntry" = T1."BaseEntry"
inner JOIN PDN1 T3 ON T2."DocEntry"= T3."DocEntry" AND T1."BaseLinNum" = T3."LineNum" and T3.docentry = T1.baseentry
inner JOIN OBTN T4 ON T1."ItemCode" = T4."ItemCode" AND T1."BatchNum"=T4."DistNumber" and t1.basetype = T2.ObjType and t1.baseentry = t2.docentry
inner join oitm T5 on t5.itemcode = t1.itemcode WHERE T2."DocEntry" = @list_of_cols_val_tab_del and ISNULL(T4."ExpDate",'') = '' AND T2.CANCELED= 'N' and t5.ManBtchNum = 'Y' )
if @v_loteSinFec > 0
begin
SET @error = 20
SET @error_message = 'Es obligatorio registrar la fecha de vencimiento para el nro de lote '
end
END
Saludos
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
9 | |
8 | |
7 | |
7 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.