Преглед изворни кода

PRS MOBILE - fixes to stock transactions and changes to digital forms renderer in preparation for expressions with image.id saved

Nick-PRSDigital@bitbucket.org пре 2 година
родитељ
комит
9fc04822e7

+ 1 - 1
prs.mobile/comal.timesheets.Android/Properties/AndroidManifest.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="439100" android:versionName="4.39.1" package="au.com.frogsoftware.timesheets.comal_timesheets" android:installLocation="auto">
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="439200" android:versionName="4.39.2" package="au.com.frogsoftware.timesheets.comal_timesheets" android:installLocation="auto">
 	<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="31" />
 	<uses-permission android:name="android.permission.INTERNET" />
 	<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

+ 1 - 1
prs.mobile/comal.timesheets.Android/Resources/Resource.designer.cs

@@ -14,7 +14,7 @@ namespace comal.timesheets.Droid
 {
 	
 	
-	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "13.0.0.73")]
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "12.2.8.165")]
 	public partial class Resource
 	{
 		

+ 2 - 2
prs.mobile/comal.timesheets.iOS/Info.plist

@@ -9,9 +9,9 @@
 	<key>CFBundleName</key>
 	<string>TimeBench</string>
 	<key>CFBundleShortVersionString</key>
-	<string>4.39.1</string>
+	<string>4.39.2</string>
 	<key>CFBundleVersion</key>
-	<string>4.39.1</string>
+	<string>4.39.2</string>
 	<key>NSBluetoothAlwaysUsageDescription</key>
 	<string>Bluetooth access is needed to locate equipment items</string>
 	<key>NSBluetoothPeripheralUsageDescription</key>

+ 10 - 10
prs.mobile/comal.timesheets/DigitalForms/CustomUserControls/FrameButton.xaml.cs

@@ -12,18 +12,20 @@ namespace comal.timesheets
     public delegate void FrameButtonClicked();
 
     [XamlCompilation(XamlCompilationOptions.Compile)]
-	public partial class FrameButton : ContentView
-	{
+    public partial class FrameButton : ContentView
+    {
         public event FrameButtonClicked OnFrameButtonClicked;
         public string Data { get; set; }
 
-        public FrameButton ()
-		{
-			InitializeComponent ();
-		}
+        public string ExtraData { get; set; }
 
-		void Button_Clicked(object sender, EventArgs e)
-		{
+        public FrameButton()
+        {
+            InitializeComponent();
+        }
+
+        void Button_Clicked(object sender, EventArgs e)
+        {
             OnFrameButtonClicked?.Invoke();
         }
 
@@ -52,7 +54,5 @@ namespace comal.timesheets
             image.SetValue(Grid.RowProperty, 1);
             grid.Children.Add(image);
         }
-
-
     }
 }

+ 0 - 5
prs.mobile/comal.timesheets/DigitalForms/Renderer/QAFormViewer.cs

@@ -2045,11 +2045,6 @@ namespace comal.timesheets.QAForms
 
         }
 
-        public void SetFieldColour(string field, System.Drawing.Color? colour = null)
-        {
-            
-        }
-
 
         #endregion
     }

+ 7 - 2
prs.mobile/comal.timesheets/InOutBoard/StaffStatusPage.xaml.cs

@@ -9,6 +9,7 @@ using System.Threading.Tasks;
 using Syncfusion.XForms.PopupLayout;
 using Xamarin.Essentials;
 using System.Windows.Input;
