Explorar o código

Removed unused files and NavigationPage function; removed image on product list because of binding errors

Kenric Nugteren hai 1 ano
pai
achega
53005dfd15

+ 0 - 79
prs.mobile.new/PRS.Mobile/Modules/Warehousing/OldWarehousing/NewHoldingPage.xaml

@@ -1,79 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<mobile:MobilePage xmlns:local="clr-namespace:PRS.Mobile" 
-    xmlns="http://xamarin.com/schemas/2014/forms"
-    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
-    xmlns:material="clr-namespace:XF.Material.Forms.UI;assembly=XF.Material"
-    xmlns:mobile="clr-namespace:InABox.Mobile;assembly=InABox.Mobile.Shared"
-    material:MaterialNavigationPage.AppBarTitleTextFontSize="16.0"
-     
-    x:Class="PRS.Mobile.NewHoldingPage">
-    <mobile:MobilePage.PageContent>
-        <ScrollView x:Name="OuterScroll">
-
-            <StackLayout Margin="5,5,5,0" x:Name="OuterStack" Orientation="Vertical">
-
-                <material:MaterialLabel TypeScale="H6" HorizontalTextAlignment="Center" Text="Location Contents"/>
-
-                <mobile:MobileCard>
-                    <Grid>
-                        <Grid.RowDefinitions>
-                            <RowDefinition Height="Auto"/>
-                            <RowDefinition Height="Auto"/>
-                            <RowDefinition Height="Auto"/>
-                            <RowDefinition Height="Auto"/>
-                        </Grid.RowDefinitions>
-                        <Image x:Name="Image" Grid.Row="0" Aspect="AspectFit" IsVisible="false" />
-                        <material:MaterialLabel x:Name="NoImage" Grid.Row="0" Text="(No Image Found)" Padding="0,20,0,25" IsVisible="True" TextColor="Navy" HorizontalTextAlignment="Center"/>
-                        <material:MaterialLabel x:Name="ProductCode" Grid.Row="1" Text="" Padding="0,10,0,5" IsVisible="False" TextColor="Navy" HorizontalTextAlignment="Center"/>
-                        <material:MaterialLabel x:Name="ProductDescription" Grid.Row="2" Text="" Padding="0,5,0,10" IsVisible="False" TextColor="Navy" HorizontalTextAlignment="Center"/>
-                        <material:MaterialButton Grid.Row="3" x:Name="SelectProduct" Clicked="SelectProduct_Clicked" Text="Select Product"/>
-                    </Grid>
-                </mobile:MobileCard>
-
-                <mobile:MobileCard>
-                    <Grid>
-                        <Grid.RowDefinitions>
-                            <RowDefinition Height="Auto"/>
-                            <RowDefinition Height="Auto"/>
-                        </Grid.RowDefinitions>
-                        <material:MaterialLabel x:Name="StyleDescription" Grid.Row="0" Text="" Padding="0,10,0,10" IsVisible="False" TextColor="Navy" HorizontalTextAlignment="Center"/>
-                        <material:MaterialButton Grid.Row="2" x:Name="SelectStyle" Clicked="SelectStyle_Clicked" Text="Select Style"/>
-                    </Grid>
-                </mobile:MobileCard>
-
-                <mobile:MobileCard>
-                    <Grid>
-                        <Grid.RowDefinitions>
-                            <RowDefinition Height="Auto"/>
-                            <RowDefinition Height="Auto"/>
-                        </Grid.RowDefinitions>
-                        <material:MaterialLabel x:Name="Job" Grid.Row="0" Text="" Padding="0,10,0,10" IsVisible="False" TextColor="Navy" HorizontalTextAlignment="Center"/>
-                        <material:MaterialButton Grid.Row="2" x:Name="SelectJob" Clicked="SelectJob_Clicked" Text="Select Job"/>
-                    </Grid>
-                </mobile:MobileCard>
-
-                <mobile:MobileCard >
-                    <Grid>
-                        <Grid.ColumnDefinitions>
-                            <ColumnDefinition Width="50"/>
-                            <ColumnDefinition Width="0.5*"/>
-                            <ColumnDefinition Width="50"/>
-                            <ColumnDefinition Width="*"/>
-                        </Grid.ColumnDefinitions>
-                        <Grid.RowDefinitions>
-                            <RowDefinition Height="Auto"/>
-                            <RowDefinition Height="Auto"/>
-                        </Grid.RowDefinitions>
-                        <material:MaterialButton x:Name="SmallerSize" Grid.Row="0" Grid.Column="0" Clicked="SmallerSize_Clicked" Text="-"/>
-                        <material:MaterialTextField x:Name="Size" Grid.Row="0" Grid.Column="1" Placeholder="Size" TextChanged="Size_TextChanged" Text="1" Margin="0,5,0,5" InputType="Text" BackgroundColor="WhiteSmoke"/>
-                        <material:MaterialButton x:Name="LargerSize" Grid.Row="0" Grid.Column="2" Clicked="LargerSize_Clicked" Text="+"/>
-                        <material:MaterialLabel x:Name="UnitCode" Grid.Row="0" Grid.Column="3" Text="(Unit Size)" Padding="0,20,0,25" IsVisible="True" TextColor="Navy" HorizontalTextAlignment="Center"/>
-                        <material:MaterialButton Grid.Row="1" Grid.ColumnSpan="4" x:Name="SelectUnits" Clicked="SelectUnits_Clicked" Text="Select Standard Size"/>
-                    </Grid>
-                </mobile:MobileCard>
-                
-            </StackLayout>
-        </ScrollView>
-        
-    </mobile:MobilePage.PageContent>
-</mobile:MobilePage>

+ 0 - 232
prs.mobile.new/PRS.Mobile/Modules/Warehousing/OldWarehousing/NewHoldingPage.xaml.cs

@@ -1,232 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Linq.Expressions;
-using System.Threading.Tasks;
-using Comal.Classes;
-using InABox.Clients;
-using InABox.Core;
-using Xamarin.Forms;
-using XF.Material.Forms.UI;
-using XF.Material.Forms.UI.Dialogs;
-
-namespace PRS.Mobile
-{
-    public delegate void SaveHoldingEvent(StockHolding holding, Document image);
-
-    public partial class NewHoldingPage 
-    {
-
-        public event SaveHoldingEvent OnSaveHolding;
-        bool firstLoad = true;
-        private Product _product = null;
-        private Document _image = null;
-
-        private ProductStyle _style = null;
-
-        private Job _job = null;
-
-        private ProductUOM _uom = null;
-
-        private double _unitsize = 1.0F;
-
-        private async Task<bool> CheckData()
-        {
-            if (_product == null)
-            {
-                await MaterialDialog.Instance.AlertAsync("Please select a Product before continuing!");
-                return false;
-            }
-            if (_style == null)
-            {
-                await MaterialDialog.Instance.AlertAsync("Please select a Style before continuing!");
-                return false;
-            }
-            if (_uom == null)
-            {
-                await MaterialDialog.Instance.AlertAsync("Please select a Unit Size before continuing!");
-                return false;
-            }
-            if (_unitsize <= 0.0F)
-            {
-                await MaterialDialog.Instance.AlertAsync("Unit Size must be greater than zero!");
-                return false;
-            }
-            return true;
-        }
-
-        public NewHoldingPage(Job job)
-        {
-            firstLoad = true;
-            try 
-            {
-                _job = new Job();
-                _job.ID = job.ID;
-                _job.JobNumber = job.JobNumber;
-                _job.Name = job.Name;
-            } 
-            catch { }
-            
-            InitializeComponent();
-            ToolbarItems.Clear();
-            ToolbarItems.Add(new ToolbarItem("Save", "", () =>
-            {
-
-                if (!CheckData().Result)
-                    return;
-
-                StockHolding holding = new StockHolding();
-                holding.Product.ID = _product.ID;
-                holding.Product.Code = _product.Code;
-                holding.Product.Name = _product.Name;
-                holding.Product.Image.ID = _product.Image.ID;
-                holding.Style.ID = _style.ID;
-                holding.Style.Code = _style.Code;
-                holding.Style.Description = _style.Description;
-                holding.Job.ID = _job != null ? _job.ID : Guid.Empty;
-                holding.Job.JobNumber = _job != null ? _job.JobNumber : "";
-                holding.Job.Name = _job != null ? _job.Name : "";
-                
-                OnSaveHolding?.Invoke(holding, _image);
-                Navigation.PopAsync();
-            }));
-            if(_job.ID != Guid.Empty) RefreshPage();
-            firstLoad = false;
-        }
-
-        protected override void OnAppearing()
-        {
-            base.OnAppearing();
-            if(!firstLoad) RefreshPage();
-        }
-
-        private void UpdateLabel<T>(MaterialLabel label, T item, params Expression<Func<T,String>>[] values)
-        {
-            List<String> data = new List<string>();
-            if (item != null)
-            {
-                foreach (var value in values)
-                    data.Add(value.Compile().Invoke(item));
-            }
-            label.Text = String.Join(": ",data);
-            label.IsVisible = !String.IsNullOrWhiteSpace(label.Text);
-        }
-
-        void RefreshPage()
-        {
-
-            ImageSource source = _image != null ? ImageSource.FromStream(() => new MemoryStream(_image.Data)) : null;
-            Image.Source = source;
-            NoImage.IsVisible = (_product != null) && (_image == null);
-            Image.IsVisible = (_product != null) && (_image != null);
-
-            UpdateLabel<Product>(ProductCode, _product, x => x.Code);
-            UpdateLabel<Product>(ProductDescription, _product, x => x.Name);
-            UpdateLabel<ProductStyle>(StyleDescription, _style, x => x.Description);
-            UpdateLabel<Job>(Job, _job, x => x.JobNumber, x => x.Name);
-            UpdateLabel<ProductUOM>(UnitCode, _uom, x => x.Code);
-            Size.Text = _unitsize.ToString();
-        }
-
-        void SelectProduct_Clicked(System.Object sender, System.EventArgs e)
-        {
-            GenericSelectionPage page = new GenericSelectionPage(
-                "Select Product",
-                    new SelectionViewModel<Product>(
-                    new Filter<Product>(X=>X.Expired).IsEqualTo(DateTime.MinValue),
-                    new Expression<Func<Product, object>>[] { X => X.Code, X => X.Name },
-                    new Expression<Func<Product, object>>[] { x=>x.Image.ID, x=>x.Units.ID, x=>x.Units.Code, x=>x.Units.Description, x=>x.DefaultStyle.ID, x=>x.DefaultStyle.Code, x=>x.DefaultStyle.Description },
-                    new SortOrder<Product>(x => x.Code)
-                )
-            );
-            page.OnItemSelected += (o,e) => {
-
-                _product = e.Row.ToObject<Product>();
-
-                _style = new ProductStyle()
-                {
-                    ID = _product.DefaultStyle.ID,
-                    Code = _product.DefaultStyle.Code,
-                    Description = _product.DefaultStyle.Description
-                };
-
-                _uom = new ProductUOM()
-                {
-                    ID = _product.Units.ID,
-                    Code = _product.Units.Code,
-                    Description = _product.Units.Description
-                };
-
-                _image = new Client<Document>().Load(new Filter<Document>(x => x.ID).IsEqualTo(_product.Image.ID)).FirstOrDefault();
-            };
-            Navigation.PushAsync(page);
-        }
-
-        void SelectStyle_Clicked(System.Object sender, System.EventArgs e)
-        {
-            GenericSelectionPage page = new GenericSelectionPage(
-                "Select Product Style",
-                new SelectionViewModel<ProductStyle>(
-                    null,
-                    new Expression<Func<ProductStyle, object>>[] { x => x.Code, x => x.Description },
-                    null,
-                    new SortOrder<ProductStyle>(x => x.Code)
-                )
-            ); 
-            page.OnItemSelected += (o,e) => {
-                _style = e.Row.ToObject<ProductStyle>();
-            };
-            Navigation.PushAsync(page);
-        }
-
-        void SelectJob_Clicked(System.Object sender, System.EventArgs e)
-        {
-            JobSelectionPage jobSelectionPage = new JobSelectionPage(
-                (job) =>
-                {
-                    _job.ID = job.ID;
-                    _job.Name = job.Name;
-                    _job.JobNumber = job.JobNumber;
-                }
-            );
-            Navigation.PushAsync(jobSelectionPage);
-        }
-
-        void SelectUnits_Clicked(System.Object sender, System.EventArgs e)
-        {
-            GenericSelectionPage page = new GenericSelectionPage(
-                "Select UOM",
-                new SelectionViewModel<ProductUOM>(
-                    null,
-                    new Expression<Func<ProductUOM, object>>[] { x=>x.Code, x => x.Description },
-                    null,
-                    new SortOrder<ProductUOM>(x => x.Description)
-                )
-            );
-            page.OnItemSelected += (o,e) => {
-                _uom = e.Row.ToObject<ProductUOM>();
-            };
-            Navigation.PushAsync(page);
-        }
-
-        void SmallerSize_Clicked(System.Object sender, System.EventArgs e)
-        {
-            _unitsize = Math.Max(_unitsize - 1.0F, 0.0F);
-            Size.Text = _unitsize.ToString();
-        }
-
-        void LargerSize_Clicked(System.Object sender, System.EventArgs e)
-        {
-            _unitsize += 1.0F;
-            Size.Text = _unitsize.ToString();
-        }
-
-        void Size_TextChanged(System.Object sender, Xamarin.Forms.TextChangedEventArgs e)
-        {
-            if (double.TryParse(Size.Text, out double size))
-                _unitsize = size;
-            
-        }
-    }
-}

