Пример #1
0
        public ActionResult BalanceSheet()
        {
            var concernId = Convert.ToInt32(Session["ConcernId"]);
            var userId    = Convert.ToInt32(Session["UserId"]);
            var culture   = "en-US";

            if (concernId > 0 && userId > 0)
            {
                var balance = _report.BalanceSheets(concernId, culture);
                BalanceSheetViewModels viewModels = new BalanceSheetViewModels()
                {
                    BalanceSheets = balance
                };
                return(View(viewModels));
            }
            return(RedirectToAction("LogIn", "GlobalData", new { Area = "Global" }));
        }
Пример #2
0
        public ActionResult BalanceSheet()
        {
            var assetAccount     = _logic.GetAllAssetAccounts();
            var liabilityAccount = _logic.GetAllLiabilityAccounts();
            var capitalAccount   = _logic.GetAllCapitalAccounts();
            var totalAssets      = assetAccount.Sum(a => a.AccountBalance);
            var totalLiabilities = liabilityAccount.Sum(a => a.AccountBalance);
            var totalCapital     = capitalAccount.Sum(a => a.AccountBalance);
            var cLsum            = totalCapital + totalLiabilities;

            var viewModel = new BalanceSheetViewModels
            {
                AssetsGL     = assetAccount,
                CapitalGl    = capitalAccount,
                LiabiliyGl   = liabilityAccount,
                AssetSum     = Math.Round(totalAssets, 2),
                CapitalSum   = Math.Round(totalCapital, 2),
                LiabilitySum = Math.Round(totalLiabilities, 2),
                CLSum        = Math.Round(cLsum, 2)
            };

            return(View(viewModel));
        }