+using PRSSecurity = InABox.Core.Security;
 
 namespace comal.timesheets
 {
@@ -49,16 +50,18 @@ namespace comal.timesheets
         CoreTable employees = null;
         CoreTable timesheets = null;
 
-        bool bManager = true;
+        bool bManager = false;
 
         public StaffStatusPage()
         {
             InitializeComponent();
+            if (PRSSecurity.IsAllowed<CanViewMobileInOutBoardDetails>())
+                bManager = true;
             ConfigurePage();
         }
 
         private void ConfigurePage()
-        {          
+        {
             NavigationPage.SetHasBackButton(this, false);
             ToolbarItems.Clear();
             ToolbarItems.Add(new ToolbarItem("Back", "", () =>
@@ -70,6 +73,8 @@ namespace comal.timesheets
             popupLayout.PopupView.HeaderTitle = "Contact Details";
 
             Title = "In/Out Board";
+
+
         }
 
         protected override void OnAppearing()

+ 2 - 2
prs.mobile/comal.timesheets/Main/MainPage.xaml.cs

@@ -118,8 +118,8 @@ namespace comal.timesheets
             string latestChanges = "";
             List<string> changes = new List<string>
             {
-                "- Improved Digital Forms Picker",
-                "- Password masking for Android",
+                "- Bug fixes stock control functions",
+                "- Improvements to Digital Form expressions",
                                                            
             };
             foreach (string s in changes)

+ 21 - 2
prs.mobile/comal.timesheets/Warehousing/Products/ProductShell.cs

@@ -10,7 +10,7 @@ namespace comal.timesheets
     {
         public Guid ID { get; set; }
         public string Name { get; set; }
-        public string Code { get; set; }    
+        public string Code { get; set; }
         public string Units { get; set; }
         public Guid ImageID { get; set; }
         public int Attachments { get; set; }
@@ -22,7 +22,7 @@ namespace comal.timesheets
         public double ImageColumnWidth { get; set; }
         public Image Image { get; set; }
 
-        public Guid DimensionsUnitID { get; set; }       
+        public Guid DimensionsUnitID { get; set; }
         public double DimensionsQuantity { get; set; }
         public double DimensionsLength { get; set; }
         public double DimensionsWidth { get; set; }
@@ -30,6 +30,16 @@ namespace comal.timesheets
         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 ProductShell()
         {
             ID = Guid.Empty;
@@ -53,6 +63,15 @@ namespace comal.timesheets
             DimensionsHeight = 0;
             DimensionsWeight = 0;
             DimensionsValue = 0;
+            DimensionsHasHeight = false;
+            DimensionsHasLength = false;
+            DimensionsHasWidth = false;
+            DimensionsHasWeight = false;
+            DimensionsHasQuantity = false;
+            DimensionsUnitFormula = "";
+            DimensionsUnitFormat = "";
+            DimensionsUnitCode = "";
+            DimensionsUnitDescription = "";
         }
     }
 }

+ 33 - 5
prs.mobile/comal.timesheets/Warehousing/Products/ProductsLoader.cs

@@ -50,10 +50,20 @@ namespace comal.timesheets
                     x => x.Dimensions.Height, //12
                     x => x.Dimensions.Weight, //13
                     x => x.Dimensions.Value, //14
-                    x => x.Dimensions.UnitSize //15 STRING
+                    x => x.Dimensions.UnitSize, //15
+                    x => x.Dimensions.Unit.HasHeight, //16
+                    x => x.Dimensions.Unit.HasLength, //17
+                    x => x.Dimensions.Unit.HasWidth, //18
+                    x => x.Dimensions.Unit.HasWeight, //19
+                    x => x.Dimensions.Unit.HasQuantity, //20
+                    x => x.Dimensions.Unit.Formula, //21
+                    x => x.Dimensions.Unit.Format, //22
+                    x => x.Dimensions.Unit.Code, //23
+                    x => x.Dimensions.Unit.Description //24
                     ),
                    new SortOrder<Product>(x => x.Name));
                 string emptyString = "";
+                string issuesList = "";
                 foreach (CoreRow row in table.Rows)
                 {
                     List<object> list = row.Values;
@@ -73,6 +83,15 @@ namespace comal.timesheets
                     if (list[13] == null) { list[13] = 0; } //13
                     if (list[14] == null) { list[14] = 0; } //14
                     if (list[15] == null) { list[15] = emptyString; } //15
+                    if (list[16] == null) { list[16] = false; } //16
+                    if (list[17] == null) { list[17] = false; } //17
+                    if (list[18] == null) { list[18] = false; } //18
+                    if (list[19] == null) { list[19] = false; } //19
+                    if (list[20] == null) { list[20] = false; } //20
+                    if (list[21] == null) { list[21] = ""; } //21
+                    if (list[22] == null) { list[22] = ""; } //22
+                    if (list[23] == null) { list[23] = ""; } //23
+                    if (list[24] == null) { list[24] = ""; } //24
 
                     ProductShell productShell = new ProductShell();
 
@@ -82,12 +101,12 @@ namespace comal.timesheets
                     productShell.Units = "Units: " + list[3].ToString();
                     productShell.ImageID = Guid.Parse(list[4].ToString());
                     productShell.TotalStock = list[5].ToString();
-                    if (productShell.TotalStock.Length > 6) 
+                    if (productShell.TotalStock.Length > 6)
                         productShell.TotalStock = productShell.TotalStock.Substring(0, 5);
 
                     productShell.TotalStock = "Total Stock: " + productShell.TotalStock;
                     productShell.ReservedStock = list[6].ToString();
-                    if (productShell.ReservedStock.Length > 6) 
+                    if (productShell.ReservedStock.Length > 6)
                         productShell.ReservedStock = productShell.ReservedStock.Substring(0, 5);
 
                     productShell.ReservedStock = "Reserved Stock: " + productShell.ReservedStock;
@@ -100,6 +119,15 @@ namespace comal.timesheets
                     productShell.DimensionsWeight = double.Parse(list[13].ToString());
                     productShell.DimensionsValue = double.Parse(list[14].ToString());
                     productShell.DimensionsUnitSize = list[15].ToString();
+                    productShell.DimensionsHasHeight = bool.Parse(list[16].ToString());
+                    productShell.DimensionsHasLength = bool.Parse(list[17].ToString());
+                    productShell.DimensionsHasWidth = bool.Parse(list[18].ToString());
+                    productShell.DimensionsHasWeight = bool.Parse(list[19].ToString());
+                    productShell.DimensionsHasQuantity = bool.Parse(list[20].ToString());
+                    productShell.DimensionsUnitFormula = list[21].ToString();
+                    productShell.DimensionsUnitFormat = list[22].ToString();
+                    productShell.DimensionsUnitCode = list[23].ToString();
+                    productShell.DimensionsUnitDescription = list[24].ToString();
 
                     if (productShell.ImageID != Guid.Empty)
                     {
@@ -110,7 +138,7 @@ namespace comal.timesheets
                     ProductShells.Add(productShell);
                     if (!FamilyStrings.Contains(list[2].ToString()) && !string.IsNullOrWhiteSpace(list[2].ToString()))
                     {
-                        FamilyStrings.Add(list[2].ToString());                     
+                        FamilyStrings.Add(list[2].ToString());
                     }
                 }
                 FamilyStrings.Sort();
@@ -118,7 +146,7 @@ namespace comal.timesheets
                 {
                     ProductFamily family = new ProductFamily() { Name = s };
                     Families.Add(family);
-                }                
+                }
                 GlobalVariables.ProductFamilies = Families;
                 GlobalVariables.ProductShells = ProductShells;
                 GlobalVariables.ProductsLoaded = true;

+ 69 - 4
prs.mobile/comal.timesheets/Warehousing/Receivals/Receivals.xaml.cs

@@ -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;
     }

