Exemplo n.º 1
0
        public ActionResult CreateGroupLoanDisbursement(FormCollection form)
        {
            BankMasterViewDto        objBank     = new BankMasterViewDto();
            List <BankMasterViewDto> lstFedBanks = _groupReceiptService.GetFederationBanks();
            SelectList lstFederationBanks        = new SelectList(lstFedBanks, "BankEntryID", "AccountNumber", objBank.BankEntryID);

            ViewBag.federationbanks = lstFederationBanks;

            GuarantorDetailsDto        objdto = new GuarantorDetailsDto();
            List <GuarantorDetailsDto> lstobj = new List <GuarantorDetailsDto>();
            int       count    = Convert.ToInt32(Request.Form["hdnMaxSecurityIndex"]);
            int       AmountId = Convert.ToInt32(Request.Form["AmountId"]);
            DataTable dt       = new DataTable();

            dt.Columns.Add("LoanGuarantorMemberID", typeof(Int32));
            dt.Columns.Add("LoanMasterID", typeof(Int32));
            dt.Columns.Add("IsActive", typeof(bool));
            dt.Columns.Add("CreatedBy", typeof(Int32));
            dt.Columns.Add("CreatedOn", typeof(DateTime));
            for (int i = 1; i <= count; i++)
            {
                var AccountCode = Convert.ToInt32(form["hdnAccountCode_" + i]);
                var AccountName = Convert.ToString(form["hdnAccountName_" + i]);
                dt.Rows.Add(AmountId, AccountCode, AccountName, UserInfo.UserID, DateTime.Now);
            }

            ResultDto resultdto = _groupLoanDisbursementService.GuarantorDetails(dt);

            return(Json(new { LoanMasterID = AmountId, Message = resultdto.Message, ObjectCode = resultdto.ObjectCode }));
        }
Exemplo n.º 2
0
        private void LoadDropDown()
        {
            var employeeSelectListDto = _employeeService.GetEmployeeCodeSelectList();
            var employeeSelectList    = new SelectList(employeeSelectListDto, "ID", "Text");

            ViewBag.EmployeeNumber = employeeSelectList;

            var lstAccountHeads = _accountHeadService.GetJournalLedgers();

            //SelectList SlaAHSelectList = new SelectList(lstAccountHeads, "AHID", "AHName");
            //ViewBag.SLAAcHeads = SlaAHSelectList;

            List <SelectListDto> lstselectDto = _accountHeadService.GetGeneralReceiptLedgersDropDown(true);

            lstselectDto = lstselectDto.ToList().FindAll(l => l.Text != "Cash In Hand" && l.Text != "Bank Accounts" && l.ID != 365683 && l.ID != 365687).ToList();
            SelectList lstahcode = new SelectList(lstselectDto, "ID", "Text");

            ViewBag.SLAAcHeads = lstahcode;


            List <SelectListDto> lstClusters = _clusterService.GetClusterSelectList();
            SelectList           slClusters  = new SelectList(lstClusters, "ID", "Text");

            ViewBag.clusters = slClusters;

            List <GroupLookupDto> lstGroupDto = _groupService.Lookup();
            SelectList            lstgroup    = new SelectList(lstGroupDto, "GroupID", "GroupCode");

            ViewBag.GroupNames = lstgroup;
            BankMasterViewDto        objBank     = new BankMasterViewDto();
            List <BankMasterViewDto> lstFedBanks = _groupReceiptService.GetFederationBanks();
            SelectList lstFederationBanks        = new SelectList(lstFedBanks, "BankEntryID", "AccountNumber", objBank.BankEntryID);

            ViewBag.federationbanks = lstFederationBanks;
        }
