public async Task <ActionResult> Index()
        {
            var stocks = (await _stockService.GetStocks()).Items;
            var total  = await _stockService.GetTotal();

            var model = new StockListViewModel
            {
                StockLists = stocks,
                Total      = total
            };

            return(View(model));
        }
        public async Task <ActionResult> Index()
        {
            List <GetTotal> list   = new List <GetTotal>();
            var             stocks = await _stockService.GetTotal();

            var badStocks = await _badStockService.GetTotal();

            var salesman = await _salesmaService.GetTotalSalesman();

            var supplier = await _supplierService.GetTotalSupplier();

            var customer = await _customerAppService.GetTotalCustomer();

            var products = await _productAppService.GetTotalProduct();

            var invoices       = (await _invoiceAppService.GetRecentInvoice()).Items;
            var creditMemos    = (await _creditMemoAppService.GetRecentCM()).Items;
            var debitMemos     = (await _debitMemoAppService.GetRecentDM()).Items;
            var purchaseOrders = (await _purchaseOrderAppService.GetrecentPurchase()).Items;
            var vans           = (await _vanAppService.GetVan()).Items;

            foreach (var items in vans)
            {
                var total = await _vanStockAppService.GetTotal(items.Id);

                list.Add(total);
            }
            var model = new HomeViewModel
            {
                TotalStocks       = stocks,
                BadStocks         = badStocks,
                Salesman          = salesman,
                Suppliers         = supplier,
                Customers         = customer,
                Products          = products,
                InvoiceLists      = invoices,
                CreditMemos       = creditMemos,
                DebitMemos        = debitMemos,
                PurchaseOrders    = purchaseOrders,
                Vans              = vans,
                VanStocks         = list,
                LoginInformations = await _sessionAppService.GetCurrentLoginInformations()
            };

            return(View(model));
        }