+ 27 - 0
prs.mobile/comal.timesheets/Warehousing/Stocktake/StocktakePage.xaml.cs

@@ -135,6 +135,15 @@ namespace comal.timesheets
                         shell.DimensionsWeight = products.SelectedProduct.DimensionsWeight;
                         shell.DimensionsValue = products.SelectedProduct.DimensionsValue;
                         shell.DimensionsUnitSize = products.SelectedProduct.DimensionsUnitSize;
+                        shell.DimensionsHasHeight = products.SelectedProduct.DimensionsHasHeight;
+                        shell.DimensionsHasLength = products.SelectedProduct.DimensionsHasLength;
+                        shell.DimensionsHasWidth = products.SelectedProduct.DimensionsHasWidth;
+                        shell.DimensionsHasWeight = products.SelectedProduct.DimensionsHasWeight;
+                        shell.DimensionsHasQuantity = products.SelectedProduct.DimensionsHasQuantity;
+                        shell.DimensionsUnitFormula = products.SelectedProduct.DimensionsUnitFormula;
+                        shell.DimensionsUnitFormat = products.SelectedProduct.DimensionsUnitFormat;
+                        shell.DimensionsUnitCode = products.SelectedProduct.DimensionsUnitCode;
+                        shell.DimensionsUnitDescription = products.SelectedProduct.DimensionsUnitDescription;
                         stockHoldingShells.Add(shell);
                         rightListView.ItemsSource = null;
                         rightListView.ItemsSource = stockHoldingShells;