+ 0 - 142
prs.mobile.new/PRS.Mobile/Modules/Warehousing/OldWarehousing/StockHoldingPage.xaml

@@ -1,142 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<mobile:MobilePage
-    xmlns="http://xamarin.com/schemas/2014/forms"
-    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
-    xmlns:material="clr-namespace:XF.Material.Forms.UI;assembly=XF.Material"
-    xmlns:local="clr-namespace:PRS.Mobile"
-    xmlns:mobile="clr-namespace:InABox.Mobile;assembly=InABox.Mobile.Shared"
-    material:MaterialNavigationPage.AppBarTitleTextFontSize="16.0"
-     
-    x:Class="PRS.Mobile.StockHoldingPage">
-
-    <mobile:MobilePage.PageContent>
-
-        <Grid>
-
-            <Grid.RowDefinitions>
-                <RowDefinition Height="*"/>
-                <RowDefinition Height="Auto"/>
-            </Grid.RowDefinitions>
-            <Grid.ColumnDefinitions>
-                <ColumnDefinition Width="*"/>
-                <ColumnDefinition Width="*"/>
-            </Grid.ColumnDefinitions>
-
-            <Grid x:Name="Pages" Grid.Row="0" Grid.ColumnSpan="2">
-                <Grid.ColumnDefinitions>
-                    <ColumnDefinition Width="*"/>
-                </Grid.ColumnDefinitions>
-
-
-                <Grid x:Name="Contents" Grid.Row="0" Grid.Column="0" IsVisible="True" Margin="5,5,10,0">
-                    <Grid.ColumnDefinitions>
-                        <ColumnDefinition Width="*"/>
-                        <ColumnDefinition Width="100"/>
-                    </Grid.ColumnDefinitions>
-                    <Grid.RowDefinitions>
-                        <RowDefinition Height="Auto"/>
-                        <RowDefinition Height="*"/>
-                    </Grid.RowDefinitions>
-
-
-                    <material:MaterialLabel Grid.Row="0" Grid.Column="0" TypeScale="H6" HorizontalTextAlignment="Start" Text="Location Contents" VerticalTextAlignment="Center" Margin="10,0,0,0" />
-                    <material:MaterialButton Grid.Row="0" Grid.Column="1" x:Name="NewProduct" Clicked="NewProduct_Clicked" Text="Add" Margin="0,0,-5,0" IsVisible="True"/>
-                   <material:MaterialButton Grid.Row="0" Grid.Column="1" x:Name="All" Clicked="All_Clicked" Text="All" Margin="0,0,-5,0" IsVisible="False"/>
-
-                    <CarouselView  x:Name="Items" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Margin="5,0,0,-5" PeekAreaInsets="0,0,0,50" Loop="False">
-                        <CarouselView.ItemsLayout>
-                            <LinearItemsLayout Orientation="Vertical" />
-                        </CarouselView.ItemsLayout>
-                        <CarouselView.ItemTemplate>
-                            <DataTemplate>
-                                <Frame Padding="0,0,0,10" BackgroundColor="WhiteSmoke">
-                                    <Frame x:Name="Card" CornerRadius="3" BorderColor="Gray" BackgroundColor="{Binding BackgroundColor}" BindingContext="{Binding}">
-                                        <Frame.GestureRecognizers>
-                                            <TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped"/>
-                                        </Frame.GestureRecognizers>
-                                        <Grid>
-                                            <Grid.RowDefinitions>
-                                                <RowDefinition Height="*"/>
-                                                <RowDefinition Height="Auto"/>
-                                                <RowDefinition Height="Auto"/>
-                                                <RowDefinition Height="Auto"/>
-                                                <RowDefinition Height="Auto"/>
-                                            </Grid.RowDefinitions>     
-                                            <Image x:Name="Image" Grid.Row="0" Aspect="AspectFit" IsVisible="{Binding ImageVisible}" Source="{Binding Image}" VerticalOptions="Center" />
-                                            <material:MaterialLabel x:Name="NoImage" Grid.Row="0" Text="(No Image Found)" Padding="0,20,0,25" TextColor="Navy" HorizontalTextAlignment="Center" VerticalTextAlignment="Center" IsVisible="{Binding ImageHidden}"/>
-                                            <material:MaterialLabel x:Name="Description" Grid.Row="1" Text="{Binding Description}" TypeScale="Body1" HorizontalTextAlignment="Center" VerticalTextAlignment="Center"  /> 
-                                            <material:MaterialLabel x:Name="Style" Grid.Row="2" Text="{Binding Style}" TypeScale="Body1" HorizontalTextAlignment="Center" VerticalTextAlignment="Center"  /> 
-                                            <material:MaterialLabel x:Name="Job" Grid.Row="3" Text="{Binding Job}" TypeScale="Body1" HorizontalTextAlignment="Center" VerticalTextAlignment="Center"  /> 
-                                            <material:MaterialLabel x:Name="OnHand" Grid.Row="4" Text="{Binding OnHand}" TypeScale="H5" HorizontalTextAlignment="Center" VerticalTextAlignment="Center"  /> 
-                                        </Grid>
-                                    </Frame>
-                                </Frame>
-                            </DataTemplate>
-                        </CarouselView.ItemTemplate>
-                    </CarouselView>
-
-                </Grid>
-
-
-                <StackLayout x:Name="Completion" Grid.Row="0" Grid.Column="0" Orientation="Vertical" IsVisible="False" Margin="5,5,5,0">
-
-                    <material:MaterialLabel Text="Notes" TypeScale="H6" HorizontalTextAlignment="Center"/>
-
-                    <Frame HasShadow="False" BorderColor="Gray" VerticalOptions="End">
-                        <StackLayout Orientation="Vertical">
-                            <material:MaterialLabel x:Name="Notes" LineBreakMode="WordWrap" TypeScale="Body1" IsVisible="False"/>
-                            <material:MaterialButton x:Name="AddNote" Clicked="AddNote_Clicked" Text="Add Note"/>
-                        </StackLayout>
-                    </Frame>
-                   
-                    <material:MaterialLabel Text="Confirmation" TypeScale="H6" HorizontalTextAlignment="Center" VerticalOptions="End"/>
-
-                    <Frame HasShadow="False" Padding="5,5,5,5" BorderColor="Gray" VerticalOptions="End" >
-                        <StackLayout Orientation="Vertical">
-                            <ScrollView Orientation="Horizontal" x:Name="ImageScroller" IsVisible="false" Margin="5,0,5,0">
-                                <StackLayout x:Name="Images" Orientation="Horizontal" HeightRequest="150" HorizontalOptions="StartAndExpand" VerticalOptions="Fill"/>
-                            </ScrollView>
-                            <Grid>
-                                <Grid.ColumnDefinitions>
-                                    <ColumnDefinition Width="*"/>
-                                    <ColumnDefinition Width="*"/>
-                                </Grid.ColumnDefinitions>
-                                <material:MaterialButton x:Name="TakePhoto" Grid.Column="0" Text="Camera" Clicked="TakePhoto_Clicked" />
-                                <material:MaterialButton x:Name="ChooseImage" Grid.Column="1" Text="Library" Clicked="ChooseImage_Clicked" />
-                            </Grid>
-                    
-                        </StackLayout>
-                    </Frame>
-
-
-                    <!--<material:MaterialLabel x:Name="StatusLabel" Text="Pack Status" TypeScale="H6" HorizontalTextAlignment="Center" VerticalOptions="End"/>
-
-                    <Frame x:Name="StatusFrame" HasShadow="False" Padding="5,5,5,5" BorderColor="Gray" VerticalOptions="End" >
-                        <StackLayout Orientation="Vertical">
-                            <Grid>
-                                <Grid.ColumnDefinitions>
-                                    <ColumnDefinition Width="*"/>
-                                    <ColumnDefinition Width="*"/>
-                                </Grid.ColumnDefinitions>
-                                <material:MaterialButton x:Name="OpenLocation" Grid.Column="0" Text="Active" Clicked="OpenLocation_Clicked" />
-                                <material:MaterialButton x:Name="CloseLocation" Grid.Column="1" Text="Inactive" Clicked="CloseLocation_Clicked" />
-                            </Grid>
-                    
-                        </StackLayout>
-                    </Frame>-->
-
-                    <material:MaterialButton x:Name="Save" Text="Save Changes" Clicked="Save_Clicked" IsEnabled="False" Margin="-5,0,-5,0" HeightRequest="80"/>
-
-                </StackLayout>
-
-
-            </Grid>
-
-            <material:MaterialButton Grid.Row="1" Grid.Column="0" Text="Items" x:Name="ShowItems" Clicked="ShowItems_Clicked" Margin="5,5,0,5" BackgroundColor="#7F0864" />
-
-            <material:MaterialButton Grid.Row="1" Grid.Column="1" Text="Completion" x:Name="ShowCompletion" Clicked="ShowCompletion_Clicked" Margin="0,5,5,5" BackgroundColor="#087f23" />
-
-        </Grid>
-      
-    </mobile:MobilePage.PageContent>
-</mobile:MobilePage>

+ 0 - 848
prs.mobile.new/PRS.Mobile/Modules/Warehousing/OldWarehousing/StockHoldingPage.xaml.cs

