Exemplo n.º 1
0
        public ActionResult GetBooking_Payments(int transactionId)
        {
            BookingPaymentsViewModel bookpay = new BookingPaymentsViewModel();

            //  BookingsViewModel bbViewModel=new BookingsViewModel();
            try
            {
                decimal totalAmount = 0;
                bookpay.transId = transactionId;

                bookpay.Bookings = bookingsViewModel.GetListofBookings().SingleOrDefault(x => x.trn_Id == transactionId);

                totalAmount               = bookingPayments.Get_TotalAmountBook(transactionId);
                bookpay.t_amtBooking      = totalAmount;
                bookpay.t_addons          = bookingPayments.getTotalAddons(transactionId);
                bookpay.cateringdiscount  = bookingPayments.GetCateringDiscount(transactionId);
                bookpay.locationextcharge = transdetails.Get_extendedAmountLoc(transactionId);
                bookpay.generaldiscount   = bookingPayments.getBookingTransDiscount(transactionId, totalAmount);

                bookpay.PaymentList = bookingPayments.GetPaymentDetaiilsBooking(transactionId);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                throw;
            }

            return(View(bookpay));
        }
Exemplo n.º 2
0
        public ActionResult GetRefundEntry(int transId)
        {
            RefundEntryViewModel refundEntry = new RefundEntryViewModel();

            //decimal totalAmount = 0;
            refundEntry.transId = transId;
            //totalAmount = bookingPayments.Get_TotalAmountBook(transId);
            //refundEntry.t_amountPayment = (decimal) (from p in dbEntities.Payments select p)
            //    .Where(s => s.trn_Id == transId).Sum(x => x.amtPay);
            //refundEntry.t_amtBooking = bookingPayments.Get_TotalAmountBook(transId);

            refundEntry.Bookings      = bookingsViewModel.GetListofBookings().FirstOrDefault(x => x.trn_Id == transId);
            refundEntry.bookingrefund = refundbook.GetBookingRefund(transId);


            return(View(refundEntry));
        }