Skip to Content

How to block Particular AR Invoice Number by Stored Procedure

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).

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Dec 26, 2017 at 11:37 AM

    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

    Add comment
    10|10000 characters needed characters exceeded