public ActionResult purchaseReportPost(string search, string dateStart, string dateEnd)
        {
            if (Session["name"] != "Admin")
            {
                if (PermissionForAccounts.permisionCheckForPurchases(PermissionForAccounts.permisionPurchase, search) == false)
                {
                    return(RedirectToAction("index", "Home"));
                }
            }



            int check = (int)Session["purchase_reports"];

            if (check == 0)
            {
                return(RedirectToAction("Index", "Home"));
            }
            ViewBag.search = search;
            List <TransactionAccount> accounts = service.findTransactionAccounts(search);
            var balance = service.findAccountBalance(search);

            ViewBag.openingBalance = balance;
            List <TransactionAccount> allaccounts = service.allTransactionaccounts();

            ViewBag.start  = Convert.ToDateTime(dateStart);
            ViewBag.end    = Convert.ToDateTime(dateEnd);
            ViewBag.MyList = allaccounts;
            return(View(accounts));
        }
        public ActionResult salesReportPostItemWise(int id, string dateStart, string dateEnd, string item)
        {
            TransactionAccount tr     = service.findTransactionAccount(id);
            string             search = tr.name;

            if (Session["name"] != "Admin")
            {
                if (PermissionForAccounts.permisionCheckForSales(PermissionForAccounts.permisionSales, search) == false)
                {
                    return(RedirectToAction("index", "Home"));
                }
            }

            int check = (int)Session["sale_reports"];

            if (check == 0)
            {
                return(RedirectToAction("Index", "Home"));
            }
            ViewBag.item   = item;
            ViewBag.search = search;
            List <TransactionAccount> accounts = service.findTransactionAccounts(search);
            var balance = service.findAccountBalance(search);

            ViewBag.openingBalance = balance;
            List <TransactionAccount> allaccounts = service.allTransactionaccounts();

            ViewBag.start  = Convert.ToDateTime(dateStart);
            ViewBag.end    = Convert.ToDateTime(dateEnd);
            ViewBag.MyList = allaccounts;
            return(View(accounts));
        }