@@ -1,848 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Linq.Expressions;
-using System.Threading.Tasks;
-using Comal.Classes;
-using InABox.Clients;
-using InABox.Core;
-using InABox.Mobile;
-using Xamarin.Essentials;
-using Xamarin.Forms;
-using XF.Material.Forms.UI;
-using XF.Material.Forms.UI.Dialogs;
-
-namespace PRS.Mobile
-{
-
-    public class StockItemModel
-    {
-        public StockHolding Holding { get; set; }
-        public ImageSource Image { get; set; }
-        public bool ImageVisible { get { return Image != null; } }
-        public bool ImageHidden { get { return Image == null; } }
-        public double ImageHeight { get; set; }
-        public String Description { get; set; }
-        public String Style { get; set; }
-        public String Job { get; set; }
-        public String OnHand { get; set; }
-        public Brush Background { get; set; }
-        public Color BackgroundColor { get; set; }
-    }
-
-    public partial class StockHoldingPage 
-    {
-        #region Fields
-        private Guid _locationid = Guid.Empty;
-        private String _locationname = "";
-        private bool _istransient = false;
-        private StockMovementBatchType _type = StockMovementBatchType.Stocktake;
-        private List<StockHolding> _holdings = new List<StockHolding>();
-        private List<StockItemModel> _models = new List<StockItemModel>();
-        private Dictionary<StockHolding, StockMovement> _movements = new Dictionary<StockHolding, StockMovement>();
-        private String _notes = "";
-        private NotesPage _notespage = null;
-        private StockMovementPage _movementpage = null;
-        private NewHoldingPage _newpage = null;
-        List<Document> _images = new List<Document>();
-        Dictionary<String, byte[]> _photos = new Dictionary<String, byte[]>();
-        private bool bFirst = true;
-        Job job = new Job();
-        #endregion
-
-        #region Constructor
-        public StockHoldingPage(Guid locationid, String locationname, bool istransient, StockMovementBatchType type, Job _job)
-        {
-            try
-            {
-                job.ID = _job.ID;
-                job.JobNumber = _job.JobNumber;
-                job.Name = _job.Name;
-            }
-            catch { }
-            _type = type;
-            _locationid = locationid;
-            _locationname = locationname;
-            _istransient = istransient;
-            //StatusLabel.IsVisible = _istransient;
-            //StatusFrame.IsVisible = _istransient;
-
-            InitializeComponent();
-
-            NavigationPage.SetHasBackButton(this, false);
-            ToolbarItems.Clear();
-            ToolbarItems.Add(new ToolbarItem("Back", "", async () =>
-            {
-                if (!String.IsNullOrEmpty(_notes) || _movements.Any() || _photos.Any())
-                {
-                    string chosenOption = await DisplayActionSheet("Unsaved changes will be lost if you close", "Cancel", null, "Yes", "No");
-                    switch (chosenOption)
-                    {
-                        case "No":
-                            break;
-                        case "Cancel":
-                            break;
-                        case "Yes":
-                            await Navigation.PopAsync();
-                            break;
-                        default:
-                            break;
-                    }
-                }
-                else
-                    await Navigation.PopAsync();
-            }));
-
-            Title = String.Format("{0}: {1}", _locationname, type.ToString());
-
-            NewProduct.IsVisible = _type.Equals(StockMovementBatchType.Receipt) || type.Equals(StockMovementBatchType.Stocktake);
-            All.IsVisible = _type.Equals(StockMovementBatchType.Issue) || type.Equals(StockMovementBatchType.Transfer);
-
-            _holdings = new Client<StockHolding>().Query(
-                new Filter<StockHolding>(x => x.Location.ID).IsEqualTo(_locationid),
-                new Columns<StockHolding>(
-                    x => x.ID,
-                    X => X.Product.ID,
-                    X => X.Product.Code,
-                    X => X.Product.Name,
-                    X => X.Product.Image.ID,
-                    X => X.Style.ID,
-                    X => X.Style.Code,
-                    X => X.Style.Description,
-                    X => X.Job.ID,
-                    X => X.Job.JobNumber,
-                    X => X.Job.Name,
-                    X => X.Units,
-                    X => X.Product.Units.ID,
-                    X => X.Product.Units.Code,
-                    X => X.Location.ID,
-                    X => X.Location.Code,
-                    X => X.Location.Description
-                ),
-                null
-            ).Rows.Select(r => r.ToObject<StockHolding>()).Where(x => !x.Units.Equals(0.0F)).ToList();
-
-            List<Guid> imageids = new List<Guid>();
-            foreach (var holding in _holdings)
-            {
-                Guid imageid = holding.Product.Image.ID;
-                if ((imageid != Guid.Empty) && !imageids.Contains(imageid))
-                    imageids.Add(imageid);
-            }
-
-            if (imageids.Any())
-            {
-                _images = new Client<Document>().Load(
-                    new Filter<Document>(x => x.ID).InList(imageids.ToArray()),
-                    null
-                ).ToList();
-            }
-        }
-        #endregion
-
-        #region OnAppearing & Screen updating
-        protected override void OnAppearing()
-        {
-            base.OnAppearing();
-            if (_movementpage != null)
-                _movementpage = null;
-            if (_notespage != null)
-            {
-                Notes.Text = _notes;
-                Notes.IsVisible = !String.IsNullOrEmpty(_notes);
-                _notespage = null;
-            }
-            RefreshScreen(false);
-        }
-        private void RefreshScreen(bool scrollToLast)
-        {
-            int selected = Items.CurrentItem != null ? _models.IndexOf(Items.CurrentItem as StockItemModel) : 0;
-
-            Items.ItemsSource = null;
-            _models.Clear();
-
-            foreach (var holding in _holdings)
-            {
-
-                StockItemModel model = new StockItemModel();
-
-                StockMovement movement = _movements.ContainsKey(holding) ? _movements[holding] : null;
-                Color color = Color.White;
-                double value = 0.0F;
-                if (movement != null)
-                {
-                    value = movement.Received - movement.Issued;
-                    color = value == 0.0F ? Color.LightGreen : Color.LightSalmon;
-                }
-
-                model.Description = String.Format("{0}: {1}", holding.Product.Code, holding.Product.Name); ;
-                model.Style = String.Format("{0}: {1}", holding.Style.Code, holding.Style.Description);
-                model.Job = holding.Job.ID != Guid.Empty ? String.Format("{0}: {1}", holding.Job.JobNumber, holding.Job.JobNumber) : "General Stock";
-
-                String onhand = "";                
-                if (value > 0.0F)
-                    onhand = String.Format("{0} ({1} {2})", onhand, Math.Round(value, 4), _type == StockMovementBatchType.Stocktake ? "Extra" : "Received");
-                else if (value < 0.0F)
-                    onhand = String.Format("{0} ({1} {2})", onhand, Math.Abs(Math.Round(value, 4)), _type == StockMovementBatchType.Stocktake ? "Missing" : "Issued");
-                model.OnHand = onhand;
-
-                var doc = _images.FirstOrDefault(x => x.ID.Equals(holding.Product.Image.ID));
-                if (doc != null)
-                {
-                    ImageSource src = ImageSource.FromStream(() => new MemoryStream(doc.Data));
-                    model.Image = src;
-                }
-                else
-                    model.Image = null;
-
-                model.ImageHeight = this.Height - 400;
-
-                model.Background = new SolidColorBrush(color);
-
-                model.BackgroundColor = color;
-
-                model.Holding = holding;
-
-                _models.Add(model);
-
-            }
-            Items.ItemsSource = _models;
-
-            if (selected != 0)
-                Items.ScrollTo(selected, position: ScrollToPosition.Center, animate: false);
-
-            if (scrollToLast)
-            {
-                Items.ScrollTo(_models.Count);
-            }
-
-            CheckSaveButton();
-        }
-
-        void CheckSaveButton()
-        {
-            Save.IsEnabled = !String.IsNullOrEmpty(_notes)
-                && _photos.Any()
-                //&& _movements.Any();
-                //&& (_type == StockMovementBatchType.Stocktake ? _movements.Count == _models.Count : true);
-                && (_type == StockMovementBatchType.Stocktake ? true : _movements.Any());
-
-        }
-        #endregion
-
-        #region Create / Load a movement (stockmovement page)
-        protected void EditMovement(StockHolding holding)
-        {
-            StockItemModel model = _models.FirstOrDefault(x => x.Holding == holding);
-
-            StockMovement movement = CreateMovement(holding, "");
-
-            _movementpage = new StockMovementPage(holding, movement, model.Image, _type);
-            _movementpage.OnSaveMovement += (m) =>
-            {
-                double qty = m.Received - m.Issued;
-
-                bool bSave = true;
-
-                if ((_type != StockMovementBatchType.Stocktake) && (qty == 0.0F))
-                    bSave = false;
-
-                if ((_type == StockMovementBatchType.Transfer) && (movement.Location.ID == holding.Location.ID) && (movement.Job.ID == holding.Job.ID) && (movement.Style.ID == holding.Style.ID))
-                    bSave = false;
-
-                if (bSave)
-                {
-                    if (!_movements.ContainsKey(holding))
-                        _movements[holding] = movement;
-                }
-                else
-                {
-                    if (_movements.ContainsKey(holding))
-                        _movements.Remove(holding);
-                }
-            };
-            Device.BeginInvokeOnMainThread(() => 
-            {
-                Navigation.PushAsync(_movementpage);
-            });            
-        }
-
-        private StockMovement CreateMovement(StockHolding holding, String note)
-        {
-            StockMovement movement = _movements.ContainsKey(holding) ? _movements[holding] : null;
-            //var movement = _movements.FirstOrDefault(x => x.Product.ID.Equals(holding.Product.ID) && x.Style.ID.Equals(holding.Style.ID) && x.Job.ID.Equals(holding.Job.ID) && x.UnitSize.Equals(holding.UnitSize));
-            if (movement == null)
-            {
-                movement = new StockMovement();
-
-                movement.Product.ID = holding.Product.ID;
-                movement.Product.Code = holding.Product.Code;
-                movement.Product.Name = holding.Product.Name;
-
-                movement.Style.ID = holding.Style.ID;
-                movement.Style.Code = holding.Style.Code;
-                movement.Style.Description = holding.Style.Description;
-
-                movement.Job.ID = holding.Job.ID;
-                movement.Job.JobNumber = holding.Job.JobNumber;
-                movement.Job.Name = holding.Job.Name;
-
-                movement.Location.ID = holding.Location.ID;
-                movement.Location.Code = holding.Location.Code;
-                movement.Location.Description = holding.Location.Description;
-
-                
-
-                movement.IsTransfer = _type == StockMovementBatchType.Transfer;
-
-                movement.Notes = note;
-            }
-
-            return movement;
-        }
-        #endregion
-
-        #region Add / Display photos
-        async void ChooseImage_Clicked(System.Object sender, System.EventArgs e)
-        {
-            var file = await MediaPicker.PickPhotoAsync();
-
-            if (file == null)
-                return;
-
-            using (await MaterialDialog.Instance.LoadingDialogAsync(message: "Saving Photo"))
-            {
-                DisplayImage(file);
-            }
-
-            CheckSaveButton();
-
-        }
-
-        async void TakePhoto_Clicked(System.Object sender, System.EventArgs e)
-        {
-            var file = await MediaPicker.CapturePhotoAsync();
-            if (file == null)
-                return;
-
-            using (await MaterialDialog.Instance.LoadingDialogAsync(message: "Saving Photo"))
-            {
-                DisplayImage(file);
-            }
-
-            CheckSaveButton();
-
-        }
-
-        private async void DisplayImage(FileResult file)
-        {
-            var memoryStream = new MemoryStream();
-            using (var stream = await file.OpenReadAsync())
-                await stream.CopyToAsync(memoryStream);
-            //file.GetStream().CopyTo(memoryStream);
-            var data = memoryStream.ToArray();
-
-            ImageSource src = ImageSource.FromStream(() => new MemoryStream(data));
-            var img = new Image();
-            img.HeightRequest = 150;
-            img.WidthRequest = 150;
-            img.Aspect = Aspect.AspectFit;
-            img.Source = src;
-            img.GestureRecognizers.Add(new TapGestureRecognizer
-            {
-                Command = new Command(OnTap),
-                CommandParameter = src,
-                NumberOfTapsRequired = 1
-            });
-
-            if (img != null)
-            {
-                _photos[Path.GetFileName(file.FileName)] = data;
-                Device.BeginInvokeOnMainThread(() =>
-                {
-                    ImageScroller.IsVisible = true;
-                    Images.Children.Add(img);
-                });
-            }
-            //file.Dispose();
-        }
-
-        private void OnTap(object obj)
-        {
-            ImageViewerPage viewer = new ImageViewerPage(obj as ImageSource, null);
-            Navigation.PushAsync(viewer);
-        }
-        #endregion
-
-        #region Saving
-        async void Save_Clicked(System.Object sender, System.EventArgs e)
-        {
-            #region Confirmation
-            if ((_type == StockMovementBatchType.Stocktake) && (_movements.Count < _models.Count))
-            {
-                string chosenOption = await DisplayActionSheet("Not all items have been counted. Continue?", "Cancel", null, "Yes", "No");
-                switch (chosenOption)
-                {
-                    case "No":
-                        return;
-                    case "Cancel":
-                        return;
-                    case "Yes":
-                        foreach (var _model in _models)
-                        {
-                            if (!_movements.ContainsKey(_model.Holding))
-                                _movements[_model.Holding] = CreateMovement(_model.Holding, "** Item Not Confirmed **");
-                        }
-                        break;
-                    default:
-                        return;
-                }
-            }
-
-            bool bClosePack = false;
-            bool bAllGone = CheckAllGone();
-            if (bAllGone && _istransient)
-            {
-                bClosePack = await MaterialDialog.Instance.ConfirmAsync(message: "It appears that this location is empty.  Do you want to mark it as inactive?",
-                                    title: "Close Location?",
-                                    confirmingText: "Yes",
-                                    dismissiveText: "No") == true;
-            }
-            if (_type == StockMovementBatchType.Issue)
-            {
-                foreach (var holding in _movements.Keys)
-                {
-                    var movement = _movements[holding];
-                    if (movement.Job.ID == Guid.Empty)
-                    {
-                        DisplayAlert("Alert", "Job Number not present for Issue. Please address before saving", "OK");
-                        return;
-                    }
-                }
-            }
-
-            #endregion
-
-            using (await MaterialDialog.Instance.LoadingDialogAsync(message: "Saving"))
-            {
-                await Task.Run(() =>
-                {
-                    // Create a Stock Movement Batch - wait for batch return
-                    StockMovementBatch batch = new StockMovementBatch()
-                    {
-                        Type = _type,
-                        Notes = _notes
-                    };
-                    new Client<StockMovementBatch>().Save(batch, "");
-
-                    // Save photos - async, no wait needed
-                    SavePhotos(batch.ID);
-
-                    // Now link the movements to the batch - async, no wait need
-                    LinkMovementsToBatch(batch);
-                });
-            }
-            Navigation.PopAsync();
-        }
-
-        private async void SavePhotos(Guid batchID)
-        {
-            await Task.Run(() =>
-            {
-                List<Document> docs = new List<Document>();
-                foreach (var filename in _photos.Keys)
-                {
-                    Document doc = new Document()
-                    {
-                        FileName = filename,
-                        Data = _photos[filename],
-                        CRC = CoreUtils.CalculateCRC(_photos[filename]),
-                        TimeStamp = DateTime.Now
-                    };
-                    docs.Add(doc);
-                }
-                new Client<Document>().Save(docs, "");
-
-                // Link the photos to the batch
-                List<StockMovementBatchDocument> smds = new List<StockMovementBatchDocument>();
-                foreach (var doc in docs)
-                {
-
-                    var smd = new StockMovementBatchDocument();
-                    smd.EntityLink.ID = batchID;
-                    smd.DocumentLink.ID = doc.ID;
-                    smd.DocumentLink.FileName = doc.FileName;
-                    smds.Add(smd);
-                }
-                new Client<StockMovementBatchDocument>().Save(smds, "");
-            });
-
-        }
-
-        private bool CheckAllGone()
-        {
-            foreach (var holding in _holdings)
-            {
-                if (holding.Units != 0)
-                {
-                    if (!_movements.ContainsKey(holding))
-                        return false;
-                    var movement = _movements[holding];
-                    if ((holding.Units + movement.Received - movement.Issued) != 0.00)
-                        return false;
-                }
-            }
-            return true;
-        }
-
-        private async void LinkMovementsToBatch(StockMovementBatch batch)
-        {
-            await Task.Run(() =>
-            {
-                List<StockMovement> updates = new List<StockMovement>();
-                foreach (var holding in _movements.Keys)
-                {
-                    var movement = _movements[holding];
-
-                    bool bValid = true;
-
-                    if (_type == StockMovementBatchType.Transfer)
-                    {
-                        if ((movement.Location.ID != holding.Location.ID) || (movement.Style.ID != holding.Style.ID) || (movement.Job.ID != holding.Job.ID))
-                        {
-                            var xferout = new StockMovement();
-                            xferout.Product.ID = holding.Product.ID;
-                            xferout.Style.ID = holding.Style.ID;
-                            xferout.Job.ID = holding.Job.ID;
-                            xferout.Issued = movement.Received;
-                            xferout.IsTransfer = true;
-
-                            xferout.Batch.ID = batch.ID;
-                            xferout.Date = batch.Created;
-                            xferout.Location.ID = _locationid;
-                            xferout.Notes = String.IsNullOrWhiteSpace(xferout.Notes) ? _notes : String.Format("{0}\n{1}", xferout.Notes, _notes);
-                            xferout.Employee.ID = App.Data.Me.ID;
-                            updates.Add(xferout);
-
-                            movement.Batch.ID = batch.ID;
-                            movement.Date = batch.Created;
-                            movement.Notes = String.IsNullOrWhiteSpace(movement.Notes) ? _notes : String.Format("{0}\n{1}", movement.Notes, _notes);
-                            movement.Employee.ID = App.Data.Me.ID;
-                        }
-                        else
-                            bValid = false;
-                    }
-                    else if (_type == StockMovementBatchType.Issue)
-                    {
-                        if (movement.Job.ID != holding.Job.ID)
-                        {
-                            var xferout = new StockMovement();
-                            xferout.Product.ID = holding.Product.ID;
-                            xferout.Style.ID = holding.Style.ID;
-                            xferout.Job.ID = holding.Job.ID;
-                            xferout.Issued = movement.Issued;
-                            xferout.IsTransfer = true;
-                            updates.Add(xferout);
-
-                            var xferin = new StockMovement();
-                            xferin.Product.ID = holding.Product.ID;
-                            xferin.Style.ID = holding.Style.ID;
-                            xferin.Job.ID = movement.Job.ID;
-                            xferin.Received = movement.Issued;
-                            xferin.IsTransfer = true;
-                            updates.Add(xferin);
-                        }
-                    }
-                    if (bValid)
-                        updates.Add(movement);
-
-                }
-
-                if (_type != StockMovementBatchType.Transfer)
-                {
-                    foreach (var update in updates)
-                    {
-                        update.Batch.ID = batch.ID;
-                        update.Date = batch.Created;
-                        update.Location.ID = _locationid;
-                        update.Notes = String.IsNullOrWhiteSpace(update.Notes) ? _notes : String.Format("{0}\n{1}", update.Notes, _notes);
-                        update.Employee.ID = App.Data.Me.ID;
-                    }
-                }
-                new Client<StockMovement>().Save(updates, "");
-                Device.BeginInvokeOnMainThread(() =>
-                {
-                    DisplayAlert("Success", "Updates saved", "OK");
-                });
-            });
-        }
-        #endregion
-
-        #region Note / New Product / All clicked
-        void AddNote_Clicked(System.Object sender, System.EventArgs e)
-        {
-            _notespage = new NotesPage("Stock Movement Notes", _notes);
-            _notespage.TextChanged += (o, t) =>
-            {
-                _notes = t;
-            };
-            Navigation.PushAsync(_notespage);
-        }
-
-        async void NewProduct_Clicked(System.Object sender, System.EventArgs e)
-        {
-            _newpage = new NewHoldingPage(job);
-            _newpage.OnSaveHolding += async (holding, image) =>
-            {
-                Items.ItemsSource = null;
-                if (image != null)
-                    _images.Add(image);
-                _holdings.Add(holding);
-                RefreshScreen(true);
-                await Task.Run(() => 
-                {
-                    EditMovement(holding);
-                });
-            };
-            Navigation.PushAsync(_newpage);
-        }
-
-        async void All_Clicked(System.Object sender, System.EventArgs e)
-        {
-
-            GenericSelectionPage page = null;
-
-            if (_type == StockMovementBatchType.Transfer)
-            {
-
-                var options = new MaterialRadioButtonGroup()
-                {
-                    Choices = new string[]
-                    {
-                        "Transfer to Another Job",
-                        "Transfer to Another Location"
-                    }
-                };
-
-                bool? wasConfirmed = await MaterialDialog.Instance.ShowCustomContentAsync(options, "What type of transfer do you want to create?", "Select Transfer Type");
-
-
-                if (wasConfirmed == true)
-                {
-                    page = options.SelectedIndex == 0 ? CreateJobPage() : CreateLocationPage();
-
-                    await Navigation.PushAsync(page);
-                }
-            }
-            else if (_type == StockMovementBatchType.Issue)
-            {
-
-                var options = new MaterialRadioButtonGroup()
-                {
-                    Choices = new string[]
-                    {
-                        "Issue all items to a selected Job",
-                        "Issue each item to its allocated Job"
-                    }
-                };
-
-                bool? wasConfirmed = await MaterialDialog.Instance.ShowCustomContentAsync(options, "Where do you want to issue these items to?", "Select Issue Type");
-
-
-                if (wasConfirmed == true)
-                {
-                    if (options.SelectedIndex == 0)
-                    {
-                        page = CreateJobPage();
-                        await Navigation.PushAsync(page);
-                    }
-                    else if (options.SelectedIndex == 1)
-                    {
-                        IssueToJob(_holdings, null);
-                        Device.BeginInvokeOnMainThread(() => { RefreshScreen(false); });
-                    }
-
-                }
-            }
-        }
-
-        private GenericSelectionPage CreateJobPage()
-        {
-            GenericSelectionPage page = new GenericSelectionPage(
-                "Select Job",
-                new SelectionViewModel<Job>(
-                    new Filter<Job>(X => X.JobStatus.Active).IsEqualTo(true),
-                    new Expression<Func<Job, object>>[] { X => X.JobNumber, X => X.Name },
-                    new Expression<Func<Job, object>>[] { },
-                    new SortOrder<Job>(x => x.JobNumber)
-                )
-            );
-            page.OnItemSelected += (o,e) =>
-            {
-
-                var job = e.Row.ToObject<Job>();
-                _movements.Clear();
-                IssueToJob(_holdings, job);
-                Device.BeginInvokeOnMainThread(() => { RefreshScreen(false); });
-            };
-            return page;
-        }
-
-        private void IssueToJob(IEnumerable<StockHolding> holdings, Job job)
-        {
-            foreach (var holding in holdings)
-            {
-
-                var movement = new StockMovement();
-
-                movement.Product.ID = holding.Product.ID;
-                movement.Product.Code = holding.Product.Code;
-                movement.Product.Name = holding.Product.Name;
-
-                movement.Style.ID = holding.Style.ID;
-                movement.Style.Code = holding.Style.Code;
-                movement.Style.Description = holding.Style.Description;
-
-                if (job != null)
-                {
-                    movement.Job.ID = job.ID;
-                    movement.Job.Synchronise(job);
-                }
-                else
-                {
-                    movement.Job.ID = holding.Job.ID;
-                    movement.Job.JobNumber = holding.Job.JobNumber;
-                    movement.Job.Name = holding.Job.Name;
-                }
-
-                movement.Location.ID = holding.Location.ID;
-                movement.Location.Code = holding.Location.Code;
-                movement.Location.Description = holding.Location.Description;
-
-                
-                movement.Issued = holding.Units;
-
-                movement.IsTransfer = _type == StockMovementBatchType.Issue;
-
-                _movements[holding] = movement;
-            }
-        }
-
-        private GenericSelectionPage CreateLocationPage()
-        {
-            GenericSelectionPage page = new GenericSelectionPage(
-                                    "Select Location",
-                                    new SelectionViewModel<StockLocation>(
-                                    new Filter<StockLocation>(X => X.Active).IsEqualTo(true),
-                                    new Expression<Func<StockLocation, object>>[] { X => X.Code, X => X.Description },
-                                    new Expression<Func<StockLocation, object>>[] { },
-                                    new SortOrder<StockLocation>(x => x.Code)
-                                    )
-                                );
-            page.OnItemSelected += (o,e) =>
-            {
-
-                var location = e.Row.ToObject<StockLocation>();
-                foreach (var holding in _holdings)
-                {
-                    var movement = new StockMovement();
-
-                    movement.Product.ID = holding.Product.ID;
-                    movement.Product.Code = holding.Product.Code;
-                    movement.Product.Name = holding.Product.Name;
-
-                    movement.Style.ID = holding.Style.ID;
-                    movement.Style.Code = holding.Style.Code;
-                    movement.Style.Description = holding.Style.Description;
-
-                    movement.Job.ID = holding.Job.ID;
-                    movement.Job.JobNumber = holding.Job.JobNumber;
-                    movement.Job.Name = holding.Job.Name;
-
-                    movement.Location.ID = location.ID;
-                    movement.Location.Synchronise(location);
-
-                    
-                    movement.Issued = holding.Units;
-
-                    movement.IsTransfer = _type == StockMovementBatchType.Transfer;
-
-                    _movements[holding] = movement;
-                }
-                Device.BeginInvokeOnMainThread(() => { RefreshScreen(false); });
-            };
-            return page;
-        }
-        #endregion
-
-        void ShowItems_Clicked(System.Object sender, System.EventArgs e)
-        {
-            Completion.IsVisible = false;
-            Contents.IsVisible = true;
-
-            ShowItems.Background = new SolidColorBrush(Color.FromHex("#7F0864"));
-            //ShowItems.CornerRadius = 5;
-            //ShowItems.Margin = new Thickness(5,5,0,5);
-
-            ShowCompletion.Background = new SolidColorBrush(Color.FromHex("#087f23"));
-            //ShowCompletion.CornerRadius = 5;
-            //ShowCompletion.Margin = new Thickness(0,5,5,5);
-            ForceLayout();
-
-        }
-
-        void ShowCompletion_Clicked(System.Object sender, System.EventArgs e)
-        {
-            Contents.IsVisible = false;
-            Completion.IsVisible = true;
-
-            ShowItems.Background = new SolidColorBrush(Color.FromHex("#087f23"));
-            //ShowItems.CornerRadius = 5;
-            //ShowItems.Margin = new Thickness(5, 5, 0, 5);
-
-            ShowCompletion.Background = new SolidColorBrush(Color.FromHex("#7F0864"));
-            //ShowCompletion.CornerRadius = 5;
-            //ShowCompletion.Margin = new Thickness(0, 5, 5, 5);
-            ForceLayout();
-        }
-
-        //void Items_ItemSelected(System.Object sender, Xamarin.Forms.SelectedItemChangedEventArgs e)
-        //{
-        //    StockItemModel model = e.SelectedItem as StockItemModel;
-        //    EditMovement(model.Holding);
-        //}
-
-        //void Edit_Clicked(System.Object sender, System.EventArgs e)
-        //{
-        //    StockItemModel model = Items.SelectedItem as StockItemModel;
-        //    EditMovement(model.Holding);
-        //}
-
-
-        void Card_Clicked(System.Object sender, System.EventArgs e)
-        {
-            var model = ((MobileCard)sender).BindingContext as StockItemModel;
-            EditMovement(model.Holding);
-        }
-        
-        void Card_Focused(System.Object sender, Xamarin.Forms.FocusEventArgs e)
-        {
-            var model = ((MobileCard)sender).BindingContext as StockItemModel;
-            EditMovement(model.Holding);
-        }
-
-        void Items_ItemTapped(System.Object sender, Xamarin.Forms.ItemTappedEventArgs e)
-        {
-            var model = e.Item as StockItemModel;
-            EditMovement(model.Holding);
-        }
-
-        void TapGestureRecognizer_Tapped(System.Object sender, System.EventArgs e)
-        {
-            var model = ((Frame)sender).BindingContext as StockItemModel;
-            EditMovement(model.Holding);
-        }
-
-    }
-}

