cancel
Showing results for 
Search instead for 
Did you mean: 

To Prevent Duplicate Vendor Payment

Former Member
0 Kudos

Hi,

Is there any way we can prevent duplicate vendor invoice entry into SAP business one 2007 version?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You have to use SP to block duplicate vendor invoice entry, on the basis of docentry get vendor code and doctotal and apply condition.

revert back if you are not aware of SP I will send you code.

Regards

Kamlesh

Former Member
0 Kudos

I am not aware about SP. Can you please elaborate?

former_member205766
Active Contributor
0 Kudos

Hi

Check the below discussion

With Regards

Balaji Sampath

Former Member
0 Kudos

Hi,

I have placed some code inside that procedure but I am getting an error:  "Procedures sbo_sp_transactionnotification has too many arguments specified"

USE [FSDB_ACSCORP]

GO

/****** Object:  StoredProcedure [dbo].[SBO_SP_TransactionNotification]    Script Date: 06/19/2015 09:27:37 ******/

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

ALTER procedure [dbo].[SBO_SP_TransactionNotification] 

  @object_type nvarchar(20),

  @transaction_type nvarchar(1),

  @venno as varchar(100),    

  @list_of_cols_val_tab_del nvarchar(255)

AS 

begin 

declare @error  int /* Result (0 for no error) */

declare @error_message nvarchar (200) /* Error string to be displayed */ 

select @error = 0 

select @error_message = N'Ok' 

/* -- NWARE TECHNOLOGIES CODE START -- */

/* FILTRER LES TRANSACTIONS */

/** block duplicate Vendor Invoice number **/

if (@object_type = '20' or @object_type = '18')

     and (@transaction_type= 'A' or @transaction_type= 'U')

begin

     if @object_type = '20'

     begin

          select @venno = NumAtCard

          from opdn

          where docentry =@list_of_cols_val_tab_del

          if 1 != (select count(docentry) from opdn with(nolock) where NumAtCard = @venno)

          begin

               select @error = 1

               select @error_message = 'Duplicate vendor ref no in PO Receipts. ! '

          end

     end

     else

     if @object_type = '18'

     begin

          select @venno = NumAtCard

          from opch

          where docentry =@list_of_cols_val_tab_del

          if 1 != (select count(docentry) from opch with(nolock) where NumAtCard = @venno)

          begin

               select @error = 2

               select @error_message = 'Duplicate vendor ref no in AP Invoices. ! '

   end

   end

  end

end

Former Member
0 Kudos

Hi,

Try:

if @object_type in ('20','18') and @transaction_type in ('A', 'U')

BEGIN

     if @object_type = '20'

     begin

          select @venno = NumAtCard

          from opdn

          where docentry =@list_of_cols_val_tab_del

          if 1 != (select count(docentry) from opdn with(nolock) where NumAtCard = @venno)

          begin

               select @error = 1

               select @error_message = 'Duplicate vendor ref no in PO Receipts. ! '

          end

     end

     else

     if @object_type = '18'

     begin

          select @venno = NumAtCard

          from opch

          where docentry =@list_of_cols_val_tab_del

          if 1 != (select count(docentry) from opch with(nolock) where NumAtCard = @venno)

          begin

               select @error = 2

               select @error_message = 'Duplicate vendor ref no in AP Invoices. ! '

     end

    end

END

Only change where this SP allow you to add your code part.

Thanks,

Gordon

Answers (1)

Answers (1)

daroy_alvin
Active Participant
0 Kudos

Hi,

Use this standard settings of SAP Business One.

Administration ->> System Initialization ->> Document Settings

Thanks & Regards,

Alvin

Former Member
0 Kudos

Hi Alvin,

In 8.82 this feature is there as you mentioned, but as I mentioned we are suing 2007 version where it is not there. That's why have to control it through Stored procedure.