Ejemplo n.º 1
0
 public void Prepare(Ticket selectedTicket)
 {
     ForeignCurrency = null;
     Debug.Assert(SelectedTicket == null);
     _applicationStateSetter.SetLastPaidItems(new List <PaidItem>());
     Totals.Model         = selectedTicket;
     SelectedTicket       = selectedTicket;
     TicketRemainingValue = GetRemainingAmount();
     UpdatePaymentAmount(0);
     OrderSelector.UpdateTicket(selectedTicket);
     RefreshValues();
     NumberPadViewModel.LastTenderedAmount = PaymentAmount;
     CreateButtons(selectedTicket);
 }
Ejemplo n.º 2
0
 private void OnSelectCalculationSelector(CalculationSelector calculationSelector)
 {
     foreach (var calculationType in calculationSelector.CalculationTypes)
     {
         var amount = calculationType.Amount;
         if (amount == 0)
         {
             amount = GetTenderedValue();
         }
         if (calculationType.CalculationMethod == 0 || calculationType.CalculationMethod == 1)
         {
             amount = amount / ExchangeRate;
         }
         SelectedTicket.AddCalculation(calculationType, amount);
     }
     UpdatePaymentAmount(0);
     OrderSelector.UpdateTicket(SelectedTicket);
     RefreshValues();
 }