浏览代码

Removed Images Download from Stocktake Product Lookup

Frank vandenBos 2 月之前
父节点
当前提交
30d22f4d52

+ 1 - 1
prs.mobile.new/PRS.Mobile.Droid/PRS.Mobile.Droid.csproj

@@ -14,7 +14,7 @@
         <AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
         <MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
         <MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>
-        <TargetFrameworkVersion>v13.0</TargetFrameworkVersion>
+        <AndroidUseLatestPlatformSdk>True</AndroidUseLatestPlatformSdk>
         <AndroidHttpClientHandlerType>Xamarin.Android.Net.AndroidClientHandler</AndroidHttpClientHandlerType>
         <AndroidSupportedAbis>armeabi-v7a;x86;arm64-v8a;x86_64</AndroidSupportedAbis>
         <LangVersion>9</LangVersion>

+ 1 - 1
prs.mobile.new/PRS.Mobile.iOS/Info.plist

@@ -27,7 +27,7 @@
 	<key>CFBundleIdentifier</key>
 	<string>com.prsdigital.prssiteapp</string>
 	<key>CFBundleVersion</key>
-	<string>8.25.0</string>
+	<string>8.25.1</string>
 	<key>UILaunchStoryboardName</key>
 	<string>LaunchScreen</string>
 	<key>CFBundleName</key>

+ 8 - 2
prs.mobile.new/PRS.Mobile.iOS/PRS.Mobile.iOS.csproj

@@ -28,6 +28,8 @@
     <MtouchDebug>true</MtouchDebug>
     <MtouchNoSymbolStrip>true</MtouchNoSymbolStrip>
     <IOSDebugOverWiFi>true</IOSDebugOverWiFi>
+    <MtouchExtraArgs></MtouchExtraArgs>
+    <CodesignKey>iPhone Developer</CodesignKey>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
     <DebugType>none</DebugType>
@@ -38,6 +40,9 @@
     <MtouchLink>None</MtouchLink>
     <MtouchArch>x86_64</MtouchArch>
     <ConsolePause>false</ConsolePause>
+    <MtouchFloat32>true</MtouchFloat32>
+    <MtouchExtraArgs></MtouchExtraArgs>
+    <CodesignKey>iPhone Developer</CodesignKey>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
     <DebugSymbols>true</DebugSymbols>
@@ -57,7 +62,7 @@
     <CreatePackage>
     </CreatePackage>
     <MtouchLink>None</MtouchLink>
-    <MtouchExtraArgs>--interpreter</MtouchExtraArgs>
+    <MtouchExtraArgs></MtouchExtraArgs>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
     <DebugType>none</DebugType>
@@ -77,6 +82,7 @@
     <CrashReportingEnabled>false</CrashReportingEnabled>
     <EnableCodeSigning>
     </EnableCodeSigning>
+    <MtouchExtraArgs></MtouchExtraArgs>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Ad-Hoc|iPhone' ">
     <DebugType>none</DebugType>
@@ -223,7 +229,7 @@
       <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
     </PackageReference>
     <PackageReference Include="System.Json" Version="4.7.1" />
-    <PackageReference Include="Xamarin.Essentials" Version="1.8.0" />
+    <PackageReference Include="Xamarin.Essentials" Version="1.8.1" />
     <PackageReference Include="Xamarin.Forms" Version="5.0.0.2662" />
     <PackageReference Include="Xamarin.IQKeyboardManager" Version="1.4.1" />
     <PackageReference Include="XF.Material" Version="1.8.0" />

+ 9 - 0
prs.mobile.new/PRS.Mobile/Data Models/Lists/Product/ProductModel.cs

@@ -21,4 +21,13 @@ namespace PRS.Mobile
         
         protected override Expression<Func<Product, object>> ImageColumn => x => x.Image.ID;
     }
+    
+    public class ProductLookupModel : CoreRepository<ProductLookupModel, ProductLookupShell, Product>
+    {
+        public ProductLookupModel(IModelHost host, Func<Filter<Product>> filter): base(host, filter)
+        {
+        }
+        
+ 
+    }
 }

+ 63 - 0
prs.mobile.new/PRS.Mobile/Data Models/Lists/Product/ProductShell.cs

@@ -84,5 +84,68 @@ namespace PRS.Mobile
             App.Data.ProductDimensionUnits.FirstOrDefault(x => x.ID == DimensionsUnitID);
 
         