Exemplo n.º 3
0
        public ActionResult CreateGeneralPayments(FormCollection form)
        {
            List <SelectListDto> lstselectDto = _accountheadService.GetGeneralReceiptLedgersDropDown(true);
            SelectList           lstahcode    = new SelectList(lstselectDto, "ID", "Text");

            ViewBag.ahcodes = lstahcode;
            BankMasterViewDto        objBank     = new BankMasterViewDto();
            List <BankMasterViewDto> lstFedBanks = _groupReceiptService.GetFederationBanks();
            SelectList lstFederationBanks        = new SelectList(lstFedBanks, "BankEntryID", "AccountNumber", objBank.BankEntryID);

            ViewBag.federationbanks = lstFederationBanks;
            long AccountMasterID    = Convert.ToInt64(Request.Form["hdnObjectID"]);
            var  generalpaymentsDto = ReadFormData(form);
            var  resultDto          = new ResultDto();

            if (generalpaymentsDto.AccountMasterID == 0)
            {
                resultDto = _generalpaymentsService.Insert(generalpaymentsDto);
            }
            else
            {
                resultDto = _generalpaymentsService.Update(generalpaymentsDto);
            }

            ViewBag.Result = resultDto;
            return(View(generalpaymentsDto));
        }
Exemplo n.º 4
0
        private void LoadDropDowns()
        {
            ReceiptMasterDto objreceipt = new ReceiptMasterDto();

            List <SelectListDto> lstClusters = _ClusterService.GetClusterSelectList();
            SelectList           slClusters  = new SelectList(lstClusters, "ID", "Text");

            ViewBag.Clusters = slClusters;
            #region DropDowns
            List <SelectListDto> groupSelectList = _groupService.GetGroupByClusterID(objreceipt.ClusterID);
            SelectList           lstGroupNames   = new SelectList(groupSelectList, "ID", "Text");
            ViewBag.GroupNames = lstGroupNames;

            //List<SelectListDto> villageSelectList = _villageService.GetVillageByClusterID(objreceipt.ClusterID);
            //SelectList lstvillage = new SelectList(villageSelectList, "ID", "Text");
            //ViewBag.Village = lstvillage;

            //List<SelectListDto> groupSelectList = _groupService.GetGroupByVillageID(objreceipt.VillageID);
            //SelectList lstGroupNames = new SelectList(groupSelectList, "ID", "Text");
            //ViewBag.GroupNames = lstGroupNames;

            //List<BankMasterViewDto> lstAllBanks = _groupReceiptService.GetGroupBanks();
            //SelectList lstgroupBanks = new SelectList(lstAllBanks, "BankEntryID", "AccountNumber", objBank.BankEntryID);
            //ViewBag.GroupBanks = lstgroupBanks;
            #endregion DropDowns
            BankMasterViewDto        objBank     = new BankMasterViewDto();
            List <BankMasterViewDto> lstFedBanks = _groupReceiptService.GetFederationBanks();
            SelectList lstFederationBanks        = new SelectList(lstFedBanks, "BankEntryID", "AccountNumber", objBank.BankEntryID);
            ViewBag.federationbanks = lstFederationBanks;
        }
