public CashierInstantMoneyReport GetCashierInstantMoneyReport(DateTime ActualDate, int EmployeeId)
        {
            #region Repositories
            CashierRepository cashierrep = new CashierRepository();
            CashMovementRepository cashmovementrep = new CashMovementRepository();
            ElectronicFundRepository elecrep = new ElectronicFundRepository();
            PickUpRepository pickuprep = new PickUpRepository();
            CashReconciliationRepository cashreconrep = new CashReconciliationRepository();
            InstantMoneyRepository IMRep = new InstantMoneyRepository();
            #endregion

            //...Get All Details
            CashierInstantMoneyReport report = new CashierInstantMoneyReport();
            report.CashierId = EmployeeId;
            report.ReportDate = ActualDate;

            report.Cashier = cashierrep.GetCashier(EmployeeId);
            report.CashMovements = cashmovementrep.GetCashMovementsPerEmployeeReport(EmployeeId, ActualDate,4);
            report.ElectronicFunds = elecrep.GetElectronicFundsPerEmployee(EmployeeId, ActualDate,4);
            report.Pickups = pickuprep.GetPickUpsPerEmployee(EmployeeId, ActualDate,4);
            report.Recons = cashreconrep.GetCashReconcilationsPerEmployee(EmployeeId, ActualDate);
            report.IM = IMRep.GetInstantMoneysPerEmployee(EmployeeId, ActualDate);
            //...Initialize Totals
            report.CashTotal = 0;
            report.CardsTotal = 0;
            report.ChequeTotal = 0;
            report.SassaTotal = 0;
            report.PickupTotal = 0;
            report.FloatTotal = 0;
            report.ExtraFloatTotal = 0;
            report.SigmaTotal = 0;

            //...Get Totals
            foreach (CashMovement item in report.CashMovements)
            {
                report.CashTotal += item.Amount;
            }

            foreach (ElectronicFund item in report.ElectronicFunds)
            {
                switch (item.ElectronicTypeID)
                {
                    case 1: report.SassaTotal += item.Total; break;
                    case 2: report.CardsTotal += item.Total; break;
                    case 3: report.ChequeTotal += item.Total; break;
                }
            }

            foreach (PickUp item in report.Pickups)
            {
                report.PickupTotal += item.Amount;
            }

            foreach (CashReconciliation item in report.Recons)
            {
                switch (item.ReconciliationTypeID)
                {
                    case 2: report.ExtraFloatTotal += item.Amount; break;
                }
            }
             foreach(InstantMoney item in report.IM)
             {
             switch(item.InstantMoneyTypeID)
             {
                 case 1: report.FloatTotal += item.Amount; break;
                 case 2: report.RecievedTotal += item.Amount; break;
                 case 3: report.PaidTotal += item.Amount; break;
             }
             }

             report.BigFloatTotal = report.FloatTotal + report.ExtraFloatTotal;
             report.ExpectedTotal = report.BigFloatTotal + report.RecievedTotal - report.PaidTotal;
             report.DeclaredTotal = report.CashTotal + report.CardsTotal + report.ChequeTotal + report.PickupTotal;
             report.Final = report.DeclaredTotal - report.ExpectedTotal;

            return report;
        }