+ 0 - 66
prs.mobile.new/PRS.Mobile/Modules/Warehousing/OldWarehousing/StockMovementPage.xaml

@@ -1,66 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<mobile:MobilePage
-    xmlns="http://xamarin.com/schemas/2014/forms"
-    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
-    xmlns:material="clr-namespace:XF.Material.Forms.UI;assembly=XF.Material"
-    xmlns:local="clr-namespace:PRS.Mobile"
-    xmlns:mobile="clr-namespace:InABox.Mobile;assembly=InABox.Mobile.Shared"
-    material:MaterialNavigationPage.AppBarTitleTextFontSize="16.0"
-     
-    x:Class="PRS.Mobile.StockMovementPage">
-    <mobile:MobilePage.PageContent>
-
-        <Grid Background="White" Padding="5">
-
-            <Grid.ColumnDefinitions>
-                <ColumnDefinition Width="*"/>
-                <ColumnDefinition Width="60"/>
-                <ColumnDefinition Width="60"/>
-            </Grid.ColumnDefinitions>
-
-            <Grid.RowDefinitions>
-                <RowDefinition Height="*" x:Name="ImageRow"/>
-                <RowDefinition Height="Auto" x:Name="DescriptionRow"/>
-                <RowDefinition Height="Auto" x:Name="StyleReadOnlyRow"/>
-                <RowDefinition Height="Auto" x:Name="JobReadOnlyRow"/>
-                <RowDefinition Height="Auto" x:Name="OnHandRow"/>
-                <RowDefinition Height="Auto" x:Name="StyleRow"/>
-                <RowDefinition Height="Auto" x:Name="JobRow"/>
-                <RowDefinition Height="Auto" x:Name="LocationRow"/>
-                <RowDefinition Height="Auto" x:Name="QtyRow"/>
-            </Grid.RowDefinitions>
-
-            <Frame x:Name="ImageFrame" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3" CornerRadius="3" IsVisible="False" BorderColor="Gray" Margin="5,0,5,0">
-                <Image x:Name="Image" Aspect="AspectFit" Margin="10"/>
-            </Frame>
-
-            <Frame x:Name="NoImageFrame" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3" CornerRadius="3" IsVisible="False" BorderColor="Gray" Margin="5,0,5,0">
-                <material:MaterialLabel x:Name="NoImage" Text="(No Image Found)" TypeScale="Body1" HorizontalTextAlignment="Center" VerticalTextAlignment="Center" /> 
-            </Frame>
-
-            <material:MaterialLabel x:Name="Description" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3" Text="Description:" TypeScale="Body1" HorizontalTextAlignment="Center" VerticalTextAlignment="Center" Margin="0,5,0,0" /> 
-
-            <material:MaterialLabel x:Name="StyleReadOnly" Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="3" Text="Description:" TypeScale="Body1" HorizontalTextAlignment="Center" VerticalTextAlignment="Center"  /> 
-
-            <material:MaterialLabel x:Name="JobReadOnly" Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="3" Text="Description:" TypeScale="Body1" HorizontalTextAlignment="Center" VerticalTextAlignment="Center"  /> 
-
-            <material:MaterialLabel x:Name="OnHand" Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="3" Text="On Hand:" TypeScale="Body1" HorizontalTextAlignment="Center" VerticalTextAlignment="Center" Margin="0,0,0,10" />
-
-            <!--<material:MaterialTextField x:Name="Style" Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="2" Placeholder="Change Style" Margin="5,0,0,0" InputType="Text" BackgroundColor="LightYellow" IsEnabled="False"/>-->
-            <material:MaterialButton x:Name="ChangeStyle" Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="3" Text="Change Style" Clicked="Style_Clicked" Margin="0,-5,0,-5" />
-
-            <!--<material:MaterialTextField x:Name="Job" Grid.Row="6" Grid.Column="0" Grid.ColumnSpan="2" Placeholder="Change Job" Margin="5,0,0,0" InputType="Text" BackgroundColor="LightYellow" IsEnabled="False" TextColor="Black"/>-->
-            <material:MaterialButton x:Name="ChangeJob" Grid.Row="6" Grid.Column="0" Grid.ColumnSpan="3" Text="Change Job" Clicked="Job_Clicked" Margin="0,-5,0,-5"/>
-
-            <!--<material:MaterialTextField x:Name="Location" Grid.Row="7" Grid.Column="0" Grid.ColumnSpan="2" Placeholder="Change Location" Margin="5,0,0,0" InputType="Text" BackgroundColor="LightYellow" IsEnabled="False" TextColor="Black"/>-->
-            <material:MaterialButton x:Name="ChangeLocation" Grid.Row="7" Grid.Column="0" Grid.ColumnSpan="3" Text="Change Location" Clicked="Location_Clicked" Margin="0,-5,0,-5"/>
-
-            <material:MaterialTextField x:Name="Qty" Grid.Row="8" Grid.Column="0" Placeholder="Qty" TextChanged="Qty_TextChanged" Margin="5,0,-5,5" InputType="Text" BackgroundColor="LightYellow"/>
-            <material:MaterialButton x:Name="Less" Grid.Row="8" Grid.Column="1" Text="-" Clicked="Less_Clicked" Margin="0,-5,-5,0" />
-            <material:MaterialButton x:Name="More" Grid.Row="8" Grid.Column="2" Text="+" Clicked="More_Clicked" Margin="-5,-5,0,0"/>
-
-        
-        </Grid>
-
-    </mobile:MobilePage.PageContent>
-</mobile:MobilePage>

