コード例 #1
0
ファイル: MainDataContext.cs プロジェクト: basio/veropos
 public void Recalculate(Ticket ticket)
 {
     ticket.Recalculate(AppServices.SettingService.AutoRoundDiscount, AppServices.CurrentLoggedInUser.Id);
 }
コード例 #2
0
ファイル: TicketService.cs プロジェクト: hperassi/SambaPOS-3
 public void RecalculateTicket(Ticket ticket)
 {
     var total = ticket.TotalAmount;
     ticket.Calculations.Where(x => x.CalculationType == 5).ToList().ForEach(
         x => x.Amount = _expressionService.EvalCommand(FunctionNames.Calculation, "_" + x.Name, new { Ticket = ticket }, 0m));
     ticket.Recalculate();
     if (total != ticket.TotalAmount)
     {
         _applicationState.NotifyEvent(RuleEventNames.TicketTotalChanged,
             new
             {
                 Ticket = ticket,
                 PreviousTotal = total,
                 TicketTotal = ticket.GetSum(),
                 DiscountTotal = ticket.GetPreTaxServicesTotal(),
                 PaymentTotal = ticket.GetPaymentAmount(),
                 RemainingAmount = ticket.GetRemainingAmount()
             });
     }
 }
コード例 #3
0
ファイル: TicketService.cs プロジェクト: neapolis/SambaPOS-3
 public void RecalculateTicket(Ticket ticket)
 {
     var total = ticket.TotalAmount;
     ticket.Recalculate();
     if (total != ticket.TotalAmount)
     {
         _automationService.NotifyEvent(RuleEventNames.TicketTotalChanged,
             new
             {
                 Ticket = ticket,
                 PreviousTotal = total,
                 TicketTotal = ticket.GetSum(),
                 DiscountTotal = ticket.GetPreTaxServicesTotal(),
                 PaymentTotal = ticket.GetPaymentAmount(),
                 RemainingAmount = ticket.GetRemainingAmount()
             });
     }
 }