@@ -275,6 +284,15 @@ namespace comal.timesheets
                 movement.Dimensions.Weight = shell.DimensionsWeight;
                 movement.Dimensions.Value = shell.DimensionsValue;
                 movement.Dimensions.UnitSize = shell.DimensionsUnitSize;
+                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.Product.ID = shell.ProductID;
                 movement.Product.Code = shell.Code;
                 movement.Product.Name = shell.Name;
@@ -319,6 +337,15 @@ namespace comal.timesheets
                     additionalmovement.Dimensions.Weight = shell.DimensionsWeight;
                     additionalmovement.Dimensions.Value = shell.DimensionsValue;
                     additionalmovement.Dimensions.UnitSize = shell.DimensionsUnitSize;
+                    additionalmovement.Dimensions.Unit.HasHeight = shell.DimensionsHasHeight;
+                    additionalmovement.Dimensions.Unit.HasLength = shell.DimensionsHasLength;
+                    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.Product.ID = shell.ProductID;
                     additionalmovement.Product.Code = shell.Code;
                     additionalmovement.Product.Name = shell.Name;

+ 55 - 6
prs.mobile/comal.timesheets/Warehousing/Transfer/RecTrans.xaml.cs

@@ -2,16 +2,11 @@
 using Comal.Classes;
 using InABox.Clients;
 using InABox.Core;
-using Plugin.Media;
 using System;
 using System.Collections.Generic;
 using System.IO;
 using System.Linq;
-using System.Linq.Expressions;
-using System.Text;
-using System.Threading;
 using System.Threading.Tasks;
-using Xamarin.CommunityToolkit.Extensions;
 using Xamarin.CommunityToolkit.UI.Views;
 using Xamarin.Essentials;
 using Xamarin.Forms;
@@ -539,7 +534,16 @@ namespace comal.timesheets
                        x => x.Dimensions.Width, //17
                        x => x.Dimensions.Height, //18
                        x => x.Dimensions.Weight, //19
-                       x => x.Dimensions.Value //20
+                       x => x.Dimensions.Value, //20
+                       x => x.Dimensions.Unit.HasHeight, //21
+                       x => x.Dimensions.Unit.HasLength, //22
+                       x => x.Dimensions.Unit.HasWidth, //23
+                       x => x.Dimensions.Unit.HasWeight, //24
+                       x => x.Dimensions.Unit.HasQuantity, //25
+                       x => x.Dimensions.Unit.Formula, //26
+                       x => x.Dimensions.Unit.Format, //27
+                       x => x.Dimensions.Unit.Code, //28
+                       x => x.Dimensions.Unit.Description //29
                        ),
                    null
                    );
@@ -569,6 +573,15 @@ namespace comal.timesheets
                         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
+                        if (list[21] == null) { list[21] = false; } //21
+                        if (list[22] == null) { list[22] = false; } //22
+                        if (list[23] == null) { list[23] = false; } //23
+                        if (list[24] == null) { list[24] = false; } //24
+                        if (list[25] == null) { list[25] = false; } //25
+                        if (list[26] == null) { list[26] = ""; } //26
+                        if (list[27] == null) { list[27] = ""; } //27
+                        if (list[28] == null) { list[28] = ""; } //28
+                        if (list[29] == null) { list[29] = ""; } //29
 
                         StockHoldingShell shell = new StockHoldingShell();
 
