コード例 #1
0
        public ActionResult CashierDayEnd()
        {
            ViewData["Employees"] = DDRep.GetEmployeeList();
            ViewData["Movements"] = DDRep.GetMovementTypeList();
            ViewData["MoneyUnit"] = DDRep.GetMoneyUnitList();
            ViewData["ElectronicType"] = DDRep.GetElectronicFundTypeList();
            ViewData["ReconciliationTypeID"] = DDRep.GetCashReconList();
            ViewData["InstantMoneyType"] = DDRep.GetInstantMoneyType();
            ViewData["FNBType"] = DDRep.GetFNBType();
            ViewData["KwikPayType"] = DDRep.GetKwikPayType();

            CashMovementMultiple ins = new CashMovementMultiple();
            ins.Movements = new List<CashMovement>();

            for (int i = 1; i <= 12; i++)
            {
                ins.Movements.Add(new CashMovement());
                ins.Movements[i - 1].MoneyUnitID = i;
                ins.Movements[i - 1].moneyunit = MuRep.GetMoneyUnitString(i);
                ins.MovementTypeID = 1;
            }

            CashierDayEnd model = new CashierDayEnd();
            model.CashMovements = ins;
            model.SigmaSale = new CashReconciliation();
            model.SigmaSale.ReconciliationTypeID = 3;
            model.SigmaSale.MovementTypeID = 1;
            model.ElectronicFund = new ElectronicFund();
            model.ElectronicFund.MovementTypeID = 1;

            return View(model);
        }
コード例 #2
0
        public ActionResult _SigmaCashier(CashierDayEnd ins)
        {
            CashReconciliation ins2 = CRRep.InsertMultiple(ins.SigmaSale);

            if(ins2.CashReconciliationID != 0)
            {
                return Content(ins2.Amount.ToString(), "text/html");
            }
            else
            {
                return Content("0", "text/html");
            }
        }
コード例 #3
0
        public ActionResult _InsertMultipleCashCashier(CashierDayEnd ins)
        {
            decimal total = 0;

            for (int i = 0; i < 12; i++)
            {
                ins.CashMovements.Movements[i].ActualDate = ins.CashMovements.ActualDate;
                ins.CashMovements.Movements[i].MovementTypeID = ins.CashMovements.MovementTypeID;
                ins.CashMovements.Movements[i].EmployeeID = ins.CashMovements.EmployeeID;
                ins.CashMovements.Movements[i].Amount = ins.CashMovements.Movements[i].Count * MuRep.GetMoneyUnitValue(ins.CashMovements.Movements[i].MoneyUnitID);
                ins.CashMovements.Movements[i] = CashRep.Insert(ins.CashMovements.Movements[i]);

                if (ins.CashMovements.Movements[i].CashMovementID != 0)
                {
                    total = total + ins.CashMovements.Movements[i].Amount;
                }
            }

            return Content(total.ToString(), "text/html");
        }
コード例 #4
0
        public ActionResult _InsertElectronicFromMulti(CashierDayEnd ins)
        {
            //ins.ElectronicFund.ActualDate = ins.ActualDate;
            //ins.ElectronicFund.EmployeeID = ins.EmployeeID;
            ElectronicFund ins2 = ELRep.Insert(ins.ElectronicFund);

            if(ins2.ElectronicFundID != 0)
            {
                return Content(ins2.Total.ToString(), "text/html");
            }
            else
            {
                return Content("0", "text/html");
            }
        }
コード例 #5
0
 public ActionResult _CashierDayEndReportShow(CashierDayEnd ins)
 {
     ins.Report = RepRep.GetCashierReport(ins.ReportActualDate, ins.ReportEmployeeID);
     return PartialView("_CashierDayEndReport",ins);
 }
コード例 #6
0
        public ActionResult _CashierDayEndReportPDF(int ReportEmployeeID, DateTime ReportActualDate)
        {
            CashierDayEnd report = new CashierDayEnd();
            report.Report = RepRep.GetCashierReport(ReportActualDate, ReportEmployeeID);

            return new Rotativa.ViewAsPdf("SigmaSalesReport", report);
        }