private void ProcessCreditNote()
        {
            CreditNote.DocTotal = Total;
            //CreditNote.SeriesTitle = SelectedSerie.SeriesName + " " + SelectedSerie.Remark;
            CreditNote.RPC1_SupplierCreditNoteDetail = CreditNoteDetailsCollection.ToList();

            if (CreditNote.IdSupplierCreditNote > 0)
            {
                CreditNote.HasToBeSync   = true;
                CreditNote.ModifiedDateL = DateTime.Now;
                CreditNote.ModifiedByL   = Config.CurrentUser;
                //CreditNote.StateL = LocalStatus.Pendiente;
                SaveChanges();//SupplierCreditNoteHelper.Update();
                RaisePropertyChanged("CreditNotesCollection");
            }
            else
            {
                FillData();
                //CreditNote.StateL = LocalStatus.Pendiente;
                SupplierCreditNoteHelper.Add(CreditNote);
                // CreditNotesCollection.Add(CreditNote);
            }

            ViewModelManager.CloseModal();

            if (CreditNote.IdSupplierCreditNote == 0)
            {
                MessageBox.Show(
                    "La Nota de Crédito esta en proceso, por favor seleccione la pestaña NOTAS DE CRÉDITO para ver el detalle");
            }
        }
        private void SaveTransferRequest(LocalStatus?status = null)
        {
            //si ya existe
            if (TransferRequest.IdTransferRequestL > 0)
            {
                TransferRequest.ModifiedDateL = DateTime.Now;
                TransferRequest.ModifiedByL   = Config.CurrentUser;
                TransferRequest.StateL        = status.HasValue ? status.Value : LocalStatus.Guardado;
                if (TransferRequestDetails != null) //TransferRequestHelper.Update(TransferRequest, GetTransferRequestDetail());
                {
                    SavePendingChanges();
                }
                TransferRequestHelper.AddOrUpdate(TransferRequest);
                SaveChanges();
                RaisePropertyChanged("TransferRequestCollection");
            }
            else //sino
            {
                CreateTransferRequest();
                TransferRequest.StateL = status.HasValue ? status.Value : LocalStatus.Guardado;
                TransferRequestHelper.AddOrUpdate(TransferRequest);
                //TransferRequestHelper.Add(TransferRequest);
                TransferRequestCollection.Add(TransferRequest);
                SaveChanges();
            }

            if (OnUpdateNotifications != null)
            {
                OnUpdateNotifications();
            }
            ViewModelManager.CloseModal();
        }
        private void SaveCreditNote()
        {
            CreditNote.DocTotal = Total;
            // CreditNote.SeriesTitle = SelectedSerie.SeriesName + " " + SelectedSerie.Remark;
            CreditNote.RIN1_ClientCreditNoteDetail = CreditNoteDetailsCollection.ToList();

            if (CreditNote.IdClientCreditNoteL > 0)
            {
                CreditNote.ModifiedDateL = DateTime.Now;
                CreditNote.ModifiedByL   = Config.CurrentUser;
                CreditNote.StateL        = LocalStatus.Guardado;
                ClientCreditNoteHelper.Update();
                RaisePropertyChanged("CreditNotesCollection");
            }
            else
            {
                FillData();
                CreditNote.StateL = LocalStatus.Guardado;
                ClientCreditNoteHelper.Add(CreditNote);
                // CreditNotesCollection.Add(CreditNote);
            }

            ViewModelManager.CloseModal();

            if (CreditNote.IdClientCreditNoteL == 0)
            {
                MessageBox.Show(
                    "La Nota de Crédito fue creada exitosamente, por favor seleccione la pestaña NOTAS DE CRÉDITO para ver el detalle");
            }
        }
