Example #1
0
 public void Close()
 {
     if (RemainingAmount == 0 && !HasActiveTimers())
     {
         IsClosed = true;
         PaidItems.Clear();
     }
 }
Example #2
0
        public void AddPayment(PaymentType paymentType, Account account, decimal amount, decimal exchangeRate, int userId)
        {
            var transaction = TransactionDocument.AddNewTransaction(paymentType.AccountTransactionType, GetTicketAccounts(account), amount, exchangeRate);
            var payment     = new Payment {
                AccountTransaction = transaction, Amount = amount, Name = account.Name, PaymentTypeId = paymentType.Id
            };

            Payments.Add(payment);
            LastPaymentDate = DateTime.Now;
            RemainingAmount = GetRemainingAmount();
            if (RemainingAmount == 0)
            {
                PaidItems.Clear();
            }
        }