Exemplo n.º 1
0
        // GET: Director
        public ActionResult DirectorSummary(int AccountID = 0)
        {
            Models.DirectorSummaryViewModel vm = new DirectorSummaryViewModel();
            //invoices avaiting payment
            //if(AccountID == 0)
            //{
            //    vm.Estate = GetEstate();
            //    vm.BankAccountList = Models.BankAccountMethods.BankAccountListByEstate(vm.Estate.EstatedID);
            //    vm.ViewName = "DirectorSummary";
            //    vm.ControllerName = "Director";
            //} else
            //{
            vm.Estate = GetEstate();
            vm.BankAccountBalanceList      = Models.BankAccountMethods.BankAccountAndBalanceList(vm.Estate.EstatedID);
            vm.AwaitingPaymentList         = Models.ServiceChargeMethods.ListOfUnpaidInvoices(vm.Estate.EstatedID);
            vm.BudgetList                  = Models.ServiceChargeMethods.BudgetListByEstate(vm.Estate.EstatedID);
            vm.UnitBalancesVM              = new UnitBalancesViewModel();
            vm.UnitBalancesVM.BalancesList = ServiceChargeMethods.GetUnitBalances(vm.Estate.EstatedID);

            //set default budget - which will be the one the summary defaults to viewing
            if (vm.BudgetList.Count > 0)
            {
                vm.DefaulBudget = vm.BudgetList[0];
            }
            //}

            //invoices awaiting authorisation


            return(View("DirectorSummary", vm));
        }
Exemplo n.º 2
0
        public ActionResult UnitBalances()
        {
            UnitBalancesViewModel vm = new UnitBalancesViewModel();

            vm.Estate       = GetEstate();
            vm.BalancesList = ServiceChargeMethods.GetUnitBalances(vm.Estate.EstatedID);

            if (vm.BalancesList != null)
            {
                foreach (ServiceCharges s in vm.BalancesList)
                {
                    if (s.Balance > 0)
                    {
                        vm.TotalBalances += s.Balance;
                    }
                }
            }

            vm.TotalBalancesStr = Controls.CurrencyString(vm.TotalBalances);

            return(View("UnitBalances", vm));
        }