Пример #1
0
        private void SetEditTransactionMode(SalesReturnTransaction salesReturnTransaction)
        {
            Model = salesReturnTransaction;
            SelectedSalesTransactionID = Model.SalesTransaction.SalesTransactionID;
            SalesReturnTransactionDate = Model.Date;

            _salesReturnTransactionNetTotal = 0;
            foreach (var line in Model.SalesReturnTransactionLines)
            {
                DisplayedSalesReturnTransactionLines.Add(new SalesReturnTransactionLineVM {
                    Model = line
                });
                _salesReturnTransactionNetTotal += line.Total;
            }
            UpdateUINetTotal();

            NotEditing = false;
        }
Пример #2
0
        private void ResetTransaction()
        {
            DisplayedSalesReturnTransactionLines.Clear();
            DisplayedSalesTransactionLines.Clear();

            Model      = new SalesReturnTransaction();
            NotEditing = true;

            SetNewSalesReturnTransactionID();
            SalesReturnTransactionDate     = UtilityMethods.GetCurrentDate().Date;
            SalesReturnTransactionNetTotal = 0;

            SelectedSalesTransactionID       = null;
            SelectedSalesTransactionCustomer = null;
            SelectedSalesTransactionLine     = null;

            NewEntryVM.SalesReturnNewEntryProduct  = null;
            NewEntryVM.SalesReturnNewEntryQuantity = 0;
            NewEntryVM.SalesReturnNewEntryPrice    = 0;
        }