Exemplo n.º 5
0
        public ActionResult Disbursement(int id)
        {
            char type = 'G';

            GroupLoanDisbursementDto groupLoanDisbursementDto = GetLoanDisbursementDto(id, type);

            LoadLoanInterestDropDowns();

            List <SelectListDto> fundSourceSelectList = _fundSourceService.GetFundSourceSelectList();
            SelectList           SlstfoundSource      = new SelectList(fundSourceSelectList, "ID", "Text");

            ViewBag.foundSource = SlstfoundSource;

            List <SelectListDto> projectSelectList = _projectService.GetProjectSelectList();
            SelectList           slProjectList     = new SelectList(projectSelectList, "ID", "Text");

            ViewBag.projects = slProjectList;

            BankMasterViewDto        objBank     = new BankMasterViewDto();
            List <BankMasterViewDto> lstFedBanks = _groupReceiptService.GetFederationBanks();
            SelectList lstFederationBanks        = new SelectList(lstFedBanks, "BankEntryID", "AccountNumber", objBank.BankEntryID);

            ViewBag.federationbanks = lstFederationBanks;

            TypeQueryResult lstBankAh = _masterService.GetTypeQueryResult("GROUP_OR_BANK_AH", groupLoanDisbursementDto.GroupID.ToString());

            ViewBag.slBankAh = new SelectList(lstBankAh.OrderBy(a => a.Name), "Id", "Name");

            return(View(groupLoanDisbursementDto));
        }
        public ActionResult GenerateVoucher(int LoanMasterId)
        {
            BankMasterViewDto        objBank     = new BankMasterViewDto();
            List <BankMasterViewDto> lstFedBanks = _groupReceiptService.GetGroupBanks();
            SelectList lstFederationBanks        = new SelectList(lstFedBanks, "BankEntryID", "AccountNumber", objBank.BankEntryID);

            ViewBag.federationbanks = lstFederationBanks;
            GroupLoanDisbursementService objGLDS    = new GroupLoanDisbursementService();
            DisbursementVoucherDto       voucherDto = objGLDS.GetDisbursementVoucher(LoanMasterId);

            return(View("GenerateVoucher", voucherDto));
        }
        public ActionResult CreatePaymentsToFederation(FormCollection form)
        {
            bool isFederation = true;
            List <AccountHeadDto> lstslaccounts = _accountheadService.GetAll(isFederation).FindAll(f => f.AHLevel > 4 && f.IsSLAccount == false);
            SelectList            slaccountno   = new SelectList(lstslaccounts, "AHID", "AHCode");

            ViewBag.slaccounts = slaccountno;

            List <SelectListDto> lstClusters = _clusterService.GetClusterSelectList();
            SelectList           slClusters  = new SelectList(lstClusters, "ID", "Text");

            ViewBag.clusters = slClusters;

            List <GroupLookupDto> lstGroupDto = _groupService.Lookup();
            SelectList            lstgroup    = new SelectList(lstGroupDto, "GroupID", "GroupCode");

            ViewBag.GroupNames = lstgroup;

            List <SelectListDto> lstselectDto = _accountheadService.GetGeneralReceiptLedgersDropDown(true);
            SelectList           lstahcode    = new SelectList(lstselectDto, "ID", "Text");

            ViewBag.ahcodes = lstahcode;
            BankMasterViewDto        objBank     = new BankMasterViewDto();
            List <BankMasterViewDto> lstFedBanks = _groupReceiptService.GetFederationBanks();
            SelectList lstFederationBanks        = new SelectList(lstFedBanks, "BankEntryID", "AccountNumber", objBank.BankEntryID);

            ViewBag.federationbanks = lstFederationBanks;
            long AccountMasterID    = Convert.ToInt64(Request.Form["hdnObjectID"]);
            var  generalpaymentsDto = ReadFormData(form);
            var  resultDto          = new ResultDto();

            if (generalpaymentsDto.AccountMasterID == 0)
            {
                resultDto = _paymentsToFederationService.Insert(generalpaymentsDto);
            }
            else
            {
                resultDto = _paymentsToFederationService.Update(generalpaymentsDto);
            }
            List <uspAccountHeadGetAll_Result> lstuspAccountHeadGetAll_Result = _dbContext.uspAccountHeadGetAll().ToList();

            var listOfSearchedIds = new List <string> {
                "2020", "2114", "1231", "1232", "1241", "1242", "1243"
            };

            lstuspAccountHeadGetAll_Result = (lstuspAccountHeadGetAll_Result.Where(x => listOfSearchedIds.Contains(x.AHCode))).ToList();
            SelectList FederationAHeads = new SelectList(lstuspAccountHeadGetAll_Result, "AHID", "AHName");

            ViewBag.FederationAH = FederationAHeads;
            ViewBag.Result       = resultDto;
            return(View(generalpaymentsDto));
        }
        public ActionResult CreateGeneralPayments(FormCollection form)
        {
            List <SelectListDto> lstClusters = _clusterService.GetClusterSelectList();
            SelectList           slClusters  = new SelectList(lstClusters, "ID", "Text");

            ViewBag.clusters = slClusters;

            List <GroupLookupDto> lstGroupDto = _groupService.Lookup();
            SelectList            lstgroup    = new SelectList(lstGroupDto, "GroupID", "GroupCode");

            ViewBag.GroupNames = lstgroup;

            List <SelectListDto> lstselectDto = _accountheadService.GetGeneralReceiptLedgersDropDown(true);
            SelectList           lstahcode    = new SelectList(lstselectDto, "ID", "Text");

            ViewBag.ahcodes = lstahcode;
            BankMasterViewDto        objBank     = new BankMasterViewDto();
            List <BankMasterViewDto> lstFedBanks = _groupReceiptService.GetFederationBanks();

            for (int i = 0; i < lstFedBanks.Count; i++)
            {
                var lst = lstFedBanks[i].AccountNumber + ':' + lstFedBanks[i].BankCode;
                lstFedBanks[i].AccountNumber = lst;
            }
            SelectList lstFederationBanks = new SelectList(lstFedBanks, "BankEntryID", "AccountNumber", objBank.BankEntryID);

            ViewBag.federationbanks = lstFederationBanks;
            long AccountMasterID    = Convert.ToInt64(Request.Form["hdnObjectID"]);
            var  generalpaymentsDto = ReadFormData(form);
            var  resultDto          = new ResultDto();

            if (generalpaymentsDto.AccountMasterID == 0)
            {
                resultDto = _generalpaymentsService.Insert(generalpaymentsDto);
            }
            else
            {
                resultDto = _generalpaymentsService.Update(generalpaymentsDto);
            }

            ViewBag.Result = resultDto;
            return(View(generalpaymentsDto));
        }