+    }
+    
+        public class ProductLookupShell : Shell<ProductLookupModel, Product>
+    {
+        protected override void ConfigureColumns(ShellColumns<ProductLookupModel, Product> columns)
+        {
+            columns
+                .Map(nameof(Code), x => x.Code)
+                .Map(nameof(Name), x => x.Name)
+                .Map(nameof(GroupID), x => x.Group.ID)
+                .Map(nameof(GroupCode), x => x.Group.Code)
+                .Map(nameof(GroupDescription), x => x.Group.Description)
+                .Map(nameof(DimensionsUnitID), x => x.DefaultInstance.Dimensions.Unit.ID)
+                .Map(nameof(DimensionsQuantity), x => x.DefaultInstance.Dimensions.Quantity)
+                .Map(nameof(DimensionsLength), x => x.DefaultInstance.Dimensions.Length)
+                .Map(nameof(DimensionsWidth), x => x.DefaultInstance.Dimensions.Width)
+                .Map(nameof(DimensionsHeight), x => x.DefaultInstance.Dimensions.Height)
+                .Map(nameof(DimensionsWeight), x => x.DefaultInstance.Dimensions.Weight)
+                .Map(nameof(DimensionsValue), x => x.DefaultInstance.Dimensions.Value)
+                .Map(nameof(DimensionsUnitSize), x => x.DefaultInstance.Dimensions.UnitSize)
+                .Map(nameof(DefaultStyleID), x => x.DefaultInstance.Style.ID)
+                .Map(nameof(DefaultStyleCode), x => x.DefaultInstance.Style.Code)
+                .Map(nameof(DefaultStyleDescription), x => x.DefaultInstance.Style.Description)
+                .Map(nameof(Units), x => x.UnitQty)
+                .Map(nameof(TotalStock), x => x.TotalStock)
+                .Map(nameof(ReservedStock), x => x.ReservedStock)
+                .Map(nameof(AverageCost), x => x.DefaultInstance.AverageCost);
+                ;
+        }
+        
+        public static Filter<Product> AllProducts => LookupFactory.DefineFilter<Product>();
+        
+        public string Code => Get<string>();
+        public string Name => Get<string>();
+        
+        public Guid GroupID => Get<Guid>();
+        public String GroupCode => Get<String>();
+        public String GroupDescription => Get<String>();
+        
+        public Guid DefaultStyleID => Get<Guid>();
+        public String DefaultStyleCode => Get<String>();
+        public String DefaultStyleDescription => Get<String>();
+        
+        public Guid DimensionsUnitID => Get<Guid>();
+        public double DimensionsQuantity => Row.Get<Product,double>(x => x.DefaultInstance.Dimensions.Quantity);
+        public double DimensionsLength => Row.Get<Product,double>(x => x.DefaultInstance.Dimensions.Length);
+        public double DimensionsWidth => Row.Get<Product,double>(x => x.DefaultInstance.Dimensions.Width);
+        public double DimensionsHeight => Row.Get<Product,double>(x => x.DefaultInstance.Dimensions.Height);
+        public double DimensionsWeight => Row.Get<Product,double>(x => x.DefaultInstance.Dimensions.Weight);
+        public double DimensionsValue => Row.Get<Product,double>(x => x.DefaultInstance.Dimensions.Value);
+        public string DimensionsUnitSize => Row.Get<Product,string>(x => x.DefaultInstance.Dimensions.UnitSize);
+        
+        public double AverageCost => Get<double>();
+
+        public double Units => Get<double>();
+        public double TotalStock => Get<double>();
+        public double ReservedStock => Get<double>();
+        public double AvailableStock => TotalStock - ReservedStock;
+
+        public ProductDimensionUnitShell DimensionsUnit =>
+            App.Data.ProductDimensionUnits.FirstOrDefault(x => x.ID == DimensionsUnitID);
+
+        
     }
 }

+ 3 - 1
prs.mobile.new/PRS.Mobile/Modules/Warehousing/Stocktake/Edit/StockTakeEdit.xaml.cs

@@ -115,6 +115,8 @@ namespace PRS.Mobile
             );
         }
 
+        private ProductLookupModel _lookups = new ProductLookupModel(App.Data, LookupFactory.DefineFilter<Product>) { FileName = "productlookups.idx" };
+
         private void SelectProduct_Clicked(object sender, MobileButtonClickEventArgs args)
         {
             ShowPopup(() =>
@@ -130,7 +132,7 @@ namespace PRS.Mobile
                         },
                         refresh =>
                         {
-                            var result = App.Data.Products.Refresh(force);
+                            var result = _lookups.Refresh(force);
                             force = true;
                             return result;
                         },