For PM Intercompany transactions. Dynamics GP expects that the Originating Amounts should be set to the functional amounts.
In the screenshot below, the PURCH Distribution is correct with the amount set to $69217.95.
Unfortunately, the PAY distribution is incorrect as the Originating Credit Amount is $0.00 and should be $69217.95.
To resolve this, we can write an ‘after document success’ task to correct the distributions for the current voucher if it’s marked as Intercompany.
1. Open your Payables Integration and go into your “Create payables transaction” mapping.
2. Go into your “Additional Column” and double-click on your “GP Rolling Column” you have configured.
3. Then, you will select the button for “Use for Global Variable”. This will allow us to reference the GlobalRollingColumn inside of our task.
4. Then you can go back to the “Tasks” portion of your integration. Then create a new “Run SQL Command” on the Document Tasks level and copy this code to the SQL command.
use GlobalCompanyID declare @VCHRNUM varchar(20) = 'GlobalRollingColumn' declare @ictrx int = 0 select @ictrx = ICTRX from PM10000 where VCHNUMWK = @vchrnum if (@ictrx = 1) begin update PM10100 set ORCRDAMT = CRDTAMNT, ORDBTAMT = DEBITAMT where CNTRLTYP = 0 and VCHRNMBR = @VCHRNUM End
5. Having this set up on the “Document Level” will run through this script by how ever many “record count” that we are sending into GP. This will update the distributions inside of the PM10100 table.
Have questions? Feel free to send us an email at support@eonesolutions.com