Ejemplo n.º 4
0
        private void Process()
        {
            IsBusy = true;
            if (SelectedDownPayment == null || !ConfirmDialog("Desea procesar seleccionado", "Confimar"))
            {
                UndoChanges();
                IsBusy = false;
                return;
            }
            ViewModelManager.CloseModal();
            ShowProcessLoader(this);
            AsyncHelper.DoAsync(() =>
            {
                // SelectedDownPayment.StateL = LocalStatus.Procesado;

                // issue resolved Factura consumidor final no tiene cuenta contable.
                if (serie.SeriesName == "ANC")
                {
                    SelectedDownPayment.CardCode = SelectedPartner.CardCode;
                }
                SaveChanges();

                Synchronization.Synchronize(SelectedDownPayment);
                SaveChanges();
                IsDetailsBusy = IsBusy = false;
                ForceRefresh  = true;
                RaisePropertyChanged("DownPaymentCollection");
            }, ViewModelManager.CloseProcessLoader);
        }
        public void SaveNewChanges(bool isAsync = false)
        {
            if (!isAsync)
            {
                if (!ConfirmDialog("Desea Guardar Los Cambios", "Guardar"))
                {
                    UndoChanges();
                    return;
                }
            }

            var needUpdate = GoodsReceiptHelper.SaveNewDetailsCommand(SelectedGoodsReceipt, SelectedGroup, SelectedMovement);

            if (needUpdate)
            {
                GoodsReceiptsDetails.ToList().ForEach(d => SelectedGoodsReceipt.IGN1_GoodsReceiptDetail.Add(d));
            }

            if (!isAsync)
            {
                ViewModelManager.CloseModal();
                ForceRefresh = true;
                RaisePropertyChanged("GoodsReceipts");
            }
        }
Ejemplo n.º 6
0
 // To Block UI while Upload
 public void ShowProcessLoader <ViewModel>(ViewModel viewmodel) where ViewModel : BaseViewModel
 {
     FormTitle = "Sincronizando con el Servidor Por favor espere..";
     ViewModelManager.CloseModal();
     ViewModelManager.IsLockedModal = true;
     ShowDialog(new ProcessLoader(), viewmodel, new Thickness(400, 250, 400, 250));
 }
Ejemplo n.º 7
0
        private void SaveNewDetails()
        {
            if (ConfirmDialog("Desea Guardar los Cambios", "Guardar"))
            {
                // issue resolved Factura consumidor final no tiene cuenta contable.
                if (serie.SeriesName == "ANC")
                {
                    SelectedDownPayment.CardCode = SelectedPartner.CardCode;
                }

                if (SelectedDownPayment.IdDownPayment == 0)
                {
                    DownPaymentHelper.Add(SelectedDownPayment);
                }

                DownPaymentDetail.WhsCode      = SelectedDownPayment.WhsCode;
                DownPaymentDetail.AcctCode     = Config.DownPaymentAcc;
                DownPaymentDetail.TaxCode      = SelectedDownPayment != null && SelectedDownPayment.Series == 31 ? Config.IVACOF : "IVACRF";
                SelectedDownPayment.DocTotal   = (decimal)DownPaymentDetail.Price;
                SelectedDownPayment.PaymentAcc = SelectedDownPayment.PaymentType.AcctCode;
                if (DownPaymentDetail.IdDownPaymentL == 0)
                {
                    SelectedDownPayment.DPI1_DownPaymentDetail.Add(DownPaymentDetail);
                }
                SaveChanges();
            }
            else
            {
                UndoChanges();
            }
            CheckBookHelper.SetNextCheckBookNumber(SelectedDownPayment.Series, SelectedDownPayment.NumAtCard, onErrorAction: ShowErrorMessageBox);
            ForceRefresh = true;
            RaisePropertyChanged("DownPaymentCollection");
            ViewModelManager.CloseModal();
        }
        private void CreateCanceledCheckbook()
        {
            ErrorMessage = string.Empty;
            if (CanceledCheckBook.InitialNumL > CanceledCheckBook.LastNumL)
            {
                ErrorMessage = "El valor inicial debe ser menor que el valor final";
                return;
            }

            if (CanceledCheckBook.InitialNumL < ActiveCheckBook.InitialNumL || CanceledCheckBook.LastNumL > ActiveCheckBook.LastNumL)
            {
                ErrorMessage = "El rango de valores de la excepción no corresponde al rango de valores del talonario activo";
                return;
            }

            CanceledCheckBook.CreatedDateL  = DateTime.Now;
            CanceledCheckBook.CreatedByL    = Config.CurrentUser;
            CanceledCheckBook.ModifiedDateL = DateTime.Now;
            CanceledCheckBook.ModifiedByL   = Config.CurrentUser;
            CanceledCheckBook.IdCheckBookL  = ActiveCheckBook.IdCheckbookL;

            CanceledCheckBookHelper.Add(CanceledCheckBook);
            CanceledCheckBooksCollection.Add(CanceledCheckBook);
            ViewModelManager.CloseModal();
            ForceRefresh = true;
        }
