Quantcast
Viewing all articles
Browse latest Browse all 10665

Re: TransNotif block duplicate vendor ref

Hi Leonardo E. Martinez

 

 

Try This you can include the series in the where condition

 

 

If @object_type = '17' and (@transaction_type in ('A' ,'U'))

begin

declare @RefNo as varchar (100)

declare @CardCode as varchar (100)

declare @Series smallint

     if (@object_type = '17')

          begin

             select @RefNo = NumAtCard, @CardCode = CardCode from ORDR T0

                    where docentry = @list_of_cols_Val_tab_del and T0.Series IN (1,6)

             begin

               if (@RefNo is not null)

                 begin

                   if 1!= (select count (docentry) from ORDR  where (NumatCard = @RefNo) and (cardcode = @CardCode))

                     begin

                        select @error = 10

                        select @error_message = 'Conduce Duplicado'

                     End

                   End

               End

          End

End

 

Hope Helpful

 

 

Regards

Kennedy


Viewing all articles
Browse latest Browse all 10665

Trending Articles