cancel
Showing results for 
Search instead for 
Did you mean: 

How to block Particular AR Invoice Number by Stored Procedure

former_member320372
Participant
0 Kudos

Hi All,

I want to block particular AR Invoice number by Stored Procedure. It is Possible??

Ex. My last invoice number is 100, now i need a stored procedure to block invoice number 105 (Upcoming Invoice number).

Accepted Solutions (1)

Accepted Solutions (1)

former_member320372
Participant
0 Kudos

Hi All,

The below SP is working fine for my process,

IF (@transaction_type = 'A' or @transaction_type = 'U') AND @object_type = '13'
BEGIN

if exists (Select T0.Docnum from OINV T0 where (T0.Docnum = '105'))
begin
SET @error = 10
SET @error_message = 'This invoice number not allowed '
end
END

Answers (0)