Ejemplo n.º 9
0
        // OVerride Process Inventory Count

        public override void ExecuteDoProcess()
        {
            IsBusy = true;

            if (!ValidateChanges())
            {
                IsBusy = false;
                return;
            }

            ViewModelManager.CloseModal();
            ShowProcessLoader(this);
            AsyncHelper.DoAsync(ProcessInventoryCount, OnCompleteProcess);
        }
        public override void ExecuteDoProcess()
        {
            IsBusy = true;
            if (!ConfirmDialog("Desea procesar los cambios", "Procesar"))
            {
                UndoChanges();
                return;
            }
            ViewModelManager.CloseModal();

            //Mostrar loader y bloquear UI
            ShowProcessLoader(this);

            AsyncHelper.DoAsync(ProcessCreditNote, ViewModelManager.CloseProcessLoader);
        }
        private void ProcessCreditNote()
        {
            IsBusy = IsDetailsBusy = true;

            if (!ConfirmDialog("Desea Procesar la Nota de Credito Seleccionada", "Procesar"))
            {
                IsBusy = IsDetailsBusy = false;
                return;
            }

            ShowProcessLoader(this);

            AsyncHelper.DoAsync(() =>
            {
                CreditNote.DocTotal = Total;
                //CreditNote.SeriesTitle = SelectedSerie.SeriesName + " " + SelectedSerie.Remark;
                CreditNote.RIN1_ClientCreditNoteDetail = CreditNoteDetailsCollection.ToList();

                if (CreditNote.IdClientCreditNoteL > 0)
                {
                    CreditNote.ModifiedDateL = DateTime.Now;
                    CreditNote.ModifiedByL   = Config.CurrentUser;
                    //CreditNote.StateL = LocalStatus.Pendiente;
                    ClientCreditNoteHelper.Update();
                    //RaisePropertyChanged("CreditNotesCollection");
                }
                else
                {
                    FillData();
                    //CreditNote.StateL = LocalStatus.Pendiente;
                    ClientCreditNoteHelper.Add(CreditNote);
                    // CreditNotesCollection.Add(CreditNote);
                }
                Synchronization.Synchronize(CreditNote);
                SaveChanges();

                IsDetailsBusy = IsBusy = false;
                RaisePropertyChanged("CreditNotesCollection");
            }, ViewModelManager.CloseProcessLoader);

            ViewModelManager.CloseModal();

            if (CreditNote.IdClientCreditNoteL == 0)
            {
                MessageBox.Show(
                    "La Nota de Crédito esta en proceso, por favor seleccione la pestaña NOTAS DE CRÉDITO para ver el detalle");
            }
        }
Ejemplo n.º 12
0
        private bool SaveDetailsChanges(bool forceRefreshItemsource = true)
        {
            if (!ConfirmDialog("Desea Guardar Los Cambios", "Guardar"))
            {
                UndoChanges();
                return(false);
            }

            var isnotValid = GoodsIssuesDetails.ToList().Any(d =>
            {
                if (d.Quantity > d.OnHand)
                {
                    ErrorMessage =
                        string.Format(
                            "El Articulo : {0} Codigo {1} ,Quedara en Negativo",
                            d.Dscription, d.ItemCode);
                    ShowErrorMessageBox(ErrorMessage);
                    return(true);
                }
                else
                {
                    ErrorMessage = string.Empty;
                    return(false);
                }
            });

            if (isnotValid)
            {
                return(false);
            }
            if (SelectedGoodsIssues != null && SelectedGroup != null && SelectedMovement != null)
            {
                var needUpdate = GoodIssuesHelper.SaveDetails(SelectedGoodsIssues, SelectedGroup, SelectedMovement);

                if (needUpdate)
                {
                    GoodsIssuesDetails.ToList().ForEach(d => SelectedGoodsIssues.IGE1_GoodsIssueDetail.Add(d));
                }
            }

            ViewModelManager.CloseModal();
            if (forceRefreshItemsource)
            {
                ForceRefresh = true;
                RaisePropertyChanged("GoodsIssueses");
            }
            return(true);
        }
Ejemplo n.º 13
0
        private void SaveNewDetails()
        {
            if (ValidateDate() && ConfirmDialog("Confirma Guardar los cambios ", "Guardar"))
            {
                SpecialOrdersHelper.AddOrder(SelectedOrder);

                SaveChanges();
                ViewModelManager.CloseModal();
                ForceRefresh = true;
                RaisePropertyChanged("SpecialOrdersCollection");
            }
            else
            {
                UndoChanges();
            }
        }
