I'd like to update the taPMTransactionInsertPost procedure so that 1099 amounts are filled in correctly after running a SmartConnect map for payables transactions.
I have this code that could be added to it, but I'm not sure where it should be placed within the existing code. Would this just go at the end of the existing code?
DECLARE @TEN99TYPE INT
DECLARE @TEN99BOXNUMBER INT
SET @TEN99TYPE = (SELECT TEN99TYPE FROM
PM00200 WHERE VENDORID =
@I_vVENDORID)
SET @TEN99BOXNUMBER = (SELECT TEN99BOXNUMBER FROM
PM00200 WHERE VENDORID =
@I_vVENDORID)
IF @TEN99TYPE > 1
BEGIN
UPDATE PM10000 SET
TEN99AMNT = @I_vDOCAMNT,
UN1099AM = @I_vDOCAMNT,
TEN99TYPE = @TEN99TYPE,TEN99BOXNUMBER
= @TEN99BOXNUMBER WHERE
DOCTYPE = @I_vDOCTYPE AND
VCHNUMWK = @I_vVCHNUMWK AND VENDORID = @I_vVENDORID
END