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

Crear campo como obligatorio en la factura.

Buenos días,

Tengo el siguiente asunto, hay un campo en la factura llamado centro de beneficio, lo que está pasando es que se han creado facturas sin registrar el centro de beneficio, entonces lo que se quiere es colocar este campo como obligatorio, que si la persona intenta crear la factura sin haber registrado el centro de beneficio entonces que le arroje una alerta y no le permita crear la factura.

Saludos y gracias por su atención.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on May 04, 2011 at 04:17 PM

    Miguel

    Revisa este post [Centro de Beneficio y Proyecto sean campos obligatorios. |Centro de Beneficio y Proyecto sean campos obligatorios.;

    Cualquier duda, comentas

    Saludos

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Felipe Loyola

      Le coloque un SET y ya funciono.

      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

      Listo mil gracias Floyola.

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.