Ejemplo n.º 14
0
 private void SaveInventoryCount()
 {
     if (!ValidateChanges())
     {
         return;
     }
     AsyncHelper.DoAsync(() =>
     {
         IsBusy = true;
         InventoryCountHelper.AddOrUpdate(SelectedInventoryCount);
         SaveChanges();
         IsBusy = false;
         RefreshItemSource();
     });
     ViewModelManager.CloseModal();
 }
Ejemplo n.º 15
0
        public void SaveNewDetails()
        {
            // TODo after save item
            if (SelectedCashMissing != null && ConfirmDialog("Desea Guardar los cambios", "Confirmar"))
            {
                CashMissingHelper.AddOrUpdate(SelectedCashMissing);
                SaveChanges();
                ForceRefresh = true;
                RaisePropertyChanged("CashCollection");

                ViewModelManager.CloseModal();
            }
            else
            {
                UndoChanges();
            }
        }
Ejemplo n.º 16
0
        public void RunEndOfDay()
        {
            EndOfDayNotifications = null;

            ViewModelManager.ShowModal(new DayToFinish(), new Thickness(350, 100, 350, 100));

            if (System.Windows.MessageBox.Show(ViewModelManager.mainWindow, "Desea Ejecutar Fin De Dia", "FIN DE DIA",
                                               System.Windows.MessageBoxButton.YesNo, MessageBoxImage.Question) ==
                MessageBoxResult.Yes)
            {
                AsyncHelper.DoAsync(RunEndOfDayAsync);
            }

            else
            {
                ViewModelManager.CloseModal();
            }
        }
Ejemplo n.º 17
0
        private void Process()
        {
            IsDetailsBusy = IsBusy = true;
            if (SalesHelper.VerifyNumAtCard(SelectedSale))
            {
                if (!ShowWarningMessage("Numero de Factura Repetido, Desea continuar de todas formas ?"))
                {
                    IsBusy = IsDetailsBusy = false;
                    return;
                }
            }

            if (SelectedSale == null || !ConfirmDialog("Desea procesar?", "Confimar"))
            {
                UndoChanges();
                IsBusy = IsDetailsBusy = false;
                return;
            }
            if (HasDownPayment && SelectedDownPayment != null)
            {
                SelectedDownPayment         = SelectedDownPayment.ForceUpdateToDataBase();
                SelectedDownPayment.IdSaleL = SelectedSale.IdSaleL;
            }
            else if (SelectedDownPayment != null)
            {
                SelectedDownPayment         = SelectedDownPayment.ForceUpdateToDataBase();
                SelectedDownPayment.IdSaleL = null;
            }

            ViewModelManager.CloseModal();
            ShowProcessLoader(this);

            AsyncHelper.DoAsync(() =>
            {
                IsBusy = IsDetailsBusy = true;
                //SelectedSale.StateL = LocalStatus.Pendiente;
                SaveChanges();
                Synchronization.Synchronize(SelectedSale);
                SaveChanges();
                RefreshItemSource();
            }, ViewModelManager.CloseProcessLoader);
        }
Ejemplo n.º 18
0
        public override void ExecuteDoProcess()
        {
            if (!ConfirmDialog("¿Desea procesar el registro?", "Procesar"))
            {
                return;
            }


            ViewModelManager.CloseModal(); // para cerrar la ventana detalles si esta abierta.

            AsyncHelper.DoAsync(() => TransferProcessing(), () =>
            {
                IsBusy = false;
                RefreshItemSource();
                if (OnUpdateNotifications != null)
                {
                    OnUpdateNotifications();
                }
            });
        }
Ejemplo n.º 19
0
        private void Process()
        {
            if (SelectedDeposit != null && SelectedDeposit.Cash + selectedDeposit.Cheque > (decimal)Config.MaximoDepositos && !ConfirmDialog("Los depositos sobrepasan los $200, desea continuar", "Confirmar"))
            {
                return;
            }
            if (SelectedDeposit != null && ConfirmDialog("Desea procesar los cambios ?", "Procesar"))
            {
                SelectedDeposit.StateL = LocalStatus.Procesado;
                DepositHelper.AddOrUpdate(SelectedDeposit);
                SaveChanges();
                ForceRefresh = true;
                RaisePropertyChanged("DepositCollection");

                ViewModelManager.CloseModal();
            }
            else
            {
                UndoChanges();
            }
        }