Esempio n. 2
0
        public CashierInstantMoneyReport GetCashierInstantMoneyReport(DateTime ActualDate, int EmployeeId)
        {
            #region Repositories
            CashierRepository            cashierrep      = new CashierRepository();
            CashMovementRepository       cashmovementrep = new CashMovementRepository();
            ElectronicFundRepository     elecrep         = new ElectronicFundRepository();
            PickUpRepository             pickuprep       = new PickUpRepository();
            CashReconciliationRepository cashreconrep    = new CashReconciliationRepository();
            InstantMoneyRepository       IMRep           = new InstantMoneyRepository();
            #endregion

            //...Get All Details
            CashierInstantMoneyReport report = new CashierInstantMoneyReport();
            report.CashierId  = EmployeeId;
            report.ReportDate = ActualDate;


            report.Cashier         = cashierrep.GetCashier(EmployeeId);
            report.CashMovements   = cashmovementrep.GetCashMovementsPerEmployeeReport(EmployeeId, ActualDate, 4);
            report.ElectronicFunds = elecrep.GetElectronicFundsPerEmployee(EmployeeId, ActualDate, 4);
            report.Pickups         = pickuprep.GetPickUpsPerEmployee(EmployeeId, ActualDate, 4);
            report.Recons          = cashreconrep.GetCashReconcilationsPerEmployee(EmployeeId, ActualDate);
            report.IM = IMRep.GetInstantMoneysPerEmployee(EmployeeId, ActualDate);
            //...Initialize Totals
            report.CashTotal       = 0;
            report.CardsTotal      = 0;
            report.ChequeTotal     = 0;
            report.SassaTotal      = 0;
            report.PickupTotal     = 0;
            report.FloatTotal      = 0;
            report.ExtraFloatTotal = 0;
            report.SigmaTotal      = 0;

            //...Get Totals
            foreach (CashMovement item in report.CashMovements)
            {
                report.CashTotal += item.Amount;
            }

            foreach (ElectronicFund item in report.ElectronicFunds)
            {
                switch (item.ElectronicTypeID)
                {
                case 1: report.SassaTotal += item.Total; break;

                case 2: report.CardsTotal += item.Total; break;

                case 3: report.ChequeTotal += item.Total; break;
                }
            }

            foreach (PickUp item in report.Pickups)
            {
                report.PickupTotal += item.Amount;
            }

            foreach (CashReconciliation item in report.Recons)
            {
                switch (item.ReconciliationTypeID)
                {
                case 2: report.ExtraFloatTotal += item.Amount; break;
                }
            }
            foreach (InstantMoney item in report.IM)
            {
                switch (item.InstantMoneyTypeID)
                {
                case 1: report.FloatTotal += item.Amount; break;

                case 2: report.RecievedTotal += item.Amount; break;

                case 3: report.PaidTotal += item.Amount; break;
                }
            }

            report.BigFloatTotal = report.FloatTotal + report.ExtraFloatTotal;
            report.ExpectedTotal = report.BigFloatTotal + report.RecievedTotal - report.PaidTotal;
            report.DeclaredTotal = report.CashTotal + report.CardsTotal + report.ChequeTotal + report.PickupTotal;
            report.Final         = report.DeclaredTotal - report.ExpectedTotal;

            return(report);
        }
        public CashierReport GetCashierReport(CashierReportQuery query)
        {
            #region Repositories
            CashierRepository cashierrep = new CashierRepository();
            CashMovementRepository cashmovementrep = new CashMovementRepository();
            ElectronicFundRepository elecrep = new ElectronicFundRepository();
            PickUpRepository pickuprep = new PickUpRepository();
            CashReconciliationRepository cashreconrep = new CashReconciliationRepository();
            InstantMoneyRepository imrep = new InstantMoneyRepository();
            FNBRepository fnbrep = new FNBRepository();
            KwikPayRepository kwikrep = new KwikPayRepository();
            #endregion

            //...Get All Details
            CashierReport report = new CashierReport();

            report.CashierId = query.Cashier;
            report.ReportDate = query.Date;

            report.Cashier = cashierrep.GetCashier(query.Cashier);
            report.CashMovements = cashmovementrep.GetCashMovementsPerEmployee(query.Cashier, query.Date);
            report.ElectronicFunds = elecrep.GetElectronicFundsPerEmployee(query.Cashier, query.Date);
            report.FNB = fnbrep.GetFNBsPerEmployee(query.Cashier, query.Date);
            report.InstantMoney = imrep.GetInstantMoneysPerEmployee(query.Cashier, query.Date);
            report.KwikPays = kwikrep.GetKwikPaysPerEmployee(query.Cashier, query.Date);
            report.Pickups = pickuprep.GetPickUpsPerEmployee(query.Cashier, query.Date);
            report.Recons = cashreconrep.GetCashReconcilationsPerEmployee(query.Cashier, query.Date);

            //...Initialize Totals
            report.CashTotal= 0;
            report.CardsTotal= 0;
            report.ChequeTotal= 0;
            report.SassaTotal= 0;
            report.PickupTotal= 0;
            report.FloatTotal= 0;
            report.ExtraFloatTotal= 0;
            report.SigmaTotal= 0;
            report.IMFloatTotal= 0;
            report.IMRecTotal= 0;
            report.IMPaidTotal= 0;
            report.FNBRefTotal= 0;
            report.FNBRetTotal= 0;
            report.ElecTotal= 0;
            report.AirTotal= 0;
            report.AccTotal= 0;

            //...Get Totals
            foreach(CashMovement item in report.CashMovements)
            {
                report.CashTotal += item.Amount;
            }

            foreach(ElectronicFund item in report.ElectronicFunds)
            {
                switch(item.ElectronicTypeID)
                {
                    case 1: report.SassaTotal += item.Total; break;
                    case 2: report.CardsTotal += item.Total; break;
                    case 3: report.ChequeTotal += item.Total; break;
                }
            }

            foreach(PickUp item in report.Pickups)
            {
                report.PickupTotal += item.Amount;
                //report.CardsTotal += item.Amount;
            }

            foreach(CashReconciliation item in report.Recons)
            {
                switch (item.ReconciliationTypeID)
                {
                    case 1: report.FloatTotal += item.Amount; break;
                    case 2: report.ExtraFloatTotal += item.Amount; break;
                    case 3: report.SigmaTotal += item.Amount; break;
                }
            }

            foreach(InstantMoney item in report.InstantMoney)
            {
                switch (item.InstantMoneyTypeID)
                {
                    case 1: report.IMFloatTotal += item.Amount; break;
                    case 2: report.IMRecTotal += item.Amount; break;
                    case 3: report.IMPaidTotal += item.Amount; break;
                }
            }

            foreach(FNB item in report.FNB)
            {
                switch (item.FNBTypeID)
                {
                    case 1: report.FNBRefTotal += item.Amount; break;
                    case 2: report.FNBRetTotal += item.Amount; break;
                }
            }

            foreach (KwikPay item in report.KwikPays)
            {
                switch (item.KwikPayTypeID)
                {
                    case 1: report.ElecTotal += item.Amount; break;
                    case 2: report.AirTotal += item.Amount; break;
                    case 3: report.AccTotal += item.Amount; break;
                }
            }

            return report;
        }