Exemplo n.º 9
0
        public ActionResult CreateContraEntryCashWithdrawl(FormCollection form)
        {
            var contraEntryWithDrawlDto = ReadFormDataWithDrawl(form);
            var resultDto = new ResultDto();

            if (contraEntryWithDrawlDto.AccountMasterID == 0)
            {
                resultDto = _ContraEntryService.GroupInsertContraEntryWithDrawl(contraEntryWithDrawlDto);
            }
            else
            {
                resultDto = _ContraEntryService.GroupUpdateContraEntryWithDrawl(contraEntryWithDrawlDto);
            }

            if (resultDto.ObjectId > 0)
            {
                resultDto.ObjectCode = contraEntryWithDrawlDto.VoucherNumber;
            }
            ViewBag.Result = resultDto;

            int groupId = GroupInfo.GroupID;
            BankMasterViewDto        objBank     = new BankMasterViewDto();
            List <BankMasterViewDto> lstAllBanks = _ContraEntryService.GetAllGroupBanksByGroupId(groupId);
            SelectList lstgroupBanks             = new SelectList(lstAllBanks, "AHID", "AccountNumber", objBank.BankEntryID);

            ViewBag.GroupBanks = lstgroupBanks;

            AccountHeadDto objAccountHead  = _accountheadService.GetCashInHandAccount(false);
            int            ahId            = objAccountHead.AHID;
            AccountHeadDto closeingBalance = _accountheadService.GetAccountHeadViewBalanceSummary(ahId, false, groupId);

            objAccountHead.ClosingBalance = closeingBalance.ClosingBalance;
            ViewBag.CashInHandDetails     = objAccountHead;

            contraEntryWithDrawlDto = _ContraEntryService.GroupContraEntryWithDrawlGetByAccountMasterId(resultDto.ObjectId);

            var totalCrAmmount = contraEntryWithDrawlDto.contraEntryWithDrawlTransactions.Count() < 1 ? 0 : contraEntryWithDrawlDto.contraEntryWithDrawlTransactions[contraEntryWithDrawlDto.contraEntryWithDrawlTransactions.Count() - 1].CrAmount;

            ViewBag.TotalCrAmmount = totalCrAmmount;

            return(View(contraEntryWithDrawlDto));
        }
