|
@@ -587,26 +587,27 @@ public class SupplierPurchaseOrderItemOneToMany : DynamicOneToManyGrid<PurchaseO
|
|
|
if (sp != null)
|
|
|
{
|
|
|
var poi = CreateItem();
|
|
|
- poi.Product.ID = sp.Product.ID;
|
|
|
- poi.Product.Synchronise(sp.Product);
|
|
|
- poi.Style.ID = sp.Style.ID;
|
|
|
- poi.Style.Synchronise(sp.Style);
|
|
|
+ poi.Product.CopyFrom(sp.Product);
|
|
|
+ poi.Style.CopyFrom(sp.Style);
|
|
|
poi.Dimensions.CopyFrom(sp.Dimensions);
|
|
|
- poi.Job.ID = sp.Job.ID;
|
|
|
- poi.Job.Synchronise(sp.Job);
|
|
|
+ poi.Job.CopyFrom(sp.Job);
|
|
|
poi.ForeignCurrencyCost = sp.ForeignCurrencyPrice;
|
|
|
poi.Cost = sp.CostPrice;
|
|
|
+ poi.CostCentre.CopyFrom(sp.Product.CostCentre);
|
|
|
+ poi.PurchaseGL.CopyFrom(sp.Product.PurchaseGL);
|
|
|
+ poi.Description = sp.Product.Name;
|
|
|
result.Add(poi);
|
|
|
}
|
|
|
else if (pi != null)
|
|
|
{
|
|
|
var poi = CreateItem();
|
|
|
- poi.Product.ID = pi.Product.ID;
|
|
|
- poi.Product.Synchronise(pi.Product);
|
|
|
- poi.Style.ID = pi.Style.ID;
|
|
|
- poi.Style.Synchronise(pi.Style);
|
|
|
+ poi.Product.CopyFrom(pi.Product);
|
|
|
+ poi.Style.CopyFrom(pi.Style);
|
|
|
poi.Dimensions.CopyFrom(pi.Dimensions);
|
|
|
poi.Cost = pi.NettCost;
|
|
|
+ poi.CostCentre.CopyFrom(pi.Product.CostCentre);
|
|
|
+ poi.PurchaseGL.CopyFrom(pi.Product.PurchaseGL);
|
|
|
+ poi.Description = pi.Product.Name;
|
|
|
result.Add(poi);
|
|
|
}
|
|
|
return result;
|
|
@@ -662,6 +663,9 @@ public class SupplierPurchaseOrderItemOneToMany : DynamicOneToManyGrid<PurchaseO
|
|
|
poi.Job.Synchronise(sp.Job);
|
|
|
poi.ForeignCurrencyCost = sp.ForeignCurrencyPrice;
|
|
|
poi.Cost = sp.CostPrice;
|
|
|
+ poi.CostCentre.CopyFrom(sp.Product.CostCentre);
|
|
|
+ poi.PurchaseGL.CopyFrom(sp.Product.PurchaseGL);
|
|
|
+ poi.Description = sp.Product.Name;
|
|
|
result.Add(poi);
|
|
|
}
|
|
|
return result;
|