public ActionResult PettyCashWithdrawal(BankWithdrawalViewModel model)
        {
            bool status = false;

            if (!ModelState.IsValid)
            {
                return(RedirectToAction("PettyCashWithdrawal", "Banks"));
            }
            if (model == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            else
            {
                BankWithdrawalChequeVoucher Obj = new BankWithdrawalChequeVoucher();
                Obj.Amount           = model.Amount;
                Obj.Notes            = model.Notes;
                Obj.BankAccountId    = model.BankAccountId;
                Obj.UserID           = User.Identity.GetUserId();
                Obj.BankAccountId    = model.BankAccountId;
                Obj.BankLedgerHeadId = model.BankAccountLedgerHeadId;
                Obj.BankId           = (int)model.BankNames;
                Obj.LedgerDate       = model.LedgerDate;
                status = new BankDA().InsertBankWithdrawalForPettyCash(Obj);
            }
            return(RedirectToAction("PettyCashWithdrawal", "Banks"));
        }
        public ActionResult PettyCashWithdrawal()
        {
            BankWithdrawalViewModel model = new BankWithdrawalViewModel();

            model.BankAccountLedgerHeads = db.BankAccountLedgerHeads.Where(a => a.Editable == true && a.Status == true && a.LedgerTypes == LedgerType.Debit).ToList();
            return(View(model));
        }