+ 0 - 235
prs.mobile.new/PRS.Mobile/Modules/Warehousing/OldWarehousing/StockMovementPage.xaml.cs

@@ -1,235 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq.Expressions;
-using Comal.Classes;
-using InABox.Core;
-using Xamarin.Forms;
-
-namespace PRS.Mobile
-{
-    public delegate void SaveMovementEvent(StockMovement movement);
-
-    public partial class StockMovementPage 
-    {
-
-        private StockMovement _movement = null;
-
-        private StockHolding _holding = null;
-
-        private StockMovementBatchType _type = StockMovementBatchType.Stocktake;
-
-        public event SaveMovementEvent OnSaveMovement;
-
-        double _qty = 0.0F;
-
-        bool firstNotification = true;
-
-        public StockMovementPage(StockHolding holding, StockMovement movement, ImageSource src, StockMovementBatchType type)
-        {
-            _holding = holding;
-            _movement = movement;
-            _type = type;
-
-            InitializeComponent();
-
-            StyleReadOnlyRow.Height = type != StockMovementBatchType.Transfer  ?  new GridLength(1.0, GridUnitType.Auto) : new GridLength(0.0, GridUnitType.Absolute);            
-            StyleRow.Height = type == StockMovementBatchType.Transfer ? new GridLength(1.0, GridUnitType.Auto) : new GridLength(0.0, GridUnitType.Absolute);
-            ChangeStyle.IsVisible = type == StockMovementBatchType.Transfer;
-
-            JobReadOnlyRow.Height = (type != StockMovementBatchType.Issue) && (type != StockMovementBatchType.Transfer) ? new GridLength(1.0, GridUnitType.Auto) : new GridLength(0.0, GridUnitType.Absolute);
-            JobRow.Height = (type == StockMovementBatchType.Issue) || (type == StockMovementBatchType.Transfer) ? new GridLength(1.0, GridUnitType.Auto) : new GridLength(0.0, GridUnitType.Absolute);
-            ChangeJob.IsVisible = (type == StockMovementBatchType.Issue) || (type == StockMovementBatchType.Transfer);
-
-            LocationRow.Height = type == StockMovementBatchType.Transfer ? new GridLength(1.0, GridUnitType.Auto) : new GridLength(0.0, GridUnitType.Absolute);
-            ChangeLocation.IsVisible = type == StockMovementBatchType.Transfer;
-
-            ToolbarItems.Clear();
-            ToolbarItems.Add(new ToolbarItem("Save", "", () =>
-            {
-
-                _movement.Received = 0.0F;
-                _movement.Issued = 0.0F;
-
-                if (_type == StockMovementBatchType.Issue) 
-                    _movement.Issued = _qty;
-                else if (_type == StockMovementBatchType.Receipt)
-                    _movement.Received = _qty;
-                else if (_type == StockMovementBatchType.Transfer)
-                    _movement.Received = _qty;
-                else 
-                {
-                    if (_qty < _holding.Units)
-                        _movement.Issued = _holding.Units - _qty;
-                    else
-                        _movement.Received = _qty - _holding.Units;
-                }
-
-                OnSaveMovement?.Invoke(_movement);
-                Navigation.PopAsync();
-            }));
-
-            Title = String.Format("{0}: {1}",type.ToString(),holding.Product.Code);
-            if (src != null)
-            {
-                Image.Source = src;
-                ImageFrame.IsVisible = true;
-            }
-            else
-                NoImageFrame.IsVisible = true;
-            Description.Text = holding.Product.Name;
-
-            StyleReadOnly.Text = String.Format("{0}: {1}", _movement.Style.Code, _movement.Style.Description);
-
-            ChangeStyle.Text = String.Format("{0}: {1}", _movement.Style.Code, _movement.Style.Description);
-
-            JobReadOnly.Text = _movement.Job.ID != Guid.Empty ? String.Format("{0}: {1}", _movement.Job.JobNumber, _movement.Job.Name) : "General Stock";
-
-            ChangeJob.Text = _movement.Job.ID != Guid.Empty ? String.Format("{0}: {1}", _movement.Job.JobNumber, _movement.Job.Name) : "General Stock";
-
-            ChangeLocation.Text = String.Format("{0}: {1}", _movement.Location.Code, _movement.Location.Description);
-
-            
-
-            _qty = type == StockMovementBatchType.Stocktake
-                ? _holding.Units + movement.Received - movement.Issued
-                : type == StockMovementBatchType.Issue
-                    ? movement.Issued
-                    : type == StockMovementBatchType.Receipt
-                        ? movement.Received
-                        : movement.Issued;
-
-
-            Qty.Text = _qty.ToString();
-
-            Qty.Placeholder = type ==  StockMovementBatchType.Stocktake
-                ? "On Hand"
-                : type == StockMovementBatchType.Issue
-                    ? "Issue"
-                    : type == StockMovementBatchType.Receipt
-                        ? "Receive"
-                        : "Transfer";
-
-        }
-
-        protected override void OnAppearing()
-        {
-            base.OnAppearing();
-            firstNotification = true;
-        }
-
-        private void UpdateQty(double delta, bool update)
-        {
-            bool bOK = double.TryParse(Qty.Text, out double qty);
-            if (bOK)
-            {
-                qty += delta;
-                if (qty < 0.0F && _type == StockMovementBatchType.Stocktake) qty = 0.0F;
-                if (qty < 0.0F && firstNotification)
-                {
-                    firstNotification = false;
-                    DisplayAlert("Warning", "Are you correcting a mistake by using negative values? It will be flagged in the system as a correction.", "OK");
-                    _movement.Notes = _movement.Notes + "Transaction is a mistake correction. ";
-                }
-                _qty = qty;
-                if (update)
-                    Qty.Text = qty.ToString();
-                Qty.BackgroundColor = Color.WhiteSmoke;
-            }
-            else
-                Qty.BackgroundColor = Color.LightSalmon;
-
-        }
-
-        void Qty_TextChanged(System.Object sender, Xamarin.Forms.TextChangedEventArgs e)
-        {
-            UpdateQty(0.0F, false);
-        }
-
-        void More_Clicked(System.Object sender, System.EventArgs e)
-        {
-            UpdateQty(1.0F, true);       
-        }
-
-        void Less_Clicked(System.Object sender, System.EventArgs e)
-        {
-            UpdateQty(-1.0F, true);
-        }
-
-        void Job_Clicked(System.Object sender, System.EventArgs e)
-        {
-            GenericSelectionPage page = new GenericSelectionPage(
-                "Select Job",
-                new SelectionViewModel<Job>(
-                    new Filter<Job>(X => X.JobStatus.Active).IsEqualTo(true),
-                    new Expression<Func<Job, object>>[] { X => X.JobNumber, X => X.Name },
-                    new Expression<Func<Job, object>>[] { },
-                    new SortOrder<Job>(x => x.JobNumber)
-                )
-            );
-            page.OnItemSelected += (o,e) => {
-
-                var job = e.Row.ToObject<Job>();
-                _movement.Job.ID = job.ID;
-                _movement.Job.Synchronise(job);
-                Dispatcher.BeginInvokeOnMainThread(() =>
-                {
-                    ChangeJob.Text = job.ID != Guid.Empty ? String.Format("{0}: {1}", job.JobNumber, job.Name) : "General Stock";
-                });
-            };
-            Navigation.PushAsync(page);
-
-        }
-
-        void Style_Clicked(System.Object sender, System.EventArgs e)
-        {
-
-            GenericSelectionPage page = new GenericSelectionPage(
-                "Select Style",
-                new SelectionViewModel<ProductStyle>(
-                    null,
-                    new Expression<Func<ProductStyle, object>>[] { X => X.Code, X => X.Description },
-                    new Expression<Func<ProductStyle, object>>[] { },
-                    new SortOrder<ProductStyle>(x => x.Code)
-                )
-            );
-            page.OnItemSelected += (o,e) => {
-
-                var style = e.Row.ToObject<ProductStyle>();
-                _movement.Style.ID = style.ID;
-                _movement.Style.Synchronise(style);
-                Dispatcher.BeginInvokeOnMainThread(() =>
-                {
-                    ChangeStyle.Text = String.Format("{0}: {1}", style.Code, style.Description);
-                });
-            };
-            Navigation.PushAsync(page);
-        }
-
-        void Location_Clicked(System.Object sender, System.EventArgs e)
-        {
-            GenericSelectionPage page = new GenericSelectionPage(
-                "Select Location",
-                    new SelectionViewModel<StockLocation>(
-                    new Filter<StockLocation>(X => X.Active).IsEqualTo(true),
-                    new Expression<Func<StockLocation, object>>[] { X => X.Code, X => X.Description },
-                    new Expression<Func<StockLocation, object>>[] { },
-                    new SortOrder<StockLocation>(x => x.Code)
-                )
-            );
-            page.OnItemSelected += (o,e) => {
-
-                var location = e.Row.ToObject<StockLocation>();
-                _movement.Location.ID = location.ID;
-                _movement.Location.Synchronise(location);
-                Dispatcher.BeginInvokeOnMainThread(() =>
-                {
-                    ChangeLocation.Text = String.Format("{0}: {1}", location.Code, location.Description);
-                });
-            };
-            Navigation.PushAsync(page);
-
-
-
-        }
-    }
-}

