on 04-30-2018 9:15 AM
Hi Experts
i had a SPT which auto populate a UDF Data from Invoice to its related JE and its working fine when i Add a new document
But when i cancel the same document, this SPT is not working and does not auto populate the date from UDF to JE UDF
Pls help me to sort it out
Below attached is the SPT
Regards
IF @transaction_type in ('A','C','U') AND @Object_type = '18'
BEGIN
UPDATE D
SET D.U_TaxType = B.U_TaxType
FROM OPCH AS A INNER JOIN
PCH1 AS B ON A.DocEntry = B.DocEntry INNER JOIN
OJDT AS C ON A.TransId = C.TransId AND A.ObjType = C.TransType INNER JOIN
JDT1 AS D ON C.TransId = D.TransId
WHERE B.AcctCode = D.Account and B.LineTotal = D.Debit AND A.DocEntry = @list_of_cols_val_tab_del AND A.DocType = 'S'
END
Did you check above TN?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try this,
IF @transaction_type in ('A','C','U') AND @Object_type = '18'
BEGIN
UPDATE D SET D.U_TaxType = B.U_TaxType
FROM OPCH AS A INNER JOIN PCH1 AS B ON A.DocEntry = B.DocEntry
INNER JOIN OJDT AS C ON A.TransId = C.TransId AND A.ObjType = C.TransType
INNER JOIN JDT1 AS D ON C.TransId = D.TransId WHERE B.AcctCode = D.Account
and (B.LineTotal = D.Debit OR B.LineTotal = D.Credit) AND A.DocEntry = @list_of_cols_val_tab_del AND A.DocType = 'S'
END
Regards,
Nagarajan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
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.