This commit is contained in:
@@ -1780,7 +1780,7 @@ namespace AyaNova.PlugIn.V8
|
|||||||
|
|
||||||
d.notes = c.Notes;
|
d.notes = c.Notes;
|
||||||
d.vendorMemo = c.VendorMemo;
|
d.vendorMemo = c.VendorMemo;
|
||||||
d.dropShipToCustomerId =Getv7v8IdMapNullOk(c.DropShipToClientID);
|
d.dropShipToCustomerId = Getv7v8IdMapNullOk(c.DropShipToClientID);
|
||||||
d.referenceNumber = c.ReferenceNumber;
|
d.referenceNumber = c.ReferenceNumber;
|
||||||
d.vendorId = Getv7v8IdMap(c.VendorID, "Vendor for PO");
|
d.vendorId = Getv7v8IdMap(c.VendorID, "Vendor for PO");
|
||||||
d.orderedDate = util.DateToV8(c.OrderedDate);
|
d.orderedDate = util.DateToV8(c.OrderedDate);
|
||||||
@@ -1805,7 +1805,7 @@ namespace AyaNova.PlugIn.V8
|
|||||||
receipts.Add(PurchaseOrderReceipt.GetItem(prli.LT_O_PurchaseOrderReceipt.Value));
|
receipts.Add(PurchaseOrderReceipt.GetItem(prli.LT_O_PurchaseOrderReceipt.Value));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dynamic dItems = new JArray();
|
||||||
foreach (PurchaseOrderItem pi in c.OrderItems)
|
foreach (PurchaseOrderItem pi in c.OrderItems)
|
||||||
{
|
{
|
||||||
//here combine potiem and poreceipts into singular items for v8
|
//here combine potiem and poreceipts into singular items for v8
|
||||||
@@ -1814,6 +1814,37 @@ namespace AyaNova.PlugIn.V8
|
|||||||
//iterate receipt list find id's fetch actual receipts which contain exactly which poitem they were received against
|
//iterate receipt list find id's fetch actual receipts which contain exactly which poitem they were received against
|
||||||
//also, keep track of required woitempartrequestid's for later so can fixup when the time comes
|
//also, keep track of required woitempartrequestid's for later so can fixup when the time comes
|
||||||
|
|
||||||
|
dynamic dItem = new JObject();
|
||||||
|
dItem.purchaseOrderId = 0;
|
||||||
|
dItem.partId = Getv7v8IdMap(pi.PartID, "part for poitem");
|
||||||
|
dItem.partWarehouseId = Getv7v8IdMap(pi.PartWarehouseID, "warehouse for poitem");
|
||||||
|
dItem.quantityOrdered = pi.QuantityOrdered;
|
||||||
|
dItem.quantityReceived = 0;
|
||||||
|
dItem.serials=string.Empty;
|
||||||
|
dItem.purchaseOrderCost = pi.PurchaseOrderCost;
|
||||||
|
dItem.partRequestedById = Getv7v8IdMapNullOk(pi.PartRequestedByID);
|
||||||
|
foreach (PurchaseOrderReceipt r in receipts)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrWhiteSpace(r.Text1))
|
||||||
|
sbText1.Append(r.Text1+",");
|
||||||
|
if (!string.IsNullOrWhiteSpace(r.Text2))
|
||||||
|
sbText2.Append(r.Text2 + ",");
|
||||||
|
|
||||||
|
foreach (PurchaseOrderReceiptItem ri in r.Items)
|
||||||
|
{
|
||||||
|
if (ri.PurchaseOrderItemID == pi.ID)
|
||||||
|
{
|
||||||
|
//Note: in v7 must receive to same warehouse as ordered, no option otherwise so no need
|
||||||
|
//to worry about that here
|
||||||
|
dItem.quantityReceived += ri.QuantityReceived;
|
||||||
|
dItem.receivedCost = ri.ReceiptCost;
|
||||||
|
//ri.SerialNumbers
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//dItem.quantityReceived=//tbc
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user