MattN 8/23/2016 12:52:23 PM

taPopRcptLandedCost Stored Procedure - Error 8059

I've been wrangling with purchase order receipts and landed cost.  I managed to get the landed cost portion working of "taPopRcptLineInsert" however, the way we end up doing landed cost is not by item-by-item basis.  Using the eConnect procedure, a landed cost entry is made in POP10700 for each receipt line in POP10500.  However, in the UI, it seems our company does it differently.  From the "Receivings Transaction Entry" window in purchasing, on the selected receipt we go to the "Landed Cost" button at the bottom of the window and proceed to make one entry for landed cost.

What this ends up doing in POP10700 is making two lines as shown here

Alternatively, I've tried calling the "taPopRcptLandedCost" stored procedure itself to enter these two lines.  Bizarrely, it works fine when I'm using the procedure to make a landed cost against a receipt number that doesn't exist.  However, when running it against receipt number that does exist (the whole point, really) I get error 8059 - "Input variable contains a duplicate document (POPRCTNM)."

I know there's a thread on this - http://dyndeveloper.com/thread.aspx?threadid=449

However, I've provided a line number and still gives me the error.  What's more, in the screenshot I posted of the two lines generated when doing things from the UI side, one entry only retains the "LCLINENUMBER" and omits RCPTLNNM as well as the header line LCHDRNUMBER.

Thanks

 

Version: GP 2010
Section: Dynamics GP, 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