Exemplo n.º 10
0
        public ActionResult CreateContraEntryDeposited(string id)
        {
            long AccountMasterID = string.IsNullOrEmpty(id.DecryptString()) ? default(long) : Convert.ToInt32(id.DecryptString());
            ContraEntryDepositedDto contraEntryDepositedDto = new ContraEntryDepositedDto();

            if (AccountMasterID > 0)
            {
                contraEntryDepositedDto = _ContraEntryService.FederationContraEntryDepositedGetByAccountMasterId(AccountMasterID);
            }

            BankMasterViewDto objBank = new BankMasterViewDto();

            List <BankMasterViewDto> lstAllBanks = _ContraEntryService.GetAllOrganizationBanks();
            SelectList lstBanks = new SelectList(lstAllBanks, "AHID", "AccountNumber", objBank.BankEntryID);

            ViewBag.AllBanks = lstBanks;


            AccountHeadDto objAccountHead  = _accountheadService.GetCashInHandAccount(true);
            int            ahId            = objAccountHead.AHID;
            AccountHeadDto closeingBalance = _accountheadService.GetAccountHeadViewBalanceSummary(ahId, true);

            objAccountHead.ClosingBalance = closeingBalance.ClosingBalance;
            ViewBag.CashInHandDetails     = objAccountHead;

            int EmployeeID = UserInfo.UserID;

            contraEntryDepositedDto.UserID = UserInfo.UserID;
            EmployeeDto obj = _employeeService.GetByID(EmployeeID);

            contraEntryDepositedDto.EmployeeName = obj.EmployeeName;
            contraEntryDepositedDto.EmployeeCode = obj.EmployeeCode;

            if (contraEntryDepositedDto.contraEntryDepositedTransactions != null && contraEntryDepositedDto.contraEntryDepositedTransactions.Count > 0)
            {
                var totalCrAmmount = contraEntryDepositedDto.contraEntryDepositedTransactions[contraEntryDepositedDto.contraEntryDepositedTransactions.Count() - 1].CrAmount;
                ViewBag.TotalCrAmmount = totalCrAmmount;
            }

            return(View(contraEntryDepositedDto));
        }
Exemplo n.º 11
0
        public ActionResult CreateGeneralReceipt(FormCollection form)
        {
            bool isFederation = true;
            List <AccountHeadDto> lstslaccounts = _accountheadService.GetAll(isFederation).FindAll(f => f.AHLevel > 4 && f.IsSLAccount == false);
            SelectList            slaccountno   = new SelectList(lstslaccounts, "AHID", "AHCode");

            ViewBag.slaccounts = slaccountno;
            List <SelectListDto> lstselectDto = _accountheadService.GetGeneralReceiptLedgersDropDown(true);
            SelectList           lstahcode    = new SelectList(lstselectDto, "ID", "Text");

            ViewBag.ahcodes = lstahcode;
            BankMasterViewDto        objBank     = new BankMasterViewDto();
            List <BankMasterViewDto> lstFedBanks = _groupReceiptService.GetFederationBanks();
            SelectList lstFederationBanks        = new SelectList(lstFedBanks, "BankEntryID", "AccountNumber", objBank.BankEntryID);

            ViewBag.federationbanks = lstFederationBanks;
            List <SelectListDto> lstClusters = _clusterService.GetClusterSelectList();
            SelectList           slClusters  = new SelectList(lstClusters, "ID", "Text");

            ViewBag.clusters = slClusters;
            List <GroupLookupDto> lstGroupDto = _groupService.Lookup();
            SelectList            lstgroup    = new SelectList(lstGroupDto, "GroupID", "GroupCode");

            ViewBag.GroupNames = lstgroup;
            long AccountMasterID   = Convert.ToInt64(Request.Form["hdnObjectID"]);
            var  generalreceiptDto = ReadFormData(form);
            var  resultDto         = new ResultDto();

            if (generalreceiptDto.AccountMasterID == 0)
            {
                resultDto = _generalReceiptService.Insert(generalreceiptDto);
            }
            else
            {
                resultDto = _generalReceiptService.Update(generalreceiptDto);
            }

            ViewBag.Result = resultDto;
            return(View(generalreceiptDto));
        }
