Example #1
0
 public void RemoveData()
 {
     Orders.ToList().ForEach(RemoveOrder);
     Payments.ToList().ForEach(RemovePayment);
     ChangePayments.ToList().ForEach(RemoveChangePayment);
     Calculations.ToList().ForEach(RemoveCalculation);
 }
Example #2
0
        public void AddChangePayment(ChangePaymentType changePaymentType, Account account, decimal amount, decimal exchangeRate, int userId)
        {
            var transaction = TransactionDocument.AddNewTransaction(changePaymentType.AccountTransactionType, GetTicketAccounts(account), amount, exchangeRate);
            var payment     = new ChangePayment {
                AccountTransaction = transaction, Amount = amount, Name = account.Name, ChangePaymentTypeId = changePaymentType.Id
            };

            ChangePayments.Add(payment);
        }
Example #3
0
 public decimal GetChangeAmount()
 {
     return(ChangePayments.Sum(x => x.Amount));
 }
Example #4
0
 public void RemoveChangePayment(ChangePayment py)
 {
     ChangePayments.Remove(py);
     TransactionDocument.AccountTransactions.Where(x => x.Id == py.AccountTransaction.Id).ToList().ForEach(x => TransactionDocument.AccountTransactions.Remove(x));
 }