I am using Visual Studio 2012 and eConnect to integrate purchase order invoices into GP. I am passing matched shipments in the taPopEnterMatchInvLine node along with a taPopDistribution node for freight. The XML schema result is pasted below. The document is created in GP and no errors are returned. However, the freight distribution seems to be ignored. The freight amount is entered at the header level, but the GL code is not inserted at the Distribution level and must be manually entered in GP after the fact. Any ideas why? I really need to be able to pass both the matched shipments (and sometimes even using taPopEnterMatchInvToShpMultiLine) along with a distribution line for freight.
<?xml version="1.0" encoding="UTF-8"?>
-<eConnect xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
You are using autocost option on the header which is causing econnect to ignore the distribution lines you are sending. It simply fills the distribution using vendor and system defaults and vendor probably does not have default freight account. In order to send distribution lines for po invoice I think you have to set AutoCost false but that requires all distribution lines to be send manually freight plus all the po related ones which means you loose any automatic coding that comes from po lines.
Thanks for the suggestion, but no go. I turned off AutoCost on the header and the line. Then I passed amounts for UnitCost, ExtdCost, and SubTotal, but got the same exact result. Everything went through except the freight GL account.
The issue is the CreateDist flag on the taPopEnterMatchInvHdr node. If I set that to 1=Automatic then my PO lines automatically create the distributions required, but then the freight GL I pass is ignored. If I set to 0=Manual then the freight line goes through, but I'm left without PO distributions. I guess I'll have to work on manually passing the PO distributions as well. *sigh*
By the way - after adding way more code and queries into my solution than I wanted - I was able to successfully integrate this transaction by setting CREATDIST = 0 and manually submitting all the distribution information.
I'm running into a similar issue and I'm interested in how you were able to solve it! When you said you manually submitted all the distribution information, which distributions did you supply? Certainly all 20 disttypes aren't required, are they? I just went back and made sure to set autocost and createdist to zero.
Right now, I'm just supplying distributions to the accounts that apply. In my case, that's distributions to an Accrued Purchases, Accounts Payable, Freight (if applicable), Miscellaneous (if applicable), and Other (if applicable). Was there anything else special?