GPMFG 12/23/2019 9:25:39 AM

1099 Amounts - update to taPMTransactionInsertPost

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

Version: All
Section: eConnect


Table Definition Quick Links
All Tables
SOP Tables
RM Tables
GL Tables
POP Tables
HR Tables
PM Tables
UPR Tables
IV Tables
Olympic Tables
3