on 03-05-2015 9:44 PM
Buenas tardes Sres.
Quisiera saber si me pudieran ayudar con un problema que tengo con los TN's.
He creado un TN para evitar crear una factura si la misma no proviene de una entrega. Habia realizado las pruebas en una de mis bases de datos y funcionaba correctamente. Al colocarlo en otra de ellas que es para la que lo necesito el mismo no me funciona.
Aca el TN.
IF @object_type in ('13') AND @transaction_type in ('A','U')
BEGIN
DECLARE @Factura varchar(50)
SET @Factura=(SELECT TOP 1 ISNULL(BASEREF,'') FROM OINV INNER JOIN INV1 ON OINV.DocEntry=INV1.DocEntry AND OINV.DocEntry=@list_of_cols_val_tab_del)
IF (@Factura='') OR (@Factura IS NULL)
BEGIN
SET @error='004'
SET @error_message='NO EXISTE UNA ORDEN DE ENTREGA PREVIA'
END
END
Incluso quite toda la validacion dentro del Begin para ver si en realidad pasaba por alli y tampoco, es decir lo deje de la siguiente manera.
IF @object_type in ('13') AND @transaction_type in ('A','U')
BEGIN
SET @error='004'
SET @error_message='NO EXISTE UNA ORDEN DE ENTREGA PREVIA'
END
No se que puede estar ocurriendo.
Gracias por la ayuda que me puedan prestar.
Saludos.
Jesús Salazar.
Buenos dias cuando dice que provenga de una entrega es un pedido de cliente??
tengo entendido que primero se hace la factura y luego la entrega. sera un gusto ayudarle.
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 | |
7 | |
6 | |
4 | |
3 | |
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.