Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8667

Re: Adding and editing PO lines via the DI-API

$
0
0

Hi Jonathan,

you have to put doc.PO.Lines.Add() beforehand - otherwise you are just changing line 0.

 

...  // Add a new PO line that makes up the difference in what was shipped and the original quantity     docPO.Lines.Add();     docPO.Lines.ItemCode = ssi.itemCode;     docPO.Lines.Quantity = System.Convert.ToDouble(poLineRow["OpenQty"].ToString()) - draft.Lines.Quantity;     docPO.Lines.WarehouseCode = ssi.whsCode;     docPO.Lines.Price = ssi.price;
// Now modify the existing, "original" PO line item to reflect the quantity change (this will show what actually shipped)     docPO.Lines.SetCurrentLine(System.Convert.ToInt32(poLineRow["LineNum"].ToString()));
...

 

regards,

Maik


Viewing all articles
Browse latest Browse all 8667

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>