on 04-04-2017 9:24 AM
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?
Hi Alexandros Karadimitropoulos,
You can use Per document setting -->When Duplicated Vendor Reference No. Occurs - Block
Regards:
Balaji.S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
7 | |
7 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.