+ 0 - 170
prs.mobile.new/PRS.Mobile/Modules/Warehousing/OldWarehousing/WarehouseSelectionPage.xaml

@@ -1,170 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<mobile:MobilePage
-    xmlns="http://xamarin.com/schemas/2014/forms"
-    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
-    xmlns:material="clr-namespace:XF.Material.Forms.UI;assembly=XF.Material"
-    xmlns:local="clr-namespace:PRS.Mobile"
-    xmlns:mobile="clr-namespace:InABox.Mobile;assembly=InABox.Mobile.Shared"
-    material:MaterialNavigationPage.AppBarTitleTextFontSize="16.0"
-     
-    x:Class="PRS.Mobile.WarehouseSelectionPage">
-    <mobile:MobilePage.PageContent>
-        <Grid Margin="10">
-            <Grid.ColumnDefinitions>
-                <ColumnDefinition Width="100"/>
-                <ColumnDefinition Width="*"/>
-                <ColumnDefinition Width="110"/>
-            </Grid.ColumnDefinitions>
-            <Grid.RowDefinitions>
-                <RowDefinition Height="Auto"/>
-                <RowDefinition Height="Auto"/>
-                <RowDefinition Height="Auto"/>
-                <RowDefinition Height="*"/>
-                <RowDefinition Height="Auto"/>
-            </Grid.RowDefinitions>
-
-            
-            <material:MaterialButton x:Name="Warehouse" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3" Clicked="Warehouse_Clicked" Text="Select Warehouse"/>
-            <material:MaterialButton x:Name="Warehouse_Clear" Grid.Row="0" Grid.Column="2" Clicked="Warehouse_Clear_Clicked" Text="Clear"/>
-
-            <material:MaterialButton x:Name="Area" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3" Clicked="Area_Clicked" Text="Select Area / Rack"/>
-            <material:MaterialButton x:Name="Area_Clear" Grid.Row="1" Grid.Column="2" Clicked="Area_Clear_Clicked" Text="Clear"/>
-
-            <material:MaterialButton x:Name="Location_New" Grid.Row="2" Grid.Column="0" Clicked="NewLocationClicked" Text="New"/>
-            <material:MaterialButton x:Name="Location" Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Clicked="Location_Clicked" Text="Select Location / Pack" />
-            <material:MaterialButton x:Name="Location_Clear" Grid.Row="2" Grid.Column="2" Clicked="Location_Clear_Clicked" Text="Clear"/>
-
-            <Frame Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="3"  Margin="15,10,15,5" BorderColor="#087f23" CornerRadius="5" BackgroundColor="White">
-                <Grid>
-                    <Grid.ColumnDefinitions>
-                        <ColumnDefinition Width="0.3*"/>
-                        <ColumnDefinition Width="0.1*"/>
-                        <ColumnDefinition Width="0.2*"/>
-                        <ColumnDefinition Width="0.1*"/>
-                        <ColumnDefinition Width="0.3*"/>
-                    </Grid.ColumnDefinitions>
-                    <Grid.RowDefinitions>
-                        <RowDefinition Height="0.3*"/>
-                        <RowDefinition Height="0.1*"/>
-                        <RowDefinition Height="0.2*"/>
-                        <RowDefinition Height="0.1*"/>
-                        <RowDefinition Height="0.3*"/>
-                    </Grid.RowDefinitions>
-
-                    <Grid x:Name="ReceiveGrid" Grid.Row="0"  Grid.RowSpan="2" Grid.Column="0" Grid.ColumnSpan="2" Margin="10" Opacity="0.2">
-                        <Grid.RowDefinitions>
-                            <RowDefinition Height="*"/>
-                            <RowDefinition Height="Auto"/>
-                        </Grid.RowDefinitions>
-                        <Image Grid.Row="0" Source="receive" Aspect="AspectFit">
-                            <Image.GestureRecognizers>
-                                <TapGestureRecognizer Tapped="ReceiveTapped" />
-                            </Image.GestureRecognizers>
-                            <Image.Margin>
-                                <OnPlatform x:TypeArguments="Thickness">
-                                    <On Platform="iOS" Value="20,20,20,0" />
-                                    <On Platform="Android, WinPhone, Windows" Value="0" />
-                                </OnPlatform>
-                            </Image.Margin>
-                        </Image>
-                        <material:MaterialLabel Grid.Row="1" Text="Receive" HorizontalTextAlignment="Center" TypeScale="Button" Margin="0,-10,0,0"/>
-                    </Grid>
-
-                    <Grid x:Name="IssueGrid" Grid.Row="0"  Grid.RowSpan="2" Grid.Column="3" Grid.ColumnSpan="2" Margin="10" Opacity="0.2">
-                        <Grid.RowDefinitions>
-                            <RowDefinition Height="*"/>
-                            <RowDefinition Height="Auto"/>
-                        </Grid.RowDefinitions>
-                        <Image Grid.Row="0" Source="issue" Aspect="AspectFit">
-                            <Image.GestureRecognizers>
-                                <TapGestureRecognizer Tapped="IssueTapped" />
-                            </Image.GestureRecognizers>
-                            <Image.Margin>
-                                <OnPlatform x:TypeArguments="Thickness">
-                                    <On Platform="iOS" Value="20,20,20,0" />
-                                    <On Platform="Android, WinPhone, Windows" Value="0" />
-                                </OnPlatform>
-                            </Image.Margin>
-                        </Image>
-                        <material:MaterialLabel Grid.Row="1" Text="Issue" HorizontalTextAlignment="Center" TypeScale="Button" Margin="0,-10,0,0"/>
-                    </Grid>
-
-                    <Grid x:Name="StocktakeGrid"  Grid.Row="1" Grid.RowSpan="3" Grid.Column="1" Grid.ColumnSpan="3" Margin="10" Opacity="0.2">
-                        <Grid.RowDefinitions>
-                            <RowDefinition Height="*"/>
-                            <RowDefinition Height="Auto"/>
-                        </Grid.RowDefinitions>
-                        <Image Grid.Row="0" Source="stocktake" Aspect="AspectFit">
-                            <Image.GestureRecognizers>
-                                <TapGestureRecognizer Tapped="StockTakeTapped" />
-                            </Image.GestureRecognizers>
-                            <Image.Margin>
-                                <OnPlatform x:TypeArguments="Thickness">
-                                    <On Platform="iOS" Value="20,20,20,0" />
-                                    <On Platform="Android, WinPhone, Windows" Value="0" />
-                                </OnPlatform>
-                            </Image.Margin>
-                        </Image>
-                        <material:MaterialLabel Grid.Row="1" Text="Stocktake" HorizontalTextAlignment="Center" TypeScale="Button" Margin="0,-10,0,0"/>
-                    </Grid>
-
-
-                    <Grid x:Name="TransferGrid" Grid.Row="3" Grid.RowSpan="2" Grid.Column="0" Grid.ColumnSpan="2" Margin="10" Opacity="0.2">
-                        <Grid.RowDefinitions>
-                            <RowDefinition Height="*"/>
-                            <RowDefinition Height="Auto"/>
-                        </Grid.RowDefinitions>
-                        <Image Grid.Row="0" Source="transfer" Aspect="AspectFit">
-                            <Image.GestureRecognizers>
-                                <TapGestureRecognizer Tapped="TransferTapped" />
-                            </Image.GestureRecognizers>
-                            <Image.Margin>
-                                <OnPlatform x:TypeArguments="Thickness">
-                                    <On Platform="iOS" Value="20,20,20,0" />
-                                    <On Platform="Android, WinPhone, Windows" Value="0" />
-                                </OnPlatform>
-                            </Image.Margin>
-                        </Image>
-                        <material:MaterialLabel Grid.Row="1" Text="Transfer" HorizontalTextAlignment="Center" TypeScale="Button" Margin="0,-10,0,0"/>
-                    </Grid>
-
-                    <Grid x:Name="MoveGrid" Grid.Row="3" Grid.RowSpan="2" Grid.Column="3" Grid.ColumnSpan="2" Margin="10" Opacity="0.2">
-                        <Grid.RowDefinitions>
-                            <RowDefinition Height="*"/>
-                            <RowDefinition Height="Auto"/>
-                        </Grid.RowDefinitions>
-                        <Image Grid.Row="0" Source="move" Aspect="AspectFit" >
-                            <Image.GestureRecognizers>
-                                <TapGestureRecognizer Tapped="MoveLocation" />
-                            </Image.GestureRecognizers>
-                            <Image.Margin>
-                                <OnPlatform x:TypeArguments="Thickness">
-                                    <On Platform="iOS" Value="20,20,20,0" />
-                                    <On Platform="Android, WinPhone, Windows" Value="0" />
-                                </OnPlatform>
-                            </Image.Margin>
-                        </Image>
-                        <material:MaterialLabel Grid.Row="1" Text="Relocate" HorizontalTextAlignment="Center" TypeScale="Button" Margin="0,-10,0,0"/>
-                    </Grid>
-
-
-
-                </Grid>
-            </Frame>
-
-            <Grid Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="3">
-                <Grid.ColumnDefinitions>
-                    <ColumnDefinition Width="*"/>
-                    <ColumnDefinition Width="*"/>
-                </Grid.ColumnDefinitions>
-                <Grid.RowDefinitions>
-                    <RowDefinition Height="Auto"/>
-                </Grid.RowDefinitions>
-                <material:MaterialButton x:Name="Find" Grid.Column="0" Clicked="Find_Clicked" Text="Search" Margin="10,0,5,0" />
-                <material:MaterialButton x:Name="Scan" Grid.Column="1" Clicked="Scan_Clicked" Text="Scan" Margin="5,0,10,0"/>
-
-            </Grid>
-            <!--<material:MaterialButton x:Name="Open" Grid.Row="3" Clicked="Open_Clicked" Text="Open" Margin="10,10,10,0" Padding="10"/>-->
-        </Grid>        
-    </mobile:MobilePage.PageContent>
-</mobile:MobilePage>

