Skip to Content

Transaction Notification

IF @OBJECT_TYPE='18' AND @TRANSACTION_TYPE='A'

BEGIN

DECLARE @NumAtCard NVARCHAR(100)

DECLARE @DueToCont NVARCHAR(1)

DECLARE @CardCode NVARCHAR(15)

SET @CardCode = (SELECT CardCode FROM OPCH WHERE DOCENTRY=@LIST_OF_COLS_VAL_TAB_DEL)

SET @NumAtCard = (SELECT ISNULL(NumAtCard, '') FROM OPCH WHERE DOCENTRY=@LIST_OF_COLS_VAL_TAB_DEL)

SET @DueToCont = (SELECT ISNULL(U_DueToCont, N'N') FROM OPCH WHERE DOCENTRY=@LIST_OF_COLS_VAL_TAB_DEL)

IF

(@DueToCont = 'Y')

AND

(@NumAtCard IN (SELECT NumAtCard FROM OPCH WHERE CardCode = @CardCode))

BEGIN

SET @error = 18001

SET @error_message = N'This number card is already exist'

END

END

We have this query that prohibit the entry of an A/P Invoice which have the same NumAtCard with another already existing. There is a UDF Field 'U_DueToCont' which takes the Value 'Yes' in order to do the doublechecking. We are unable to register invoices if filtering for doublecheck not choose 'NO'. How can we change it?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Apr 04, 2017 at 09:46 AM

    Hi Alexandros Karadimitropoulos,

    You can use Per document setting -->When Duplicated Vendor Reference No. Occurs - Block

    Regards:

    Balaji.S

    Add comment
    10|10000 characters needed characters exceeded