Skip to Content
avatar image
Former Member

Need HELP IN STORE PROCEDURE

Hi

If Taxcode in por1 is not equal to por4 table taxcode then document should not get added.

Regards,

Karthik B

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jan 10, 2015 at 05:11 PM

    Hi,

         Try this

    IF @object_type='22' AND @transaction_type IN ( 'A','U')

    begin

    IF EXISTS(Select A.DocEntry from OPOR A INNER JOIN  POR1 B ON A.DocEntry=B.DocEntry INNER JOIN POR4 C

    ON A.DocEntry=C.DocEntry AND B.DocEntry=C.DocEntry

      WHERE   B.TaxCode<>C.StcCode AND A.DOCENTRY=@list_of_cols_val_tab_del  )

    BEGIN

    SET @error = 121

    SET @error_message = 'Please select the same type of Tax in frieght and Items'

    END

    END

    Regards,

    Manish

    Add comment
    10|10000 characters needed characters exceeded