|
|
@@ -281,18 +281,18 @@ namespace comal.timesheets
|
|
|
movement.Dimensions.Length = shell.DimensionsLength;
|
|
|
movement.Dimensions.Width = shell.DimensionsWidth;
|
|
|
movement.Dimensions.Height = shell.DimensionsHeight;
|
|
|
- movement.Dimensions.Weight = shell.DimensionsWeight;
|
|
|
+ movement.Dimensions.Weight = shell.DimensionsWeight;
|
|
|
movement.Dimensions.Unit.HasHeight = shell.DimensionsHasHeight;
|
|
|
movement.Dimensions.Unit.HasLength = shell.DimensionsHasLength;
|
|
|
movement.Dimensions.Unit.HasWidth = shell.DimensionsHasWidth;
|
|
|
movement.Dimensions.Unit.HasWeight = shell.DimensionsHasWeight;
|
|
|
movement.Dimensions.Unit.HasQuantity = shell.DimensionsHasQuantity;
|
|
|
- movement.Dimensions.Unit.Formula = shell.DimensionsUnitFormula;
|
|
|
- movement.Dimensions.Unit.Format = shell.DimensionsUnitFormat;
|
|
|
movement.Dimensions.Unit.Code = shell.DimensionsUnitCode;
|
|
|
movement.Dimensions.Unit.Description = shell.DimensionsUnitDescription;
|
|
|
- movement.Dimensions.UnitSize = shell.DimensionsUnitSize;
|
|
|
movement.Dimensions.Value = shell.DimensionsValue;
|
|
|
+ movement.Dimensions.Unit.Formula = shell.DimensionsUnitFormula;
|
|
|
+ movement.Dimensions.Unit.Format = shell.DimensionsUnitFormat;
|
|
|
+ movement.Dimensions.UnitSize = shell.DimensionsUnitSize;
|
|
|
movement.Product.ID = shell.ProductID;
|
|
|
movement.Product.Code = shell.Code;
|
|
|
movement.Product.Name = shell.Name;
|
|
|
@@ -327,7 +327,7 @@ namespace comal.timesheets
|
|
|
//if style is changed, create a movement that issues everything from the original style
|
|
|
//in addition to the first movement created being changed to a receive of the entered qty in the new style
|
|
|
//no need to find the difference in Qty from the original. First movement qty issued should be 0
|
|
|
- if (popup.Shell.StyleID != originalShell.StyleID & popup.Shell.ID != Guid.Empty)
|
|
|
+ if (popup.Shell.StyleID != originalShell.StyleID)
|
|
|
{
|
|
|
additionalmovement.Dimensions.Unit.ID = shell.DimensionsUnitID;
|
|
|
additionalmovement.Dimensions.Quantity = shell.DimensionsQuantity;
|
|
|
@@ -340,12 +340,12 @@ namespace comal.timesheets
|
|
|
additionalmovement.Dimensions.Unit.HasWidth = shell.DimensionsHasWidth;
|
|
|
additionalmovement.Dimensions.Unit.HasWeight = shell.DimensionsHasWeight;
|
|
|
additionalmovement.Dimensions.Unit.HasQuantity = shell.DimensionsHasQuantity;
|
|
|
- additionalmovement.Dimensions.Unit.Formula = shell.DimensionsUnitFormula;
|
|
|
- additionalmovement.Dimensions.Unit.Format = shell.DimensionsUnitFormat;
|
|
|
additionalmovement.Dimensions.Unit.Code = shell.DimensionsUnitCode;
|
|
|
additionalmovement.Dimensions.Unit.Description = shell.DimensionsUnitDescription;
|
|
|
- additionalmovement.Dimensions.UnitSize = shell.DimensionsUnitSize;
|
|
|
additionalmovement.Dimensions.Value = shell.DimensionsValue;
|
|
|
+ additionalmovement.Dimensions.Unit.Formula = shell.DimensionsUnitFormula;
|
|
|
+ additionalmovement.Dimensions.Unit.Format = shell.DimensionsUnitFormat;
|
|
|
+ additionalmovement.Dimensions.UnitSize = shell.DimensionsUnitSize;
|
|
|
additionalmovement.Product.ID = shell.ProductID;
|
|
|
additionalmovement.Product.Code = shell.Code;
|
|
|
additionalmovement.Product.Name = shell.Name;
|
|
|
@@ -465,6 +465,15 @@ namespace comal.timesheets
|
|
|
DimensionsHeight = shell.DimensionsHeight,
|
|
|
DimensionsWeight = shell.DimensionsWeight,
|
|
|
DimensionsValue = shell.DimensionsValue,
|
|
|
+ DimensionsHasHeight = shell.DimensionsHasHeight,
|
|
|
+ DimensionsHasLength = shell.DimensionsHasLength,
|
|
|
+ DimensionsHasQuantity = shell.DimensionsHasQuantity,
|
|
|
+ DimensionsHasWidth = shell.DimensionsHasWidth,
|
|
|
+ DimensionsHasWeight = shell.DimensionsHasWeight,
|
|
|
+ DimensionsUnitCode = shell.DimensionsUnitCode,
|
|
|
+ DimensionsUnitDescription = shell.DimensionsUnitDescription,
|
|
|
+ DimensionsUnitFormat = shell.DimensionsUnitFormat,
|
|
|
+ DimensionsUnitFormula = shell.DimensionsUnitFormula,
|
|
|
DimensionsUnitSize = shell.DimensionsUnitSize,
|
|
|
Finish = shell.Finish,
|
|
|
Units = shell.Units,
|
|
|
@@ -543,27 +552,34 @@ namespace comal.timesheets
|
|
|
_filter,
|
|
|
new Columns<StockHolding>
|
|
|
(
|
|
|
- x => x.ID, //0
|
|
|
- x => x.Product.Code, //1
|
|
|
- x => x.Product.Name, //2
|
|
|
- x => x.Style.Description, //3
|
|
|
- x => x.Dimensions.UnitSize, //4
|
|
|
- x => x.Units, //5
|
|
|
- x => x.Location.ID, //6
|
|
|
- x => x.Job.ID, //7
|
|
|
- x => x.Job.Name, //8
|
|
|
- x => x.Job.JobNumber, //9
|
|
|
- x => x.Style.ID, //10
|
|
|
- x => x.Style.Code, //11
|
|
|
- x => x.Product.ID, //12
|
|
|
- x => x.Product.Image.ID, //13
|
|
|
- x => x.Dimensions.Unit.ID, //14
|
|
|
- x => x.Dimensions.Quantity, //15
|
|
|
- x => x.Dimensions.Length, //16
|
|
|
- x => x.Dimensions.Width, //17
|
|
|
- x => x.Dimensions.Height, //18
|
|
|
- x => x.Dimensions.Weight, //19
|
|
|
- x => x.Dimensions.Value //20
|
|
|
+ x => x.ID,
|
|
|
+ x => x.Product.Code,
|
|
|
+ x => x.Product.Name,
|
|
|
+ x => x.Style.Description,
|
|
|
+ x => x.Units,
|
|
|
+ x => x.Location.ID,
|
|
|
+ x => x.Job.ID,
|
|
|
+ x => x.Job.Name,
|
|
|
+ x => x.Job.JobNumber,
|
|
|
+ x => x.Style.ID,
|
|
|
+ x => x.Style.Code,
|
|
|
+ x => x.Product.ID,
|
|
|
+ x => x.Product.Image.ID,
|
|
|
+ x => x.Dimensions.UnitSize,
|
|
|
+ x => x.Dimensions.Unit.ID,
|
|
|
+ x => x.Dimensions.Quantity,
|
|
|
+ x => x.Dimensions.Length,
|
|
|
+ x => x.Dimensions.Width,
|
|
|
+ x => x.Dimensions.Height,
|
|
|
+ x => x.Dimensions.Weight,
|
|
|
+ x => x.Dimensions.Value,
|
|
|
+ x => x.Dimensions.Unit.HasQuantity,
|
|
|
+ x => x.Dimensions.Unit.HasLength,
|
|
|
+ x => x.Dimensions.Unit.HasWeight,
|
|
|
+ x => x.Dimensions.Unit.HasWidth,
|
|
|
+ x => x.Dimensions.Unit.HasHeight,
|
|
|
+ x => x.Dimensions.Unit.Format,
|
|
|
+ x => x.Dimensions.Unit.Formula
|
|
|
),
|
|
|
null
|
|
|
);
|
|
|
@@ -571,66 +587,49 @@ namespace comal.timesheets
|
|
|
{
|
|
|
foreach (CoreRow row in table.Rows)
|
|
|
{
|
|
|
- List<object> list = row.Values;
|
|
|
- if (list[0] == null) { list[0] = Guid.Empty; } //0
|
|
|
- if (list[1] == null) { list[1] = ""; } //1
|
|
|
- if (list[2] == null) { list[2] = ""; } //2
|
|
|
- if (list[3] == null) { list[3] = ""; } //3
|
|
|
- if (list[4] == null) { list[4] = ""; } //4
|
|
|
- if (list[5] == null) { list[5] = 0.0; } //5
|
|
|
- if (list[6] == null) { list[6] = Guid.Empty; } //6
|
|
|
- if (list[7] == null) { list[7] = Guid.Empty; } //7
|
|
|
- if (list[8] == null) { list[8] = ""; } //8
|
|
|
- if (list[9] == null) { list[9] = ""; } //9
|
|
|
- if (list[10] == null) { list[10] = Guid.Empty; } //10
|
|
|
- if (list[11] == null) { list[11] = ""; } //11
|
|
|
- if (list[12] == null) { list[12] = Guid.Empty; } //12
|
|
|
- if (list[13] == null) { list[13] = Guid.Empty; } //13
|
|
|
- if (list[14] == null) { list[14] = Guid.Empty; } //14
|
|
|
- if (list[15] == null) { list[15] = 0.0; } //15
|
|
|
- if (list[16] == null) { list[16] = 0.0; } //16
|
|
|
- if (list[17] == null) { list[17] = 0.0; } //17
|
|
|
- if (list[18] == null) { list[18] = 0.0; } //18
|
|
|
- if (list[19] == null) { list[19] = 0.0; } //19
|
|
|
- if (list[20] == null) { list[20] = 0.0; } //20
|
|
|
-
|
|
|
StockHoldingShell shell = new StockHoldingShell();
|
|
|
|
|
|
- shell.ID = Guid.Parse(list[0].ToString());
|
|
|
- shell.Code = list[1].ToString();
|
|
|
- shell.Name = list[2].ToString();
|
|
|
- shell.Finish = list[3].ToString();
|
|
|
- shell.DisplayFinish = "Finish: " + list[3].ToString();
|
|
|
- shell.Units = double.Parse(list[5].ToString());
|
|
|
- shell.DisplaySize = "Size: " + list[4].ToString();
|
|
|
+ shell.ID = row.Get<StockHolding, Guid>(x => x.Location.ID).ToString()
|
|
|
+ + row.Get<StockHolding, Guid>(x => x.Product.ID).ToString()
|
|
|
+ + row.Get<StockHolding, Guid>(x => x.Job.ID).ToString()
|
|
|
+ + row.Get<StockHolding, Guid>(x => x.Style.ID).ToString()
|
|
|
+ + row.Get<StockHolding, string>(x => x.Dimensions.UnitSize);
|
|
|
+ shell.Code = row.Get<StockHolding, string>(x => x.Product.Code);
|
|
|
+ shell.Name = row.Get<StockHolding, string>(x => x.Product.Name);
|
|
|
+ shell.Finish = row.Get<StockHolding, string>(x => x.Style.Description);
|
|
|
+ shell.DisplayFinish = "Finish: " + shell.Finish;
|
|
|
+ shell.Units = row.Get<StockHolding, double>(x => x.Units);
|
|
|
+ shell.DimensionsUnitSize = row.Get<StockHolding, string>(x => x.Dimensions.UnitSize);
|
|
|
+ shell.DisplaySize = "UOM: " + shell.DimensionsUnitSize;
|
|
|
shell.DisplayUnits = "Units: " + shell.Units;
|
|
|
- shell.JobID = Guid.Parse(list[7].ToString());
|
|
|
- shell.JobName = list[8].ToString();
|
|
|
- shell.JobNumber = list[9].ToString();
|
|
|
+ shell.JobID = row.Get<StockHolding, Guid>(x => x.Job.ID);
|
|
|
+ shell.JobName = row.Get<StockHolding, string>(x => x.Job.Name);
|
|
|
+ shell.JobNumber = row.Get<StockHolding, string>(x => x.Job.JobNumber);
|
|
|
shell.DisplayJob = "Job: " + shell.JobNumber;
|
|
|
- shell.StyleID = Guid.Parse(list[10].ToString());
|
|
|
- shell.StyleCode = list[11].ToString();
|
|
|
- shell.ProductID = Guid.Parse(list[12].ToString());
|
|
|
- shell.ImageID = Guid.Parse(list[13].ToString());
|
|
|
- shell.DimensionsUnitID = Guid.Parse(list[14].ToString());
|
|
|
- shell.DimensionsQuantity = double.Parse(list[15].ToString());
|
|
|
- shell.DimensionsLength = double.Parse(list[16].ToString());
|
|
|
- shell.DimensionsWidth = double.Parse(list[17].ToString());
|
|
|
- shell.DimensionsHeight = double.Parse(list[18].ToString());
|
|
|
- shell.DimensionsWeight = double.Parse(list[19].ToString());
|
|
|
- shell.DimensionsValue = double.Parse(list[20].ToString());
|
|
|
-
|
|
|
- double units = 0.0;
|
|
|
- if (!shell.Code.Contains("FREIGHT"))
|
|
|
+ shell.StyleID = row.Get<StockHolding, Guid>(x => x.Style.ID);
|
|
|
+ shell.StyleCode = row.Get<StockHolding, string>(x => x.Style.Code);
|
|
|
+ shell.ProductID = row.Get<StockHolding, Guid>(x => x.Product.ID);
|
|
|
+ shell.ImageID = row.Get<StockHolding, Guid>(x => x.Product.Image.ID);
|
|
|
+ shell.DimensionsUnitID = row.Get<StockHolding, Guid>(x => x.Dimensions.Unit.ID);
|
|
|
+ shell.DimensionsQuantity = row.Get<StockHolding, double>(x => x.Dimensions.Quantity);
|
|
|
+ shell.DimensionsLength = row.Get<StockHolding, double>(x => x.Dimensions.Length);
|
|
|
+ shell.DimensionsWidth = row.Get<StockHolding, double>(x => x.Dimensions.Width);
|
|
|
+ shell.DimensionsHeight = row.Get<StockHolding, double>(x => x.Dimensions.Height);
|
|
|
+ shell.DimensionsWeight = row.Get<StockHolding, double>(x => x.Dimensions.Weight);
|
|
|
+ shell.DimensionsValue = row.Get<StockHolding, double>(x => x.Dimensions.Value);
|
|
|
+ shell.DimensionsHasHeight = row.Get<StockHolding, bool>(x => x.Dimensions.Unit.HasHeight);
|
|
|
+ shell.DimensionsHasWeight = row.Get<StockHolding, bool>(x => x.Dimensions.Unit.HasWeight);
|
|
|
+ shell.DimensionsHasLength = row.Get<StockHolding, bool>(x => x.Dimensions.Unit.HasLength);
|
|
|
+ shell.DimensionsHasQuantity = row.Get<StockHolding, bool>(x => x.Dimensions.Unit.HasQuantity);
|
|
|
+ shell.DimensionsHasWidth = row.Get<StockHolding, bool>(x => x.Dimensions.Unit.HasWidth);
|
|
|
+ shell.DimensionsUnitFormat = row.Get<StockHolding, string>(x => x.Dimensions.Unit.Format);
|
|
|
+ shell.DimensionsUnitFormula = row.Get<StockHolding, string>(x => x.Dimensions.Unit.Formula);
|
|
|
+
|
|
|
+ if (!shell.Code.Contains("FREIGHT") && shell.Units != 0)
|
|
|
{
|
|
|
- if (double.TryParse(list[5].ToString(), out units))
|
|
|
- {
|
|
|
- if (units > 0)
|
|
|
- {
|
|
|
- stockHoldingShells.Add(shell);
|
|
|
- }
|
|
|
- }
|
|
|
+ stockHoldingShells.Add(shell);
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
LoadImages();
|
|
|
Device.BeginInvokeOnMainThread(() =>
|