Esempio n. 4
0
        public CashierReport GetCashierReport(CashierReportQuery query)
        {
            #region Repositories
            CashierRepository            cashierrep      = new CashierRepository();
            CashMovementRepository       cashmovementrep = new CashMovementRepository();
            ElectronicFundRepository     elecrep         = new ElectronicFundRepository();
            PickUpRepository             pickuprep       = new PickUpRepository();
            CashReconciliationRepository cashreconrep    = new CashReconciliationRepository();
            InstantMoneyRepository       imrep           = new InstantMoneyRepository();
            FNBRepository     fnbrep  = new FNBRepository();
            KwikPayRepository kwikrep = new KwikPayRepository();
            #endregion

            //...Get All Details
            CashierReport report = new CashierReport();

            report.CashierId  = query.Cashier;
            report.ReportDate = query.Date;

            report.Cashier         = cashierrep.GetCashier(query.Cashier);
            report.CashMovements   = cashmovementrep.GetCashMovementsPerEmployee(query.Cashier, query.Date);
            report.ElectronicFunds = elecrep.GetElectronicFundsPerEmployee(query.Cashier, query.Date);
            report.FNB             = fnbrep.GetFNBsPerEmployee(query.Cashier, query.Date);
            report.InstantMoney    = imrep.GetInstantMoneysPerEmployee(query.Cashier, query.Date);
            report.KwikPays        = kwikrep.GetKwikPaysPerEmployee(query.Cashier, query.Date);
            report.Pickups         = pickuprep.GetPickUpsPerEmployee(query.Cashier, query.Date);
            report.Recons          = cashreconrep.GetCashReconcilationsPerEmployee(query.Cashier, query.Date);

            //...Initialize Totals
            report.CashTotal       = 0;
            report.CardsTotal      = 0;
            report.ChequeTotal     = 0;
            report.SassaTotal      = 0;
            report.PickupTotal     = 0;
            report.FloatTotal      = 0;
            report.ExtraFloatTotal = 0;
            report.SigmaTotal      = 0;
            report.IMFloatTotal    = 0;
            report.IMRecTotal      = 0;
            report.IMPaidTotal     = 0;
            report.FNBRefTotal     = 0;
            report.FNBRetTotal     = 0;
            report.ElecTotal       = 0;
            report.AirTotal        = 0;
            report.AccTotal        = 0;

            //...Get Totals
            foreach (CashMovement item in report.CashMovements)
            {
                report.CashTotal += item.Amount;
            }

            foreach (ElectronicFund item in report.ElectronicFunds)
            {
                switch (item.ElectronicTypeID)
                {
                case 1: report.SassaTotal += item.Total; break;

                case 2: report.CardsTotal += item.Total; break;

                case 3: report.ChequeTotal += item.Total; break;
                }
            }

            foreach (PickUp item in report.Pickups)
            {
                report.PickupTotal += item.Amount;
                //report.CardsTotal += item.Amount;
            }

            foreach (CashReconciliation item in report.Recons)
            {
                switch (item.ReconciliationTypeID)
                {
                case 1: report.FloatTotal += item.Amount; break;

                case 2: report.ExtraFloatTotal += item.Amount; break;

                case 3: report.SigmaTotal += item.Amount; break;
                }
            }

            foreach (InstantMoney item in report.InstantMoney)
            {
                switch (item.InstantMoneyTypeID)
                {
                case 1: report.IMFloatTotal += item.Amount; break;

                case 2: report.IMRecTotal += item.Amount; break;

                case 3: report.IMPaidTotal += item.Amount; break;
                }
            }

            foreach (FNB item in report.FNB)
            {
                switch (item.FNBTypeID)
                {
                case 1: report.FNBRefTotal += item.Amount; break;

                case 2: report.FNBRetTotal += item.Amount; break;
                }
            }

            foreach (KwikPay item in report.KwikPays)
            {
                switch (item.KwikPayTypeID)
                {
                case 1: report.ElecTotal += item.Amount; break;

                case 2: report.AirTotal += item.Amount; break;

                case 3: report.AccTotal += item.Amount; break;
                }
            }

            return(report);
        }