Exemplo n.º 12
0
        public ActionResult CreateContraEntryDeposited(FormCollection form)
        {
            var contraEntryDepositedDto = ReadFormDataDeposited(form);
            var resultDto = new ResultDto();

            if (contraEntryDepositedDto.AccountMasterID == 0)
            {
                resultDto = _ContraEntryService.FederationInsertContraEntryDeposit(contraEntryDepositedDto);
            }
            else
            {
                resultDto = _ContraEntryService.FederationUpdateContraEntryDeposited(contraEntryDepositedDto);
            }

            if (resultDto.ObjectId > 0)
            {
                resultDto.ObjectCode = contraEntryDepositedDto.VoucherNumber;
            }
            ViewBag.Result = resultDto;
            BankMasterViewDto        objBank     = new BankMasterViewDto();
            List <BankMasterViewDto> lstAllBanks = _ContraEntryService.GetAllOrganizationBanks();
            SelectList lstBanks = new SelectList(lstAllBanks, "AHID", "AccountNumber", objBank.BankEntryID);

            ViewBag.AllBanks = lstBanks;

            AccountHeadDto objAccountHead  = _accountheadService.GetCashInHandAccount(true);
            int            ahId            = objAccountHead.AHID;
            AccountHeadDto closeingBalance = _accountheadService.GetAccountHeadViewBalanceSummary(ahId, true);

            objAccountHead.ClosingBalance = closeingBalance.ClosingBalance;
            ViewBag.CashInHandDetails     = objAccountHead;
            contraEntryDepositedDto       = _ContraEntryService.FederationContraEntryDepositedGetByAccountMasterId(resultDto.ObjectId);

            var totalCrAmmount = contraEntryDepositedDto.contraEntryDepositedTransactions[contraEntryDepositedDto.contraEntryDepositedTransactions.Count() - 1].CrAmount;

            ViewBag.TotalCrAmmount = totalCrAmmount;

            return(View(contraEntryDepositedDto));
        }
Exemplo n.º 13
0
        public ActionResult CreateGeneralReceipt(FormCollection form)
        {
            bool isFederation = true;
            List <AccountHeadDto> lstslaccounts = _accountheadService.GetAll(isFederation).FindAll(f => f.AHLevel > 4 && f.IsSLAccount == false);
            SelectList            slaccountno   = new SelectList(lstslaccounts, "AHID", "AHCode");

            ViewBag.slaccounts = slaccountno;
            List <SelectListDto> lstselectDto = _accountheadService.GetGeneralReceiptLedgersDropDown(true);
            SelectList           lstahcode    = new SelectList(lstselectDto, "ID", "Text");

            ViewBag.ahcodes = lstahcode;
            BankMasterViewDto        objBank     = new BankMasterViewDto();
            List <BankMasterViewDto> lstFedBanks = _groupReceiptService.GetFederationBanks();
            SelectList lstFederationBanks        = new SelectList(lstFedBanks, "BankEntryID", "AccountNumber", objBank.BankEntryID);

            ViewBag.federationbanks = lstFederationBanks;
            long AccountMasterID   = Convert.ToInt64(Request.Form["hdnObjectID"]);
            var  generalreceiptDto = ReadFormData(form);
            var  resultDto         = new ResultDto();

            if (generalreceiptDto.AccountMasterID == 0)
            {
                resultDto = _generalReceiptService.Insert(generalreceiptDto);
            }
            else
            {
                resultDto = _generalReceiptService.Update(generalreceiptDto);
            }
            int         EmployeeID  = UserInfo.UserID;
            EmployeeDto ObjEmployee = _employeeService.GetByID(EmployeeID);

            generalreceiptDto.EmployeeCode = ObjEmployee.EmployeeCode;
            generalreceiptDto.EmployeeName = ObjEmployee.EmployeeName;
            ViewBag.Result     = resultDto;
            ViewBag.LockStatus = GroupInfo.LockStatus;
            return(View(generalreceiptDto));
        }