+ 0 - 569
prs.mobile.new/PRS.Mobile/Modules/Warehousing/OldWarehousing/WarehouseSelectionPage.xaml.cs

@@ -1,569 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Linq.Expressions;
-using Comal.Classes;
-using InABox.Clients;
-using InABox.Core;
-using Xamarin.Forms;
-using XF.Material.Forms.UI;
-using XF.Material.Forms.UI.Dialogs;
-using System.Threading.Tasks;
-
-namespace PRS.Mobile
-{
-    public delegate void ExitWarehousingSelectedEvent();
-    public partial class WarehouseSelectionPage 
-    {
-        public event ExitWarehousingSelectedEvent OnExitSelected;
-        #region Fields
-        List<ProductShell> productShells = new List<ProductShell>();
-        bool productsLoaded = false;
-        bool loadedFromProducts = false;
-        ScannerPage _scannerpage = null;
-        Guid _warehouseid = Guid.Empty;
-        String _warehousename = "Select Warehouse";
-        Guid _areaid = Guid.Empty;
-        String _areaname = "Select Area";
-        Guid _locationid = Guid.Empty;
-        String _locationname = "Select Location";
-        bool _istransient = false;
-        StockHoldingPage _holdingpage = null;
-        Job job = new Job();
-
-        #endregion
-
-        #region Constructors
-        public WarehouseSelectionPage() //(Employee employee)
-        {
-            InitializeComponent();
-            AddToolbarItems();          
-        }
-
-        public WarehouseSelectionPage(string locationCode) //For loading from Products Module
-        {
-            loadedFromProducts = true;
-            InitializeComponent();
-            AddToolbarItems();
-            LoadFromProductsModule(locationCode);
-            UpdateScreen();
-        }
-
-        private void AddToolbarItems()
-        {
-            Title = "Warehousing";
-            NavigationPage.SetHasBackButton(this, false);
-            ToolbarItems.Clear();
-            ToolbarItems.Add(new ToolbarItem("Exit", "", () =>
-            {
-                OnExitSelected?.Invoke();
-                Navigation.PopAsync();
-            }));
-            ToolbarItems.Add(new ToolbarItem("Back", "", () =>
-            {
-                Navigation.PopAsync();
-            }));
-        }
-
-        #endregion
-
-        #region OnAppearing and Update Screen
-        protected override void OnAppearing()
-        {
-            base.OnAppearing();
-
-            if (_scannerpage != null)
-                _scannerpage = null;
-
-            if (_holdingpage != null)
-                _holdingpage = null;
-
-            UpdateScreen();
-
-        }
-
-        private void UpdateScreen()
-        {
-            Warehouse.Text = _warehousename;
-            Warehouse.SetValue(Grid.ColumnSpanProperty, _warehouseid == Guid.Empty ? 3 : 2);
-            Warehouse.Margin = new Thickness(10, 10, _warehouseid == Guid.Empty ? 5 : 0, 0);
-            Warehouse_Clear.IsVisible = _warehouseid != Guid.Empty;
-            Warehouse_Clear.Margin = new Thickness(0, 10, 5, 0);
-
-            Area.Text = _areaname;
-            Area.SetValue(Grid.ColumnSpanProperty, _areaid == Guid.Empty ? 3 : 2);
-            Area.Margin = new Thickness(10, 0, _areaid == Guid.Empty ? 5 : 0, 0);
-            Area_Clear.IsVisible = _areaid != Guid.Empty;
-            Area_Clear.Margin = new Thickness(0, 0, 5, 0);
-
-            Location_New.IsVisible = (_areaid != Guid.Empty) && (_locationid == Guid.Empty);
-            Location_New.Margin = new Thickness(10, 0, 0, 0);
-
-            Location.Text = _locationname;
-            Location.SetValue(Grid.ColumnProperty, (_areaid != Guid.Empty) && (_locationid == Guid.Empty) ? 1 : 0);
-            Location.SetValue(Grid.ColumnSpanProperty, _locationid != Guid.Empty ? 2 : _areaid != Guid.Empty ? 2 : 3);
-            Location.Margin = new Thickness(Location_New.IsVisible ? 0 : 10, 0, _locationid == Guid.Empty ? 5 : 0, 0);
-
-            Location_Clear.IsVisible = _locationid != Guid.Empty;
-            Location_Clear.Margin = new Thickness(0, 0, 5, 0);
-
-            ReceiveGrid.Opacity = _locationid != Guid.Empty ? 1.0F : 0.3F;
-            IssueGrid.Opacity = _locationid != Guid.Empty ? 1.0F : 0.3F;
-            MoveGrid.Opacity = _locationid != Guid.Empty ? 1.0F : 0.3F;
-            TransferGrid.Opacity = _locationid != Guid.Empty ? 1.0F : 0.3F;
-            StocktakeGrid.Opacity = _locationid != Guid.Empty ? 1.0F : 0.3F;
-        }
-        void LoadFromProductsModule(string locationCode)
-        {
-            CoreTable table = new Client<StockLocation>().Query(
-                new Filter<StockLocation>(x => x.Code).IsEqualTo(locationCode),
-                new Columns<StockLocation>(
-                    x => x.ID,
-                    x => x.Description,
-                    x => x.Area.Warehouse.ID,
-                    x => x.Area.Warehouse.Description,
-                    x => x.Area.ID,
-                    x => x.Area.Description
-                    ),
-                null
-                );
-            if (table.Rows.Any())
-            {
-                CoreRow row = table.Rows.FirstOrDefault();
-                StockLocation location = row.ToObject<StockLocation>();
-                _warehouseid = location.Area.Warehouse.ID;
-                _warehousename = location.Area.Warehouse.Description;
-                _areaid = location.Area.ID;
-                _areaname = location.Area.Description;
-                _locationid = location.ID;
-                _locationname = location.Description;
-            }
-        }
-        #endregion
-
-        #region Warehouse/Area/Location buttons clicked
-        void Warehouse_Clicked(System.Object sender, System.EventArgs e)
-        {
-            GenericSelectionPage page = new GenericSelectionPage(
-                "Select Warehouse",
-                    new SelectionViewModel<StockWarehouse>(
-                    new Filter<StockWarehouse>(X => X.Active).IsEqualTo(true),
-                    new Expression<Func<StockWarehouse, object>>[] { X => X.Description },
-                    new Expression<Func<StockWarehouse, object>>[] { },
-                    new SortOrder<StockWarehouse>(x => x.Description)
-                )
-            );
-            page.OnItemSelected += (o,e) =>
-            {
-
-                var warehouse = e.Row.ToObject<StockWarehouse>();
-                if (_warehouseid != warehouse.ID)
-                {
-                    _warehouseid = warehouse.ID;
-                    _warehousename = warehouse.Description;
-                    _areaid = Guid.Empty;
-                    _areaname = "Select Area";
-                    _locationid = Guid.Empty;
-                    _locationname = "Select Location";
-                }
-            };
-            Navigation.PushAsync(page);
-        }
-
-        void Area_Clicked(System.Object sender, System.EventArgs e)
-        {
-
-            Filter<StockArea> areafilter = new Filter<StockArea>(X => X.Active).IsEqualTo(true);
-            if (_warehouseid != Guid.Empty)
-                areafilter = areafilter.And(x => x.Warehouse.ID).IsEqualTo(_warehouseid);
-
-            GenericSelectionPage page = new GenericSelectionPage(
-                "Select Area",
-                    new SelectionViewModel<StockArea>(
-                    areafilter,
-                    new Expression<Func<StockArea, object>>[] { X => X.Description },
-                    new Expression<Func<StockArea, object>>[] { x => x.Warehouse.ID, x => x.Warehouse.Description },
-                    new SortOrder<StockArea>(x => x.Description)
-                )
-            );
-            page.OnItemSelected += (o,e) =>
-            {
-
-                var area = e.Row.ToObject<StockArea>();
-                if (_areaid != area.ID)
-                {
-                    _warehouseid = area.Warehouse.ID;
-                    _warehousename = area.Warehouse.Description;
-                    _areaid = area.ID;
-                    _areaname = area.Description;
-                    _locationid = Guid.Empty;
-                    _locationname = "Select Location";
-                }
-            };
-            Navigation.PushAsync(page);
-        }
-
-        void Location_Clicked(System.Object sender, System.EventArgs e)
-        {
-            Filter<StockLocation> filter = new Filter<StockLocation>(X => X.Active).IsEqualTo(true);
-            if (_warehouseid != Guid.Empty)
-                filter = filter.And(x => x.Warehouse.ID).IsEqualTo(_warehouseid);
-            if (_areaid != Guid.Empty)
-                filter = filter.And(x => x.Area.ID).IsEqualTo(_areaid);
-
-            GenericSelectionPage page = new GenericSelectionPage(
-                "Select Location",
-                    new SelectionViewModel<StockLocation>(
-                    filter,
-                    new Expression<Func<StockLocation, object>>[] { x => x.Code, X => X.Description },
-                    new Expression<Func<StockLocation, object>>[] { x => x.Area.Warehouse.ID, x => x.Area.Warehouse.Description, x => x.Area.ID, x => x.Area.Description,
-                    x => x.Job.ID, x => x.Job.JobNumber, x => x.Job.Name},
-                    new SortOrder<StockLocation>(x => x.Description)
-                )
-            );
-            page.OnItemSelected += (o,e) =>
-            {
-
-                var location = e.Row.ToObject<StockLocation>();
-                if (_locationid != location.ID)
-                {
-                    _warehouseid = location.Area.Warehouse.ID;
-                    _warehousename = location.Area.Warehouse.Description;
-                    _areaid = location.Area.ID;
-                    _areaname = location.Area.Description;
-                    _locationid = location.ID;
-                    _locationname = location.Description;
-                    job.ID = location.Job.ID;
-                    job.JobNumber = location.Job.JobNumber;
-                    job.Name = location.Job.Name;
-                }
-            };
-            Navigation.PushAsync(page);
-        }
-        #endregion
-
-        #region Scanner
-        void Scan_Clicked(System.Object sender, System.EventArgs e)
-        {
-            _scannerpage = new ScannerPage();
-            _scannerpage.ItemScanned = async (args) => OnScan(args);
-            Navigation.PushModalAsync(_scannerpage);
-        }
-
-        private async void OnScan(ScannerPageItemScannedArgs args)
-        {
-            if (Guid.TryParse(args.Text, out Guid id))
-            {
-                CoreTable result = new Client<StockLocation>().Query(
-                    new Filter<StockLocation>(X => X.ID).IsEqualTo(id),
-                    new Columns<StockLocation>(
-                        x => x.Warehouse.ID,
-                        X => X.Warehouse.Description,
-                        X => X.Area.ID,
-                        X => X.Area.Description,
-                        x => x.ID,
-                        X => X.Description,
-                        x => x.Type
-                    )
-                );
-                if (result.Rows.Any())
-                {
-                    CoreRow r = result.Rows.First();
-                    _warehouseid = r.Get<StockLocation, Guid>(c => c.Warehouse.ID);
-                    _warehousename = r.Get<StockLocation, String>(c => c.Warehouse.Description);
-                    _areaid = r.Get<StockLocation, Guid>(c => c.Area.ID);
-                    _areaname = r.Get<StockLocation, String>(c => c.Area.Description);
-                    _locationid = r.Get<StockLocation, Guid>(c => c.ID);
-                    _locationname = r.Get<StockLocation, String>(c => c.Description);
-                    _istransient = r.Get<StockLocation, StockLocationType>(x => x.Type) == StockLocationType.Transient;
-                }
-            }
-        }
-        
-        #endregion
-
-        #region Holding Page Load Types
-        async void LoadHoldingPage(StockMovementBatchType type)
-        {
-            if (_locationid == Guid.Empty)
-                return;
-
-            var progress = await MaterialDialog.Instance.LoadingDialogAsync(message: "Loading Stock Holding");
-            _holdingpage = new StockHoldingPage(_locationid, _locationname, _istransient, type, job);
-            await progress.DismissAsync();
-
-            await Navigation.PushAsync(_holdingpage);
-        }
-
-        async void ReceiveTapped(System.Object sender, System.EventArgs e)
-        {
-            LoadHoldingPage(StockMovementBatchType.Receipt);
-        }
-
-        async void StockTakeTapped(System.Object sender, System.EventArgs e)
-        {
-            LoadHoldingPage(StockMovementBatchType.Stocktake);
-        }
-
-        async void IssueTapped(System.Object sender, System.EventArgs e)
-        {
-            LoadHoldingPage(StockMovementBatchType.Issue);
-        }
-
-        async void TransferTapped(System.Object sender, System.EventArgs e)
-        {
-            LoadHoldingPage(StockMovementBatchType.Transfer);
-        }
-        #endregion
-
-        #region Warehouse/Area/Location Clear buttons
-        void Warehouse_Clear_Clicked(System.Object sender, System.EventArgs e)
-        {
-            _warehouseid = Guid.Empty;
-            _warehousename = "Select Warehouse";
-            _areaid = Guid.Empty;
-            _areaname = "Select Area";
-            _locationid = Guid.Empty;
-            _locationname = "Select Location";
-            UpdateScreen();
-        }
-
-        void Area_Clear_Clicked(System.Object sender, System.EventArgs e)
-        {
-            _areaid = Guid.Empty;
-            _areaname = "Select Area";
-            _locationid = Guid.Empty;
-            _locationname = "Select Location";
-            UpdateScreen();
-        }
-
-        void Location_Clear_Clicked(System.Object sender, System.EventArgs e)
-        {
-            _locationid = Guid.Empty;
-            _locationname = "Select Location";
-            UpdateScreen();
-        }
-        #endregion
-
-        #region Change/new Stock Location
-        void NewLocationClicked(System.Object sender, System.EventArgs e)
-        {
-            StockLocation location = new StockLocation();
-            location.Active = true;
-            location.Warehouse.ID = _warehouseid;
-            location.Warehouse.Description = _warehousename;
-            location.Area.Warehouse.ID = _warehouseid;
-            location.Area.Warehouse.Description = _warehousename;
-            location.Area.ID = _areaid;
-            location.Area.Description = _areaname;
-
-            LocationDetailsPage page = new LocationDetailsPage(location);
-
-            page.OnSave += (o, loc) =>
-            {
-
-                if (String.IsNullOrWhiteSpace(loc.Code))
-                {
-                    MaterialDialog.Instance.AlertAsync(message: "Code may not be blank!");
-                    return false;
-                }
-
-                if (String.IsNullOrWhiteSpace(loc.Description))
-                {
-                    MaterialDialog.Instance.AlertAsync(message: "Description may not be blank!");
-                    return false;
-                }
-
-                if (loc.Area.ID == Guid.Empty)
-                {
-                    MaterialDialog.Instance.AlertAsync(message: "Area may not be blank!");
-                    return false;
-                }
-
-                CoreTable others = new Client<StockLocation>().Query(
-                    new Filter<StockLocation>(x => x.Code).IsEqualTo(loc.Code).And(x => x.ID).IsNotEqualTo(loc.ID),
-                    new Columns<StockLocation>(x => x.ID)
-                );
-                if (others.Rows.Any())
-                {
-                    MaterialDialog.Instance.AlertAsync(message: "Location Code already exists!");
-                    return false;
-                }
-
-                try
-                {
-                    new Client<StockLocation>().Save(loc, "Created Location");
-                }
-                catch (Exception err)
-                {
-                    MaterialDialog.Instance.AlertAsync(message: "Unable to save Location\n" + err.Message);
-                    return false;
-                }
-                _warehouseid = loc.Area.Warehouse.ID;
-                _warehousename = loc.Area.Warehouse.Description;
-                _areaid = loc.Area.ID;
-                _areaname = loc.Area.Description;
-                _locationid = loc.ID;
-                _locationname = loc.Description;
-                try
-                {
-                    job.ID = loc.Job.ID;
-                    job.JobNumber = loc.Job.JobNumber;
-                    job.Name = loc.Job.Name;
-                }
-                catch { }
-                return true;
-            };
-
-            Navigation.PushAsync(page);
-        }
-
-        void MoveLocation(System.Object sender, System.EventArgs e)
-        {
-            if (_locationid == Guid.Empty)
-                return;
-
-            Filter<StockArea> areafilter = new Filter<StockArea>(X => X.Active).IsEqualTo(true);
-
-            GenericSelectionPage page = new GenericSelectionPage(
-                "Move Stock Location to:",
-                    new SelectionViewModel<StockArea>(
-                    areafilter,
-                    new Expression<Func<StockArea, object>>[] { X => X.Description },
-                    new Expression<Func<StockArea, object>>[] { x => x.Warehouse.ID, x => x.Warehouse.Description },
-                    new SortOrder<StockArea>(x => x.Description)
-                )
-            );
-            page.OnItemSelected += async (o,e) =>
-            {
-
-                var area = e.Row.ToObject<StockArea>();
-                if (_areaid != area.ID)
-                {
-                    string chosenOption = await DisplayActionSheet("Change this Location Area?", "Cancel", null, "Yes", "No");
-                    switch (chosenOption)
-                    {
-                        case "No":
-                            break;
-                        case "Cancel":
-                            break;
-                        case "Yes":
-                            StockLocation location = new StockLocation();
-                            location.ID = _locationid;
-                            location.Area.ID = area.ID;
-                            location.Warehouse.ID = area.Warehouse.ID;
-                            new Client<StockLocation>().Save(location, "Updated Stock Area", (o, err) => { });
-                            _warehouseid = area.Warehouse.ID;
-                            _warehousename = area.Warehouse.Description;
-                            _areaid = area.ID;
-                            _areaname = area.Description;
-                            UpdateScreen();
-                            break;
-
-                        default:
-                            break;
-                    }
-                }
-            };
-            Navigation.PushAsync(page);
-        }
-        #endregion
-
-        void Find_Clicked(object sender, EventArgs e)
-        {
-            if (loadedFromProducts)
-            {
-                Navigation.PopAsync();
-            }
-            else
-            {
-                if (App.Data.Products.Loaded)
-                {
-                    ProductList2 products = new ProductList2();
-                    products.OnExitSelected += () => 
-                    {
-                        Navigation.PopAsync();
-                    };
-                    Navigation.PushAsync(products);
-                }
-                else
-                {
-                    ProductList2 products = new ProductList2();
-                    products.OnExitSelected += () =>
-                    {
-                        Navigation.PopAsync();
-                    };
-                    Navigation.PushAsync(products);
-                }
-            }
-
-        }
-
-        //being replaced
-        //void Find_Clicked(System.Object sender, System.EventArgs e)
-        //{
-
-        //    GenericSelectionPage products = new GenericSelectionPage(
-        //        "Select Product",
-        //        new SelectionViewModel<Product>(
-        //            new Filter<Product>(X => X.Expired).IsEqualTo(DateTime.MinValue),
-        //            new Expression<Func<Product, object>>[] { X => X.Code, X => X.Name },
-        //            new Expression<Func<Product, object>>[] { },
-        //            new SortOrder<Product>(x => x.Code)
-        //        )
-        //    );
-        //    products.AutoClose = false;
-        //    products.OnItemSelected += (p) =>
-        //    {
-
-        //        var product = p.ToObject<Product>();
-        //        GenericSelectionPage holdings = new GenericSelectionPage(
-        //            "Select Stock Holding",
-        //            new SelectionViewModel<StockHolding>(
-        //                new Filter<StockHolding>(X => X.Product.ID).IsEqualTo(product.ID),
-        //                new Expression<Func<StockHolding, object>>[] { },
-        //                new Expression<Func<StockHolding, object>>[] {
-        //                    X => X.Location.Area.Warehouse.ID,
-        //                    x=>x.Location.Area.Warehouse.Code,
-        //                    x=>x.Location.Area.Warehouse.Description,
-        //                    x => x.Location.Area.ID,
-        //                    x=>x.Location.Area.Code,
-        //                    x=>x.Location.Area.Description,
-        //                    x => x.Location.ID,
-        //                    x=>x.Location.Code,
-        //                    x=>x.Location.Description,
-        //                    x=>x.Style.Code,
-        //                    x=>x.Units
-        //                },
-        //                new SortOrder<StockHolding>(x => x.Location.Area.Warehouse.Code).ThenBy(x=>x.Location.Area.Code).ThenBy(x=>x.Location.Code),
-        //                (r) => String.Format("{0} {1}: {2} ({3} {4})",
-        //                    r.Get<StockHolding, String>(x => x.Location.Area.Warehouse.Code),
-        //                    r.Get<StockHolding, String>(x => x.Location.Area.Code),
-        //                    r.Get<StockHolding, String>(x => x.Location.Code),
-        //                    r.Get<StockHolding, double>(x => x.Units),
-        //                    r.Get<StockHolding, String>(x => x.Style.Code)
-        //                )
-        //            )
-        //        );
-        //        holdings.OnItemSelected += (h) =>
-        //        {
-
-        //            var holding = h.ToObject<StockHolding>();
-        //            _warehouseid = holding.Location.Area.Warehouse.ID;
-        //            _warehousename = holding.Location.Area.Warehouse.Description;
-        //            _areaid = holding.Location.Area.ID;
-        //            _areaname = holding.Location.Area.Description;
-        //            _locationid = holding.Location.ID;
-        //            _locationname = holding.Location.Description;
-
-        //            // Close the Product Page as well :=)
-        //            Navigation.PopAsync();
-
-        //        };
-        //        Navigation.PushAsync(holdings);
-
-        //    };
-        //    Navigation.PushAsync(products);
-        //}
-    }
-}

