private void OnChangeBalanceMode(string obj)
 {
     BalanceMode = (!BalanceMode || _paymentEditor.SelectedTicket.GetRemainingAmount() == 0) && _accountBalances.GetActiveAccountBalance() > 0;
     if (BalanceMode)
     {
         TenderAllBalance();
     }
     else
     {
         _tenderedValueViewModel.UpdatePaymentAmount(0);
         TenderAll();
     }
 }
Exemplo n.º 2
0
 public decimal GetRemainingAmount()
 {
     return(AccountMode && _accountBalances.ContainsActiveAccount()
                ? SelectedTicket.GetRemainingAmount() + _accountBalances.GetActiveAccountBalance() - SelectedTicket.TransactionDocument.AccountTransactions.Where(x => x.ContainsAccountId(_accountBalances.GetActiveAccountId())).Sum(y => y.Amount)
                : SelectedTicket.GetRemainingAmount());
 }