Ejemplo n.º 20
0
        private void CreateCheckbook()
        {
            if (CheckBook.LastNumL < CheckBook.InitialNumL)
            {
                ErrorMessage = "El rango de valores de la excepción no corresponde al rango de valores del talonario activo";
                return;
            }

            CheckBook.StateL        = 0;
            CheckBook.NextNumberL   = 1;
            CheckBook.DateL         = DateTime.Now;
            CheckBook.CreatedDateL  = DateTime.Now;
            CheckBook.CreatedByL    = Config.CurrentUser;
            CheckBook.ModifiedDateL = DateTime.Now;
            CheckBook.ModifiedByL   = Config.CurrentUser;

            CheckBookHelper.Add(CheckBook);

            ViewModelManager.CloseModal();
            CheckBooksCollection.Add(CheckBook);
        }
Ejemplo n.º 21
0
        private void Process()
        {
            IsDetailsBusy = IsBusy = true;

            if (!SaveDetailsChanges(forceRefreshItemsource: false))
            {
                IsDetailsBusy = IsBusy = false;
                return;
            }
            ViewModelManager.CloseModal();
            ShowProcessLoader(this);

            AsyncHelper.DoAsync(() =>
            {
                Synchronization.Synchronize(SelectedGoodsIssues);
                SaveChanges();
                ForceRefresh = true;
                RaisePropertyChanged("GoodsIssueses");
                IsDetailsBusy = IsBusy = false;
            }, ViewModelManager.CloseProcessLoader);
        }
        private void Process()
        {
            IsBusy = true;

            if (SelectedGoodsReceipt == null || !ConfirmDialog("Confirma que desea procesar", "Confimar"))
            {
                UndoChanges();
                return;
            }
            ViewModelManager.CloseModal();
            ShowProcessLoader(this);
            AsyncHelper.DoAsync(() =>
            {
                GoodsReceiptHelper.SaveNewDetailsCommand(SelectedGoodsReceipt, SelectedGroup, SelectedMovement);
                SaveChanges();
                Synchronization.Synchronize(SelectedGoodsReceipt);
                ForceRefresh = true;
                RaisePropertyChanged("GoodsReceipts");
                IsBusy = false;
            }, ViewModelManager.CloseProcessLoader);
        }
Ejemplo n.º 23
0
        public void SaveNewDetails()
        {
            // TODo after save item
            if (SelectedDeposit != null && SelectedDeposit.Cash + selectedDeposit.Cheque > (decimal)Config.MaximoDepositos && !ConfirmDialog("Los depositos sobrepasan los $200, desea continuar", "Confirmar"))
            {
                return;
            }

            if (SelectedDeposit != null && ConfirmDialog("Desea Guardar los cambios", "Confirmar"))
            {
                DepositHelper.AddOrUpdate(SelectedDeposit);
                SaveChanges();
                ForceRefresh = true;
                RaisePropertyChanged("DepositCollection");

                ViewModelManager.CloseModal();
            }
            else
            {
                UndoChanges();
            }
        }
        public override void ExecuteDoProcess()
        {
            IsBusy = true;
            if (!ConfirmDialog("¿Desea procesar el registro?", "Procesar"))
            {
                IsBusy = false;
                return;
            }

            ViewModelManager.CloseModal();
            ShowProcessLoader(this);
            AsyncHelper.DoAsync(() =>
            {
                TransferRequestProcessing();
                RefreshItemSource();
                if (OnUpdateNotifications != null)
                {
                    OnUpdateNotifications();
                }
                IsBusy = false;
            }, ViewModelManager.CloseProcessLoader);
            //ViewModelManager.CloseModal(); // para cerrar la ventana detalles si esta abierta.
        }
Ejemplo n.º 25
0
        private void CloseModal()

        {
            ViewModelManager.CloseModal();
        }
Ejemplo n.º 26
0
 private void SaveStockTemplate()
 {
     BranchsHelper.SaveTemplateArticles();
     ViewModelManager.CloseModal();
 }