Exemplo n.º 14
0
        private void LoadDropDowns()
        {
            ReceiptMasterDto objreceipt = new ReceiptMasterDto();
            MemberDto        memberdto  = new MemberDto();
            int GroupId = GroupInfo.GroupID;
            List <MemberLookupDto> lstmemberlookupDto = _memberservice.LookUp(GroupId);

            //SelectList lstmemberCodes = new SelectList(lstmemberlookupDto, "MemberId", "MemberCode", memberdto.MemberID);
            SelectList lstmemberCodes = new SelectList(lstmemberlookupDto, "MemberId", "MemberName", memberdto.MemberID);

            ViewBag.MemberCodes = lstmemberCodes;

            int groupId = GroupInfo.GroupID;
            BankMasterViewDto        objBank     = new BankMasterViewDto();
            List <BankMasterViewDto> lstAllBanks = _ContraEntryService.GetAllGroupBanksByGroupId(groupId);
            SelectList lstgroupBanks             = new SelectList(lstAllBanks, "BankEntryID", "AccountNumber", objBank.BankEntryID);

            ViewBag.GroupBanks = lstgroupBanks;

            //BankMasterViewDto objBank = new BankMasterViewDto();
            //List<BankMasterViewDto> lstAllBanks = _groupReceiptService.GetGroupBanks();
            //SelectList lstgroupBanks = new SelectList(lstAllBanks, "AHID", "AccountNumber", objBank.BankEntryID);
            //ViewBag.GroupBanks = lstgroupBanks;
        }
        public ActionResult CreateGeneralPayments(string Id)
        {
            long AccountMasterId      = string.IsNullOrEmpty(Id.DecryptString()) ? default(int) : Convert.ToInt64(Id.DecryptString());
            GeneralPaymentsDto objDto = new GeneralPaymentsDto();

            if (AccountMasterId > 0)
            {
                objDto = _generalpaymentsService.GetByID(AccountMasterId);
                if (objDto.Addamount.Count > 0)
                {
                    List <AddAmountDto> lstAccounts = new List <AddAmountDto>();

                    var list = objDto.Addamount;
                    foreach (var i in list)
                    {
                        AddAmountDto   Addamountdto   = new AddAmountDto();
                        int            ahId           = i.AHID;
                        bool           isFederation   = true;
                        AccountHeadDto accountHeadDto = _accountheadService.GetAccountHeadViewBalanceSummary(ahId, isFederation);
                        if (accountHeadDto.ClosingBalance != 0)
                        {
                            Decimal ClosingBalance = accountHeadDto.ClosingBalance - i.DrAmount;
                            Addamountdto.Balance = ClosingBalance;
                        }
                        Addamountdto.AHID     = i.AHID;
                        Addamountdto.AHCode   = i.AHCode;
                        Addamountdto.AHName   = i.AHName;
                        Addamountdto.CrAmount = i.CrAmount;
                        Addamountdto.DrAmount = i.DrAmount;
                        lstAccounts.Add(Addamountdto);
                    }
                    objDto.Addamount = lstAccounts;
                }
            }
            List <SelectListDto> lstselectDto = _accountheadService.GetGeneralReceiptLedgersDropDown(true);
            SelectList           lstahcode    = new SelectList(lstselectDto, "ID", "Text");

            ViewBag.ahcodes = lstahcode;

            BankMasterViewDto        objBank     = new BankMasterViewDto();
            List <BankMasterViewDto> lstFedBanks = _groupReceiptService.GetFederationBanks();
            SelectList lstFederationBanks        = new SelectList(lstFedBanks, "BankEntryID", "AccountNumber", objBank.BankEntryID);

            ViewBag.federationbanks = lstFederationBanks;

            List <SelectListDto> lstClusters = _clusterService.GetClusterSelectList();
            SelectList           slClusters  = new SelectList(lstClusters, "ID", "Text");

            ViewBag.clusters = slClusters;

            List <GroupLookupDto> lstGroupDto = _groupService.Lookup();
            SelectList            lstgroup    = new SelectList(lstGroupDto, "GroupID", "GroupCode");

            ViewBag.GroupNames = lstgroup;
            int EmployeeID = UserInfo.UserID;


            EmployeeDto ObjEmployee = _employeeService.GetByID(EmployeeID);

            objDto.EmployeeCode = ObjEmployee.EmployeeCode;
            objDto.EmployeeName = ObjEmployee.EmployeeName;

            return(View(objDto));
        }