Skip to content


Landed Cost Invoice

Mick asked 7 years ago
Trying add a Landed Cost Matching Invoice, and receiving an “Divide by Zero error encountered” with the “taPopEnterMatchInvToShpMultiLine” procedure.
There doesn’t seem a logical reason as there is not that many fields to fill in.
declare @p19 int
set @p19=0
declare @p20 varchar(255)
set @p20=
exec taPopEnterMatchInvToShpMultiLine @I_vPOPRCTNM=‘RCT00000000000081’,@I_vPOPMtchShpRcpt=‘RCT00000000000067’,@I_vPONUMBER=default,@I_vQTYINVCD=860.00000,@I_vRevalue_Inventory=1,
@O_iErrorState=@p19 output,@oErrString=@p20 output
select @p19, @p20
Chris Hanson Staff answered 7 years ago
Mick, that node does a couple calculations where it could be doing a division.
One instance would be if you are using multi-currency, it divides the receipt cost by the exchange rate. If the exchange rate (coming off the shipment, table POP10500) is 0 for some reason, that would cause the error.
The other scenario would be when its calculating PPV, part of that is based off the originating extended cost divided by the quantity invoiced. If the quantity invoiced is 0 then it would another spot where the logic might return that result.
If neither of the suggestions above help then this would be a case I will direct you to our support team, They would be able to look at this on your system and help you troubleshoot it better than over the forums.
Mick replied 7 years ago

Chris, You are spot on, the PPV Parameter is not working correctly due to Zero Values. This Match Invoice is for a Landed Cost Invoice, and it appears the functionality doesn’t work correctly. The POP10310 and POP10500 Entries don’t get created either using this Node. There are two lines one for when the POPTYPE is in (1,3) and the other when POPTYPE = 2, so the (1,3) Line returns the Zero values.

Chris Hanson Staff answered 7 years ago
Mick, our support team could work with you to make sure that everything is mapped correctly if you think that might be part of the issue, but from the response it looks like you think the node itself isn’t functioning correctly.
If there are issues with the actual logic inside of nodes we normally point customers to Microsoft’s eConnect support team and have them open a ticket with them since they have the un-encrypted procedures and can send through a hotfix or a new node for what you are working with. What Microsoft would want is the XML that would be passed to eConnect – which you can get by changing the destination to Microsoft Dynamics GP – File and running the map. That would create an XML file per record which you could submit with your ticket (MS doesn’t care what is calling eConnect, as long as you have the data being fed to it).
I don’t have much experience working with this node, and couldn’t tell you offhand if there were any major changes with it between the different GP builds and releases.   Between the two support teams though they should be able to get you working.
Mick answered 7 years ago
Thanks for your assistance.  Bit of testing but finally got this working.
These are the Steps undertaken to have a Landed Cost Invoice populate.
1. Update the taPOPEnterMatchInvShpMultiLine proc and change the SELECT @PPV = 0, as never passing a variance in our setup.
2. Add the taPOPRcpLineInsert proc to the Match Invoices node type.

If you would like to submit an answer or comment, please sign in to the eOne portal.