cancel
Showing results for 
Search instead for 
Did you mean: 

Transaction Notification SP Problem

krishnam_mathur
Explorer
0 Kudos

Hi

I need to place control on Transaction Notification SP, so that the taxcode of sales orders must be equal to taxcode in item master data(UDF).

This control should work for all customer but 2 ending with '%AF'

So BPs like '%AF' can have tax code not equal to the tax code of item master data. For rest BP no.

Regards,

Krishnam

Accepted Solutions (1)

Accepted Solutions (1)

former_member312729
Active Contributor
0 Kudos

Hi ,

Try the below code also in the below code "t2.Vatgourpsa" replace with your UDF

if @object_type = '17' and (@transaction_type='A' or @transaction_type='U')
Begin
if exists (select t1.ItemCode from oinv T0 
inner join INV1 T1 on T0.DocEntry = t1.DocEntry 
inner join oitm t2 on t1.ItemCode=t2.ItemCode
where 
T0.CardName Not like'%%_AF' and 
t1.VatGroup<>t2.Vatgourpsa  and  t1.DocEntry = @list_of_cols_val_tab_del )
Begin 
SET @error = 101
SET @error_message = 'Choose the right the tax code'
End
End

Regards:

Balaji.S


Answers (0)