@@ -596,6 +609,15 @@ namespace comal.timesheets
                         shell.DimensionsHeight = double.Parse(list[18].ToString());
                         shell.DimensionsWeight = double.Parse(list[19].ToString());
                         shell.DimensionsValue = double.Parse(list[20].ToString());
+                        shell.DimensionsHasHeight = bool.Parse(list[21].ToString());
+                        shell.DimensionsHasLength = bool.Parse(list[22].ToString());
+                        shell.DimensionsHasWidth = bool.Parse(list[23].ToString());
+                        shell.DimensionsHasWeight = bool.Parse(list[24].ToString());
+                        shell.DimensionsHasQuantity = bool.Parse(list[25].ToString());
+                        shell.DimensionsUnitFormula = list[26].ToString();
+                        shell.DimensionsUnitFormat = list[27].ToString();
+                        shell.DimensionsUnitCode = list[28].ToString();
+                        shell.DimensionsUnitDescription = list[29].ToString();
 
                         double units = 0.0;
                         if (!shell.Code.Contains("FREIGHT"))
@@ -705,6 +727,15 @@ namespace comal.timesheets
                 DimensionsWeight = shell.DimensionsWeight,
                 DimensionsValue = shell.DimensionsValue,
                 DimensionsUnitSize = shell.DimensionsUnitSize,
+                DimensionsHasHeight = shell.DimensionsHasHeight,
+                DimensionsHasLength = shell.DimensionsHasLength,
+                DimensionsHasWidth = shell.DimensionsHasWidth,
+                DimensionsHasWeight = shell.DimensionsHasWeight,
+                DimensionsHasQuantity = shell.DimensionsHasQuantity,
+                DimensionsUnitFormula = shell.DimensionsUnitFormula,
+                DimensionsUnitFormat = shell.DimensionsUnitFormat,
+                DimensionsUnitCode = shell.DimensionsUnitCode,
+                DimensionsUnitDescription = shell.DimensionsUnitDescription,
             };
 
             return NewShell;
@@ -951,6 +982,15 @@ namespace comal.timesheets
         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 StockHoldingShell()
         {
             ID = Guid.Empty;
@@ -981,6 +1021,15 @@ namespace comal.timesheets
             DimensionsWeight = 0;
             DimensionsValue = 0;
             DimensionsUnitSize = "";
+            DimensionsHasHeight = false;
+            DimensionsHasLength = false;
+            DimensionsHasWidth = false;
+            DimensionsHasWeight = false;
+            DimensionsHasQuantity = false;
+            DimensionsUnitFormula = "";
+            DimensionsUnitFormat = "";
+            DimensionsUnitCode = "";
+            DimensionsUnitDescription = "";
         }
     }
 

+ 12 - 3
prs.mobile/comal.timesheets/Warehousing/Transfer/RecTransCompletion.xaml.cs

@@ -167,12 +167,21 @@ namespace comal.timesheets
             movement.Dimensions.Weight = shell.DimensionsWeight;
             movement.Dimensions.Value = shell.DimensionsValue;
             movement.Dimensions.UnitSize = shell.DimensionsUnitSize;
+            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.Product.ID = shell.ProductID;
             movement.Product.Code = shell.Code;
             movement.Product.Name = shell.Name;
             movement.Employee.ID = GlobalVariables.EmpID;
             movement.Employee.Name = GlobalVariables.EmpName;
-            
+
             if (issuing)
             {
                 StockHoldingShell originalShell = originalHoldings.First(x => x.ID == shell.ID);
@@ -203,7 +212,7 @@ namespace comal.timesheets
                 if (receivingJob.ID != Guid.Empty && !innerloop)
                 {
                     if (originalShell.JobID != receivingJob.ID)
-                    {                       
+                    {
                         CreateStockMovement(shell, batch, false, true, true);
                         CreateStockMovement(shell, batch, true, false, true);
                     }
@@ -246,7 +255,7 @@ namespace comal.timesheets
             }
             stockMovements.Add(movement);
         }
-        
+
         #region Photos
         private async void SavePhotos(Guid batchID)
         {