Example #1
0
        private void ButtonPagePrev_OnClicked(object sender, EventArgs e)
        {
            var hasChanges = false;

            if (Pager.CurrentPage != 1)
            {
                Pager.CurrentPage--;
            }

            if (vm.IsCollectionChanged || (vm.SelectedSaleTracker?.ChangedProperties != null && vm.SelectedSaleTracker.ChangedProperties.Count > 0))
            {
                hasChanges = true;
            }

            vm.ReloadSalesLines();

            if (!vm.SelectedSale.IsNotTendered)
            {
                ClearChangeTracker();
            }
            else
            {
                if (!hasChanges)
                {
                    ClearChangeTracker();
                }
            }
        }
Example #2
0
        private void CmdOK_OnClicked(object sender, EventArgs e)
        {
            Navigation.PopAsync().ContinueWith(x =>
            {
                if (vm.ItemFrom == ItemFrom.Item)
                {
                    if (vm.SelectedSale.TrnSalesLines.Any(y => y.ItemId == vm.SelectedSaleLine.ItemId))
                    {
                        var qty = vm.SelectedSaleLine.Quantity;

                        vm.SelectedSaleLine           = vm.SelectedSale.TrnSalesLines.FirstOrDefault(y => y.ItemId == vm.SelectedSaleLine.ItemId);
                        vm.SelectedSaleLine.Quantity += qty;

                        vm.SelectedSaleLine.Amount    = vm.ComputeAmount();
                        vm.SelectedSaleLine.TaxAmount = vm.ComputeVatAmount();
                    }
                    else
                    {
                        vm.SelectedSale.TrnSalesLines.Add(vm.SelectedSaleLine);
                    }
                }
                else
                {
                }

                vm.ReloadSalesLines();
            });
        }
Example #3
0
        private void CmdOK_OnClicked(object sender, EventArgs e)
        {
            Navigation.PopAsync().ContinueWith(x =>
            {
                if (vm.ItemFrom == ItemFrom.Item)
                {
                    vm.SelectedSale.TrnSalesLines.Add(vm.SelectedSaleLine);
                }

                vm.ReloadSalesLines();
            });
        }