private async Task OnSubmit(PackReasonEventArgs arg)
        {
            if (_packReasonList.Sum(p => p.Quantity)
                + arg.Quantity > _line.ShippedQuantity.GetValueOrDefault())
            {
                await Alert.ShowMessage(Translate.Get(AppResources.DrvPackingSlipError));

                return;
            }
            //TODO: implement call.
            //Api.RepackPackingSlip(new RepackRequestModel
            //{
            //    PackingSlip = _line.PackingSlip.Key,
            //    Account = _line.PackingSlip.Account.Key,
            //    Branch = _line.PackingSlip.Branch.Code,
            //    RecId = _line.PackingSlip.RecId.ToLong(),
            //    SalesOrder = _line.PackingSlip.Order.Key,
            //    Data = new List<RepackModel>
            //    {
            //        new RepackModel
            //        {
            //            LineItem = _line.Key,
            //            Reasons =  new List<PackReason>
            //            {
            //                arg.Reason.
            //            }
            //        }
            //    }
            //})
            PackReasonList.Add(arg);
            RaisePropertyChanged(nameof(AvailableQuantity));
            ShowPopup = false;
            _packingReasonsChanged = true;
        }
Example #2
0
        private void ActionButtonView_TappedEvent(object sender, object e)
        {
            var packReason = new PackReasonEventArgs
            {
                Action   = _selectedAction,
                Reason   = _selectedReason,
                Quantity = _selectedQuantity
            };

            SubmitCommand?.Execute(packReason);
        }
 private void OnDeleteReason(PackReasonEventArgs obj)
 {
     PackReasonList.Remove(obj);
     RaisePropertyChanged(nameof(AvailableQuantity));
     _packingReasonsChanged = true;
 }