Shipment import from CSV or Excel
I'm writing a plugin to populate a shipment form from Excel/CSV.
In the Excel sheet is a column for PO_OrderNo, InvoiceNo, PartNo, Qty
I've managed to populate the Purchase Order grid, the Invoices grid but I am having trouble populating the shipment lines grid.
I am using
to instantiate the shipment line and then using
to read the purchase order line from the PO from the OrderNo and PartNo. Then use
But all that does is add basically a blank line with nothing populated except the PO line number.
Is there a way to have the shipment line pre-fill much of the grid with the data pulled in from the purchase order line? Or do I need to set each shipmentLine property? (like PartNo, description, FX rate, Unit cost, FX Unit cost, et al and so on and etc)
Or maybe that is not the correct object to instantiate? Maybe it should be
but I can't find a Read function to populate it.
In the Excel sheet is a column for PO_OrderNo, InvoiceNo, PartNo, Qty
I've managed to populate the Purchase Order grid, the Invoices grid but I am having trouble populating the shipment lines grid.
I am using
- Code: Select all
JiwaFinancials.Jiwa.JiwaLandedCost.Shipment.Line shipmentLine = shipment.Manager.CollectionItemFactory.CreateCollectionItem<JiwaFinancials.Jiwa.JiwaLandedCost.Shipment.Line>();
to instantiate the shipment line and then using
- Code: Select all
shipmentLine.PurchaseOrderLine.ReadRecord
to read the purchase order line from the PO from the OrderNo and PartNo. Then use
- Code: Select all
shipment.Lines.Add(shipmentLine);
But all that does is add basically a blank line with nothing populated except the PO line number.
Is there a way to have the shipment line pre-fill much of the grid with the data pulled in from the purchase order line? Or do I need to set each shipmentLine property? (like PartNo, description, FX rate, Unit cost, FX Unit cost, et al and so on and etc)
Or maybe that is not the correct object to instantiate? Maybe it should be
- Code: Select all
JiwaFinancials.Jiwa.JiwaLandedCost.Shipment.PurchaseOrderLine item = shipment.Manager.CollectionItemFactory.CreateCollectionItem<JiwaFinancials.Jiwa.JiwaLandedCost.Shipment.PurchaseOrderLine>();
but I can't find a Read function to populate it.