Skip to Content
author's profile photo Former Member
Former Member

Validar ingreso de Centro de Costo en la Factura

Buenos días estimados,

Facturación me está pidiendo que el campo de Centro de Beneficio sea validado, esto para asegurarse de que esta información siempre esté registrada.

Alguien me pueda ayudar con este Transaction Notification?

Muchas gracias de antemano

Saludos

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on May 12, 2011 at 02:07 PM

    Con este podras cumplir ese requerimiento, es para las facturas de ventas

    IF  (@object_type = 13)  and (@transaction_type IN ('A','U'))
    BEGIN 
    	
    	DECLARE 
    		@LineNum INT,
    		@CB INT
        
    	SET 
    		@Linenum = (SELECT COUNT(T1.LineNum)
    			FROM OINV T0
                    	INNER JOIN INV1 T1 ON T1.DocEntry = T0.DocEntry
                    	WHERE T0.DocEntry = @list_of_cols_val_tab_del)
                    	
            SET
    		
    		@CB = (SELECT COUNT(T1.OcrCode)
                            FROM OINV T0
                    	INNER JOIN INV1 T1 ON T1.DocEntry = T0.DocEntry
                    	WHERE T0.DocEntry = @list_of_cols_val_tab_del)
     
        IF @LineNum != @CB
        BEGIN
            SET @error = 102
            SET @error_message = 'MS-102 Revisar centros de Beneficio'
        END
    END
    

    Saludos

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.