private ActionResult PayCash(TrPaymentMenuViewModel vmodel) { var temp = vmodel.Amount.Replace(".", ","); decimal cash = decimal.Parse(temp); // legal limit for cash if (cash <= 3000) { PaymentBL.CalculCash(vmodel); } else { @ViewBag.limitCash = "Montant cash max de 3000 € dépassé !"; } ViewBag.tot = vmodel.GlobalTotal; ViewBag.amount = vmodel.Amount; ViewBag.cashBack = vmodel.CashReturn; vmodel.MethodsP = PaymentBL.FindMethodsList(); vmodel.AmountsPaid = PaymentBL.MakeAmountsList(vmodel.NumTransaction); ViewBag.messageCard = ""; if (ViewBag.tot == "0") { vmodel.Ticket = TicketBL.FillTicket(vmodel.NumTransaction); ViewBag.NumT = vmodel.Ticket.Ticket; vmodel.NumTicket = vmodel.Ticket.Ticket; ViewBag.ticket = true; } else { ViewBag.ticket = false; } return(View(vmodel)); }
private ActionResult PayCardDebit(TrPaymentMenuViewModel vmodel) { PaymentBL.CalculCash(vmodel); ViewBag.tot = vmodel.GlobalTotal; ViewBag.amount = vmodel.Amount; ViewBag.cashBack = vmodel.CashReturn; if (ViewBag.tot == "0") { vmodel.Ticket = TicketBL.FillTicket(vmodel.NumTransaction); ViewBag.ticket = true; } else { ViewBag.ticket = false; } vmodel.AmountsPaid = PaymentBL.MakeAmountsList(vmodel.NumTransaction); vmodel.MethodsP = PaymentBL.FindMethodsList(); return(View(vmodel)); }
private ActionResult PayCash(TrPaymentMenuViewModel vmodel, string language) { var temp = vmodel.Amount.Replace(".", ","); decimal cash = decimal.Parse(temp); // legal limit for cash if (cash <= 3000) { PaymentBL.CalculCash(vmodel); } else { @ViewBag.limitCash = "Montant cash max de 3000 € dépassé !"; } ViewBag.tot = vmodel.GlobalTotal; ViewBag.amount = vmodel.Amount; ViewBag.cashBack = vmodel.CashReturn; vmodel.MethodsP = PaymentBL.FindMethodsList(); vmodel.AmountsPaid = PaymentBL.MakeAmountsList(vmodel.NumTransaction); ViewBag.messageCard = ""; if (ViewBag.tot == "0") { //to do --> change init isChange... bool isChange = false; vmodel.Ticket = TicketBL.FillTicket(vmodel.NumTransaction, language, isChange); vmodel.Language = vmodel.Ticket.Language; vmodel.Languages = LanguageBL.FindLanguageListWithoutUniversal(); vmodel.DateT = vmodel.Ticket.DateTicket; ViewBag.DateTi = vmodel.Ticket.DateTicket; ViewBag.ticket = true; } else { ViewBag.ticket = false; } return(View(vmodel)); }
private ActionResult PayCardDebit(TrPaymentMenuViewModel vmodel, string language) { PaymentBL.CalculCash(vmodel); ViewBag.tot = vmodel.GlobalTotal; ViewBag.amount = vmodel.Amount; ViewBag.cashBack = vmodel.CashReturn; if (ViewBag.tot == "0") { //to do --> change init isChange... bool isChange = false; vmodel.Ticket = TicketBL.FillTicket(vmodel.NumTransaction, language, isChange); vmodel.Language = vmodel.Ticket.Language; vmodel.Languages = LanguageBL.FindLanguageListWithoutUniversal(); ViewBag.DateTi = vmodel.Ticket.DateTicket; ViewBag.ticket = true; } else { ViewBag.ticket = false; } vmodel.AmountsPaid = PaymentBL.MakeAmountsList(vmodel.NumTransaction); vmodel.MethodsP = PaymentBL.FindMethodsList(); return(View(vmodel)); }