Ejemplo n.º 27
0
        private void SaveNewDetails()
        {
            CurrentOperation = Operations.Save;
            var autorizacion = SalesDetailsCollection.ToList().Any(dc => dc.PriceEdited);

            if (!UserIsValid && autorizacion)
            {
                ShowUserValidatorPicker();
                return;
            }

            if (SalesHelper.VerifyNumAtCard(SelectedSale))
            {
                if (ShowWarningMessage("Numero de Factura Repetido, Desea continuar de todas formas ?"))
                {
                    return;
                }
                IsBusy = IsDetailsBusy = false;
                return;
            }


            if (!ConfirmDialog("Desea Guardar Los Cambios", "Guardar"))
            {
                UndoChanges();
                return;
            }

            // Excluir articulos no inventariables.
            var productsToExclude = ArticlesHelper.GetProductsOnInventory(SalesDetailsCollection.Select(d => d.ItemCode).ToList());

            //.Where(p=> p.OITM_Articles.InvntItem.Contains("Y"))
            var isnotValid = SalesDetailsCollection.Where(p => !productsToExclude.Contains(p.ItemCode))

                             .Any(d =>
            {
                if (d.Quantity > d.OnHand)
                {
                    ErrorMessage = string.Format("El Articulo : {0} Codigo {1} ,Quedara en Negativo", d.Dscription, d.ItemCode);
                    ShowErrorMessageBox(ErrorMessage);
                    return(true);
                }

                ErrorMessage = string.Empty;
                return(false);
            });

            if (isnotValid)
            {
                return;
            }

            if (!Exento && !WithHolding)
            {
                CheckIVACOM(true);
            }
            else
            {
                CheckIVAEXE(Exento);
                CheckIVARET(WithHolding);
            }
            if (!HasDownPayment)
            {
                SelectedSale.dpEntry = 0;
            }
            SalesHelper.AddSale(SelectedSale);
            //if (SelectedDownPayment != null)
            //{
            //    if (HasDownPayment) SelectedDownPayment.IdSaleL = SelectedSale.IdSaleL; else SelectedDownPayment.IdSaleL = null;
            //}


            SaveChanges();

            // TODO validar los valores Series y NumAtCard  son diferentes de null ,
            //y considerar el caso en que los valores son 0

            if (SelectedSale == null)
            {
                return;                       // TODO Show error Message
            }
            var serieNumber = (int)(SelectedSale.Series.HasValue? SelectedSale.Series : 0);
            var numAtcoard  = !string.IsNullOrEmpty(SelectedSale.NumAtCard)
                            ? Convert.ToInt32(SelectedSale.NumAtCard)
                            : 0;

            CheckBookHelper.SetNextCheckBookNumber(serieNumber, numAtcoard);
            ViewModelManager.CloseModal();
            RefreshItemSource();
        }
Ejemplo n.º 28
0
        private void NewProcess()
        {
            CurrentOperation = Operations.Process;
            var autorizacion = SalesDetailsCollection.ToList().Any(dc => dc.PriceEdited);

            if (!UserIsValid && autorizacion)
            {
                ShowUserValidatorPicker();
                return;
            }

            IsBusy = IsDetailsBusy = true;
            if (SalesHelper.VerifyNumAtCard(SelectedSale))
            {
                if (!ShowWarningMessage("Numero de Factura Repetido, Desea continuar de todas formas ?"))
                {
                    IsBusy = IsDetailsBusy = false;
                    return;
                }
            }

            if (!ConfirmDialog("Desea procesar la venta?", "procesar"))
            {
                UndoChanges();
                IsBusy = IsDetailsBusy = false;
                return;
            }
            ViewModelManager.CloseModal();
            ShowProcessLoader(this);
            AsyncHelper.DoAsync(() =>
            {
                if (!Exento && !WithHolding)
                {
                    CheckIVACOM(true);
                }
                else
                {
                    CheckIVAEXE(Exento);
                    CheckIVARET(WithHolding);
                }

                //SelectedSale.StateL = LocalStatus.Pendiente;
                SalesHelper.AddSale(SelectedSale);
                if (HasDownPayment && SelectedDownPayment != null)
                {
                    SelectedDownPayment         = SelectedDownPayment.ForceUpdateToDataBase();
                    SelectedDownPayment.IdSaleL = SelectedSale.IdSaleL;
                }
                else if (SelectedDownPayment != null)
                {
                    SelectedDownPayment.IdSaleL = null;
                }

                SaveChanges();

                CheckBookHelper.SetNextCheckBookNumber((int)SelectedSale.Series,
                                                       Convert.ToInt32(selectedSale.NumAtCard));


                Synchronization.Synchronize(SelectedSale);


                IsBusy = IsDetailsBusy = false;

                SaveChanges();
                RefreshItemSource();
            }, ViewModelManager.CloseProcessLoader);
        }
Ejemplo n.º 29
0
 public virtual void OnCloseModal()
 {
     IsModalVisible = false;
     ViewModelManager.CloseModal();
 }