+ 3 - 3
prs.mobile.new/PRS.Mobile/Modules/Warehousing/Products/ProductList2.xaml

@@ -33,7 +33,7 @@
                     <Entry x:Name="searchEnt" Grid.Row="0" Placeholder="Enter search" TextChanged="SearchEnt_Changed" ReturnType="Search" ClearButtonVisibility="WhileEditing" Margin="2" IsEnabled="False"/>
                     <ListView x:Name="productListView" Grid.Row="1" HasUnevenRows="True" BackgroundColor="Transparent" Margin="0,0,0,0" CachingStrategy="RecycleElement">
                         <ListView.ItemTemplate>
-                            <DataTemplate>
+                            <DataTemplate x:DataType="local:ProductShell">
                                 <ViewCell Tapped="ProductList_Tapped">
                                     <Frame BorderColor="#9f4576"  Margin="2" CornerRadius="15" BackgroundColor="WhiteSmoke" Padding="5" HasShadow="False">
                                         <Grid>
@@ -55,7 +55,7 @@
                                             <Label Text="{Binding TotalStock, StringFormat='{0} '}"  Grid.Column="2" Grid.Row="1"/>
                                             <Label Text="{Binding DimensionsUnitSize, StringFormat='@ {0}'}"  Grid.Column="3"  Grid.Row="1"/>
  
-                                            <Image 
+                                            <!--Image 
                                                 Grid.Row="0" 
                                                 Grid.Column="4" 
                                                 Grid.RowSpan="2" 
@@ -68,7 +68,7 @@
                                                 <Image.GestureRecognizers>
                                                     <TapGestureRecognizer Tapped="Image_Tapped" CommandParameter="{Binding .}"/>
                                                 </Image.GestureRecognizers>
-                                            </Image>
+                                            </Image-->
                                         </Grid>
                                     </Frame>
                                 </ViewCell>

+ 0 - 1
prs.mobile.new/PRS.Mobile/Modules/Warehousing/Transfer/RecTransferPopup.xaml.cs

@@ -36,7 +36,6 @@ namespace PRS.Mobile
         public RecTransferPopup(StockHoldingShell_Old _shell, Job _defaultJob, Job _receivingJob, bool _stocktake = false)
         {
             InitializeComponent();
-            NavigationPage.SetHasBackButton(this, false);
             stocktake = _stocktake;
             if (_stocktake)
                 jobBtn.IsEnabled = false;