cancel
Showing results for 
Search instead for 
Did you mean: 

Need HELP IN STORE PROCEDURE

Former Member
0 Kudos

Hi

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

Regards,

Karthik B

Accepted Solutions (1)

Accepted Solutions (1)

former_member184146
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Thank you Manish for the help

Regards,

Karthik

Answers (0)