|
@@ -404,6 +404,15 @@ namespace comal.timesheets
|
|
|
purchaseOrderItem.Dimensions.Value = poItemShell.DimensionsValue;
|
|
|
purchaseOrderItem.Dimensions.UnitSize = poItemShell.DimensionsUnitSize;
|
|
|
purchaseOrderItem.Cost = poItemShell.Cost;
|
|
|
+ purchaseOrderItem.Dimensions.Unit.HasHeight = poItemShell.DimensionsHasHeight;
|
|
|
+ purchaseOrderItem.Dimensions.Unit.HasLength = poItemShell.DimensionsHasLength;
|
|
|
+ purchaseOrderItem.Dimensions.Unit.HasWidth = poItemShell.DimensionsHasWidth;
|
|
|
+ purchaseOrderItem.Dimensions.Unit.HasWeight = poItemShell.DimensionsHasWeight;
|
|
|
+ purchaseOrderItem.Dimensions.Unit.HasQuantity = poItemShell.DimensionsHasQuantity;
|
|
|
+ purchaseOrderItem.Dimensions.Unit.Formula = poItemShell.DimensionsUnitFormula;
|
|
|
+ purchaseOrderItem.Dimensions.Unit.Format = poItemShell.DimensionsUnitFormat;
|
|
|
+ purchaseOrderItem.Dimensions.Unit.Code = poItemShell.DimensionsUnitCode;
|
|
|
+ purchaseOrderItem.Dimensions.Unit.Description = poItemShell.DimensionsUnitDescription;
|
|
|
return purchaseOrderItem;
|
|
|
}
|
|
|
|
|
@@ -614,6 +623,16 @@ namespace comal.timesheets
|
|
|
if (list[25] == null) { list[25] = 0; } //25
|
|
|
if (list[26] == null) { list[26] = 0; } //26
|
|
|
if (list[27] == null) { list[27] = ""; } //27
|
|
|
+ if (list[28] == null) { list[28] = 0; } //28
|
|
|
+ if (list[28] == null) { list[29] = false; } //29
|
|
|
+ if (list[29] == null) { list[30] = false; } //30
|
|
|
+ if (list[30] == null) { list[31] = false; } //31
|
|
|
+ if (list[31] == null) { list[32] = false; } //32
|
|
|
+ if (list[32] == null) { list[33] = false; } //33
|
|
|
+ if (list[33] == null) { list[34] = ""; } //34
|
|
|
+ if (list[34] == null) { list[35] = ""; } //35
|
|
|
+ if (list[35] == null) { list[36] = ""; } //36
|
|
|
+ if (list[36] == null) { list[37] = ""; } //37
|
|
|
|
|
|
|
|
|
POItemShell item = new POItemShell()
|
|
@@ -645,7 +664,17 @@ namespace comal.timesheets
|
|
|
DimensionsHeight = double.Parse(list[24].ToString()),
|
|
|
DimensionsWeight = double.Parse(list[25].ToString()),
|
|
|
DimensionsValue = double.Parse(list[26].ToString()),
|
|
|
- DimensionsUnitSize = list[27].ToString()
|
|
|
+ DimensionsUnitSize = list[27].ToString(),
|
|
|
+ Cost = double.Parse(list[28].ToString()),
|
|
|
+ DimensionsHasHeight = bool.Parse(list[29].ToString()),
|
|
|
+ DimensionsHasLength = bool.Parse(list[30].ToString()),
|
|
|
+ DimensionsHasWidth = bool.Parse(list[31].ToString()),
|
|
|
+ DimensionsHasWeight = bool.Parse(list[32].ToString()),
|
|
|
+ DimensionsHasQuantity = bool.Parse(list[33].ToString()),
|
|
|
+ DimensionsUnitFormula = list[34].ToString(),
|
|
|
+ DimensionsUnitFormat = list[35].ToString(),
|
|
|
+ DimensionsUnitCode = list[36].ToString(),
|
|
|
+ DimensionsUnitDescription = list[37].ToString(),
|
|
|
};
|
|
|
if (double.TryParse(list[6].ToString(), out double result))
|
|
|
item.ExpectedQty = result;
|
|
@@ -660,7 +689,7 @@ namespace comal.timesheets
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
- catch(Exception ex)
|
|
|
+ catch (Exception ex)
|
|
|
{
|
|
|
Device.BeginInvokeOnMainThread(() => { DisplayAlert("Error loading Purchase Order items - please try again", ex.Message, "OK"); });
|
|
|
}
|
|
@@ -825,7 +854,16 @@ namespace comal.timesheets
|
|
|
x => x.Dimensions.Weight, //25
|
|
|
x => x.Dimensions.Value, //26
|
|
|
x => x.Dimensions.UnitSize, //27
|
|
|
- x => x.Cost //28
|
|
|
+ x => x.Cost, //28
|
|
|
+ x => x.Dimensions.Unit.HasHeight, //29
|
|
|
+ x => x.Dimensions.Unit.HasLength, //30
|
|
|
+ x => x.Dimensions.Unit.HasWidth, //31
|
|
|
+ x => x.Dimensions.Unit.HasWeight, //32
|
|
|
+ x => x.Dimensions.Unit.HasQuantity, //33
|
|
|
+ x => x.Dimensions.Unit.Formula, //34
|
|
|
+ x => x.Dimensions.Unit.Format, //35
|
|
|
+ x => x.Dimensions.Unit.Code, //36
|
|
|
+ x => x.Dimensions.Unit.Description //37
|
|
|
);
|
|
|
}
|
|
|
|
|
@@ -881,6 +919,15 @@ public class POItemShell
|
|
|
public double DimensionsWeight { get; set; }
|
|
|
public double DimensionsValue { get; set; }
|
|
|
public string DimensionsUnitSize { get; set; }
|
|
|
+ public bool DimensionsHasHeight { get; set; }
|
|
|
+ public bool DimensionsHasLength { get; set; }
|
|
|
+ public bool DimensionsHasWidth { get; set; }
|
|
|
+ public bool DimensionsHasWeight { get; set; }
|
|
|
+ public bool DimensionsHasQuantity { get; set; }
|
|
|
+ public string DimensionsUnitFormula { get; set; }
|
|
|
+ public string DimensionsUnitFormat { get; set; }
|
|
|
+ public string DimensionsUnitCode { get; set; }
|
|
|
+ public string DimensionsUnitDescription { get; set; }
|
|
|
|
|
|
public POItemShell()
|
|
|
{
|
|
@@ -923,6 +970,15 @@ public class POItemShell
|
|
|
DimensionsValue = 0;
|
|
|
DimensionsUnitSize = "";
|
|
|
Cost = 0.0;
|
|
|
+ DimensionsHasHeight = false;
|
|
|
+ DimensionsHasLength = false;
|
|
|
+ DimensionsHasWidth = false;
|
|
|
+ DimensionsHasWeight = false;
|
|
|
+ DimensionsHasQuantity = false;
|
|
|
+ DimensionsUnitFormula = "";
|
|
|
+ DimensionsUnitFormat = "";
|
|
|
+ DimensionsUnitCode = "";
|
|
|
+ DimensionsUnitDescription = "";
|
|
|
}
|
|
|
|
|
|
public POItemShell DuplicateNewShell(POItemShell poitemshell)
|
|
@@ -968,7 +1024,16 @@ public class POItemShell
|
|
|
DimensionsWeight = poitemshell.DimensionsWeight,
|
|
|
DimensionsValue = poitemshell.DimensionsValue,
|
|
|
DimensionsUnitSize = poitemshell.DimensionsUnitSize,
|
|
|
- Cost = poitemshell.Cost
|
|
|
+ Cost = poitemshell.Cost,
|
|
|
+ DimensionsHasHeight = poitemshell.DimensionsHasHeight,
|
|
|
+ DimensionsHasLength = poitemshell.DimensionsHasLength,
|
|
|
+ DimensionsHasWidth = poitemshell.DimensionsHasWidth,
|
|
|
+ DimensionsHasWeight = poitemshell.DimensionsHasWeight,
|
|
|
+ DimensionsHasQuantity = poitemshell.DimensionsHasQuantity,
|
|
|
+ DimensionsUnitFormula = poitemshell.DimensionsUnitFormula,
|
|
|
+ DimensionsUnitFormat = poitemshell.DimensionsUnitFormat,
|
|
|
+ DimensionsUnitCode = poitemshell.DimensionsUnitCode,
|
|
|
+ DimensionsUnitDescription = poitemshell.DimensionsUnitDescription
|
|
|
};
|
|
|
return shell;
|
|
|
}
|