|
@@ -15,8 +15,6 @@ using System.Windows.Media;
|
|
|
using System.Windows.Media.Imaging;
|
|
|
using PRSDimensionUtils;
|
|
|
using StockMovement = Comal.Classes.StockMovement;
|
|
|
-using Org.BouncyCastle.Asn1.Mozilla;
|
|
|
-using jdk.nashorn.@internal.ir;
|
|
|
|
|
|
namespace PRSDesktop;
|
|
|
|
|
@@ -1015,7 +1013,6 @@ public class StockForecastGrid : DynamicItemsListGrid<StockForecastItem>, IDataM
|
|
|
var holding = holdingrow.ToObject<StockHolding>();
|
|
|
holding.ConvertDimensions(x => x.Dimensions, x => x.Units, x => x.AverageValue,
|
|
|
Client<ProductDimensionUnit>.Provider);
|
|
|
- //holding.Units = DimensionUtils.ConvertDimensions(holding.Dimensions, holding.Units, (f,c) => Client.Query(f,c));
|
|
|
|
|
|
var item = GetItem(GetKey(holding.Product.ID, holding.Style.ID, holding.Dimensions));
|
|
|
if(holding.Job.ID == Guid.Empty)
|
|
@@ -1035,18 +1032,15 @@ public class StockForecastGrid : DynamicItemsListGrid<StockForecastItem>, IDataM
|
|
|
{
|
|
|
poi.ConvertDimensions(x => x.Dimensions, x => x.Qty, x => x.Cost,
|
|
|
Client<ProductDimensionUnit>.Provider);
|
|
|
- //poi.Qty = DimensionUtils.ConvertDimensions(poi.Dimensions, poi.Qty, (f,c) => Client.Query(f,c));
|
|
|
}
|
|
|
|
|
|
var allocations = results.Get<PurchaseOrderItemAllocation>();
|
|
|
foreach(var allocationrow in allocations.Rows)
|
|
|
{
|
|
|
var allocation = allocationrow.ToObject<PurchaseOrderItemAllocation>();
|
|
|
- var d = allocation.Item.Dimensions.Copy();
|
|
|
- var q = allocation.Quantity;
|
|
|
- var c = allocation.Item.Cost;
|
|
|
- DimensionUtils.ConvertDimensions(d, ref q, ref c, Client<ProductDimensionUnit>.Provider);
|
|
|
+
|
|
|
// POIAs are already converted where necessary, so we don't have to update the quantities again, just update the dimensions
|
|
|
+ DimensionUtils.ConvertDimensions(allocation.Item.Dimensions, allocation.Quantity, allocation.Item.Cost, Client<ProductDimensionUnit>.Provider);
|
|
|
|
|
|
var key = new ItemKey(
|
|
|
allocation.Item.Product.ID,
|
|
@@ -1092,7 +1086,6 @@ public class StockForecastGrid : DynamicItemsListGrid<StockForecastItem>, IDataM
|
|
|
{
|
|
|
var bomItem = bomItemRow.ToObject<JobBillOfMaterialsItem>();
|
|
|
bomItem.ConvertDimensions(x => x.Dimensions, x => x.Quantity, x => x.UnitCost, Client<ProductDimensionUnit>.Provider);
|
|
|
- //bomItem.Quantity = DimensionUtils.ConvertDimensions(bomItem.Dimensions, bomItem.Quantity, (f,c) => Client.Query(f,c));
|
|
|
var key = GetKey(bomItem.Product.ID, bomItem.Style.ID, bomItem.Dimensions);
|
|
|
var item = GetItem(key);
|
|
|
|
|
@@ -1105,7 +1098,6 @@ public class StockForecastGrid : DynamicItemsListGrid<StockForecastItem>, IDataM
|
|
|
var movement = mvtrow.ToObject<StockMovement>();
|
|
|
movement.ConvertDimensions(x => x.Dimensions, x => x.Units, x => x.Cost,
|
|
|
Client<ProductDimensionUnit>.Provider);
|
|
|
- //movement.Units = DimensionUtils.ConvertDimensions(movement.Dimensions, movement.Units, (f,c) => Client.Query(f,c));
|
|
|
|
|
|
var item = GetItem(GetKey(movement.Product.ID, movement.Style.ID, movement.Dimensions));
|
|
|
if (movement.Job.ID == Guid.Empty)
|