Exemplo n.º 1
0
        public async Task <IActionResult> printloandisc(string batchNo)
        {
            var fundcode      = HttpContext.Session.GetString("fundtypecode");
            var listloanrepay = loandiscService.GetAllbyFundcode(fundcode, batchNo).OrderByDescending(x => x.principal);

            return(await generatePdf.GetPdf("Views/LoanDisc/loanRepaymentReport.cshtml", listloanrepay));
        }
        public async Task <IActionResult> printloandisc()
        {
            var fundcode      = HttpContext.Session.GetString("fundtypecode");
            var listloanrepay = contrService.GetAllbyFundcode(fundcode);

            return(await generatePdf.GetPdf("Views/ContrDisc/LoanRepayReport.cshtml", listloanrepay));
        }
        public async Task <IActionResult> GetSSL()
        {
            var data = new TestData
            {
                Text   = "This is a test",
                Number = 123456
            };

            return(await _generatePdf.GetPdf("Views/TestBootstrapSSL.cshtml", data));
        }
Exemplo n.º 4
0
        public async Task <IActionResult> StudentGeneralReport(string status, bool check)
        {
            string studentid = HttpContext.Session.GetString("StudentNumber");
            var    stud      = studentService.GetStudentGenReport(status).ToList();

            if (check == true)
            {
                return(await generatePdf.GetPdf("Views/Student/StudentReport.cshtml", stud));
            }
            return(View(stud));
        }
Exemplo n.º 5
0
        public async Task <IActionResult> finishClaimRequestAsync(string svcno, string fundcode)
        {
            if (fundcode == "0")
            {
                var getclaim2 = claimRegisterService.GetclaimBysvcNo(svcno).ToList();

                return(await generatePdf.GetPdf("Views/ClaimType/ReportPage2.cshtml", getclaim2));
            }
            else
            {
                var getclaim = claimRegisterService.Getclaim(svcno, fundcode).ToList();

                return(await generatePdf.GetPdf("Views/ClaimType/ReportPage.cshtml", getclaim));
            }
        }
Exemplo n.º 6
0
        public async Task <IActionResult> GetFromEngine()
        {
            var data = new TestData
            {
                Text   = "This is a test",
                Number = 123456
            };

            if (!_generatePdf.ExistsView("notAView"))
            {
                var html = await System.IO.File.ReadAllTextAsync("Views/Test.cshtml");

                _generatePdf.AddView("notAView", html);
            }

            return(await _generatePdf.GetPdf("notAView", data));
        }
        public async Task <IActionResult> finishClaimRequestAsync(int personid, string fundcode)
        {
            var getperson = unitofWork.person.GetPersonBySVC_No(x => x.PersonID == personid);

            if (fundcode == "0")
            {
                var getclaim2 = claimRegisterService.GetclaimBysvcNo(getperson.SVC_NO).ToList();

                return(await generatePdf.GetPdf("Views/ClaimType/ReportPage2.cshtml", getclaim2));
            }
            else
            {
                var getclaim = claimRegisterService.Getclaim(getperson.SVC_NO, fundcode).ToList();

                return(await generatePdf.GetPdf("Views/ClaimType/ReportPage.cshtml", getclaim));
            }
        }
        public async Task <IActionResult> GetEmployeeInfo()
        {
            var empObj = new EmployeeInfo
            {
                EmpId       = "1001",
                EmpName     = "Mr. Robert",
                Departament = "IT",
                Designation = "Software Engineer"
            };

            return(await _generatePdf.GetPdf("Views/Employee/EmployeeInfo.cshtml", empObj));
        }
Exemplo n.º 9
0
        public async Task <IActionResult> Invoice(int orderId)
        {
            var orders = await _context.Orders
                         .Include(o => o.User)
                         .Include(o => o.ShippingAddress)
                         .Include(o => o.OrderItems)
                         .ThenInclude(oi => oi.Product)
                         .ToListAsync();

            var order = orders.FirstOrDefault(o => o.Id == orderId);

            return(await _generatePdf.GetPdf("Views/Order/Invoice.cshtml", order));
        }
Exemplo n.º 10
0
        public async Task <IActionResult> generate(LoanPositionViewModel model)
        {
            string indicator = "Specific Main ledger";
            string fundcode  = model.fundcode;

            string code = model.mainacct;

            var result = services.GenerateTrialBalanceReport(indicator, fundcode);

            result = GetAllLoanfiltered(result, code).ToList();
            var result2 = FilteredLoan(result.ToList());

            return(await generatePdf.GetPdf("Views/LoanPosition/LoanReport.cshtml", GetAllSubs(result2)));
        }
        public async Task <IActionResult> trialbalance(AuditViewModel model)
        {
            var    result       = new List <LedgersView2>();
            string fundTypeCode = HttpContext.Session.GetString("fundtypecode");
            var    p            = fundService.GetFundTypeCodeByCode(fundTypeCode);
            int    m            = p.processingMonth;
            int    y            = p.processingYear;

            string fperiod    = model.year;
            string fundperiod = y.ToString();

            if (fperiod == fundperiod)
            {
                //get list from surplus or deficit nd get total
                var     res    = service.GetAllSurplus();
                decimal total2 = GroupBybalsheetcode(res.ToList());


                result = service.GetBalSheet_TrialBalance().ToList();
            }

            return(await generatePdf.GetPdf("Views/BalsheetReport/BalsheetReport_trialbalance.cshtml", result));
        }
        public async Task <IActionResult> CalaculateLoanRepayment(int id = 0, int loantypeid = 0)
        {
            var result  = services.FilterAllLoanSchedule(id, loantypeid);
            var result2 = services.GetLoan(id, loantypeid);
            var result3 = services.getLoanCount(id, loantypeid);

            var gh = new LoanRepaymentViewModel();

            if (result3 == 0)
            {
                gh.solly = FilterRecord(result, result3);
                return(await generatePdf.GetPdf("Views/LoanRegister/loanRepaymentReport.cshtml", gh));
            }
            gh.solly         = FilterRecord(result, result3);
            gh.Name          = result2.Name;
            gh.Email         = result2.Email;
            gh.interest      = result2.interest;
            gh.Tenor         = result2.Tenor;
            gh.AmountGranted = result2.AmountGranted;
            gh.Rank          = result2.Rank;


            return(await generatePdf.GetPdf("Views/LoanRegister/loanRepaymentReport.cshtml", gh));
        }
        public async Task <IActionResult> printNpFContribution(string fundcode)
        {
            var fg = fundService.GetFundTypes();

            ViewBag.contributionList = new SelectList(fg, "Code", "Description", fundcode);

            if (string.IsNullOrEmpty(fundcode))
            {
                return(View());
            }

            var result = services.GetAll(fundcode);

            return(await generatePdf.GetPdf("Views/NpfContribution/Contribution.cshtml", result));
        }
        public async Task <IActionResult> printLoanPerRank(string loancode)
        {
            var fg = fundService.GetLoanTypes();

            ViewBag.contributionList = new SelectList(fg, "Code", "Description", loancode);

            if (string.IsNullOrEmpty(loancode))
            {
                return(View());
            }

            var result = services.GetAll(loancode);

            return(await generatePdf.GetPdf("Views/LoanPerRank/LoanPerRankReport.cshtml", result));
        }
Exemplo n.º 15
0
        public async Task <IActionResult> Index(AuditViewModel model)
        {
            string fundTypeCode = HttpContext.Session.GetString("fundtypecode");
            var    p            = fundService.GetFundTypeCodeByCode(fundTypeCode);
            int    m            = p.processingMonth;
            int    y            = p.processingYear;

            string speriod = y.ToString() + getMonth2(m);
            string wdoc    = "Open" + fundTypeCode + model.year.Substring(2, 2) + "00";

            var    result1     = services.GetSingleRecord(model.acctcode, wdoc);
            var    result2     = services.GetAllRecord(result1.period, model.acctcode).ToList();
            string description = services.GetNpfDesc(model.acctcode);

            var result3 = GetAllSubs(result2, result1, model.acctcode, y.ToString(), description);


            return(await generatePdf.GetPdf("Views/AuditTrail/AuditReport.cshtml", result3));
        }
        public async Task <IActionResult> printloanregister(LoanRegisterViewModel loan)
        {
            var fundcode = HttpContext.Session.GetInt32("fundtypeid");

            if ((loan.Status != "8") && (loan.Status != "9"))
            {
                var listloan1 = loanRegisterService.getListofLoanRegisterByStatus(Convert.ToInt32(fundcode), loan.Status).Result;
                return(await generatePdf.GetPdf("Views/LoanRegister/LoanRegisterReportPage.cshtml", listloan1));
            }
            else
            {
                var listloan = loanRegisterService.getListofLoanReport(Convert.ToInt32(fundcode), loan.Status, loan.startdate, loan.enddate).Result;
                return(await generatePdf.GetPdf("Views/LoanRegister/LoanRegisterReportPage.cshtml", listloan));
            }
            //return View();
        }
Exemplo n.º 17
0
        //public IActionResult Imprimir()
        public async Task <IActionResult> Imprimir(string codigo)
        {
            if (codigo == null)
            {
                return(RedirectToAction(nameof(Index), new { error = "4" }));
            }
            RehacerConexion();
            string empresa = HttpContext.Session.GetString("empresa").ToString();
            string tipo    = HttpContext.Session.GetString("TipoDocumento").ToString();
            var    model   = await Comun.REQUISC_PORTAL.FindAsync(codigo, tipo);

            if (model == null)
            {
                return(RedirectToAction(nameof(Index), new { error = "3" })); //return NotFound();
            }

            HttpContext.Session.SetString("EmpresaNombre", EmpresaNombre());
            List <SP_PORTAL_REQUERIMIENTO> modelo = Wenco.LISTADO_REQUERIMIENTO.FromSqlRaw("SP_PORTAL_REQUERIMIENTO '" + empresa + "','" + tipo + "', '" + codigo + "'").ToList();

            ViewBag.Codigo = codigo;
            //return View(modelo);
            //List<SP_PORTAL_REQUERIMIENTO> Modelo = new List<SP_PORTAL_REQUERIMIENTO>();
            return(await generatePdf.GetPdf("Compras/Imprimir", modelo));
        }
Exemplo n.º 18
0
 public async Task <IActionResult> Pdf()
 {
     return(await _generatePdf.GetPdf("Views/Home/Pdf.cshtml"));
 }
        public async Task <IActionResult> CreateClaim([FromBody] Npf_ClaimRegister value)
        {
            try
            {
                var getperson = unitofWork.person.GetPersonBySVC_No(x => x.PersonID == value.PersonID);
                var kp        = services.GetClaimRegisterByCode2(getperson.SVC_NO.Trim(), value.FundTypeID).Result;
                //  var fn = services.GetClaimRegisterByCode(value.FundTypeID.Trim());
                if (kp != null && kp.status == "Pending")
                {
                    kp.TotalContribution = value.TotalContribution;
                    kp.AmountDue         = value.AmountDue;
                    kp.interest          = value.amountPaid;
                    kp.statusdate        = DateTime.Now;
                    kp.loan        = value.amountReceived;
                    kp.Beneficiary = value.Beneficiary;
                    kp.status      = "Pending";
                    kp.appdate     = DateTime.Now;


                    await services.UpdateNpfClaimRegister(kp);

                    return(Ok(new { responseCode = 200, responseDescription = "update Successfully" }));
                }
                else if (kp == null)
                {
                    var fg = new Npf_ClaimRegister
                    {
                        PersonID          = getperson.PersonID,
                        svcno             = getperson.SVC_NO,
                        appdate           = DateTime.Now,
                        TotalContribution = value.TotalContribution,
                        FundTypeID        = value.FundTypeID,
                        statusdate        = DateTime.Now,
                        AmountDue         = value.AmountDue,
                        interest          = value.amountPaid,
                        loan        = value.amountReceived,
                        Beneficiary = value.Beneficiary,
                        status      = "Pending"
                    };
                    await services.AddNpfClaimRegister(fg);

                    var getclaim2 = services.GetclaimBysvcNo(fg.svcno);

                    return(await generatePdf.GetPdf("Views/ClaimType/ReportPage2.cshtml", getclaim2));

                    // return Ok(new { responseCode = 200, responseDescription = "Created Successfully" });
                }
                else
                {
                    return(Ok(new
                    {
                        responseCode = 200,
                        responseDescription = "Claim has been approved" +
                                              "do you want to do reversal?"
                    }));
                }
            }
            catch (Exception ex)
            {
                return(Ok(new { responseCode = 500, responseDescription = "Failed" }));
            }
        }
Exemplo n.º 20
0
        public async Task <IActionResult> InvestmentAllOT()
        {
            var money = services.GetALLInvestListOT();

            return(await generatePdf.GetPdf("Views/InvestRegisterMvc/moneyReport.cshtml", money));
        }
Exemplo n.º 21
0
        public async Task <IActionResult> Index(AuditViewModel model)
        {
            string fundTypeCode = HttpContext.Session.GetString("fundtypecode");
            var    p            = fundService.GetFundTypeCodeByCode(fundTypeCode);
            int    m            = p.processingMonth;
            int    y            = p.processingYear;

            string fperiod              = model.year.ToString();
            string fundperiod           = y.ToString();
            var    gh                   = new ReportViewModelQ();
            List <LedgersView2> result  = new List <LedgersView2>();
            List <LedgersView2> result2 = new List <LedgersView2>();
            List <LedgersView2> result3 = new List <LedgersView2>();

            if (fperiod == fundperiod)
            {
                result  = service.GetAllSurplus().ToList();
                result2 = GroupBybalsheetcode(result.ToList()).ToList();
                result3 = GroupBybalsheetcode9(result.ToList()).ToList();

                gh.p = result2;
                gh.q = result3;
            }
            //else
            //{
            //    string year = model.year;
            //    string wdoc2 = "Open" + fundTypeCode + year.Substring(2, 2) ;

            //    var result2 = service.GetAllSurplus2();
            //    var result3 = result2.Where(x => x.docNo.Substring(0,8) == wdoc2).ToList();

            //    decimal total;
            //    var res2 = GroupBybalsheetcode(result3.ToList(), out total);
            //    var res3 = new List<LedgersView2>();
            //    var res4 = new List<ReportViewModel4>();



            //    foreach (var j in res2)
            //    {
            //        foreach (var k in result3)
            //        {
            //            if (j.balSheetCode == k.balSheetCode)
            //            {
            //                var z = new LedgersView2
            //                {
            //                    description = k.MDesc,
            //                    Amount = k.Amount,
            //                    acctcode = k.balSheetCode
            //                };

            //                res3.Add(z);
            //            }

            //        }
            //        var fh = new ReportViewModel4
            //        {
            //            bl_desc = j.bl_desc,
            //            code = j.balSheetCode,
            //            tolly = res3,
            //            total = (j.Amount == null) ? 0M : (decimal)j.Amount
            //        };

            //        res4.Add(fh);


            //    }

            //    ViewBag.total = total;

            //    var gh = new ReportViewModel5
            //    {
            //        deficit = total,
            //        colly = res4
            //    };

            //    return await generatePdf.GetPdf("Views/SuplusReport/SurplusReport.cshtml", gh);
            //}
            return(await generatePdf.GetPdf("Views/SuplusReport/SurplusReport.cshtml", gh));
        }
        public async Task <IActionResult> printfund2()
        {
            var listfund = fundtypeService.GetFundTypes();

            return(await generatePdf.GetPdf("Views/FundType/FundReport.cshtml", listfund));
        }
        public async Task <IActionResult> printbalancesheet()
        {
            var listbalance = balanceSheetService.GetBalanceSheets();

            return(await generatePdf.GetPdf("Views/BalanceSheet/balancesheetReport.cshtml", listbalance));
        }
Exemplo n.º 24
0
        public async Task <IActionResult> printmainacct()
        {
            var listmain = mainAccountService.GetMainAccountDesc().Result;

            return(await generatePdf.GetPdf("Views/MainAccount/mainacctReport.cshtml", listmain));
        }
Exemplo n.º 25
0
        public async Task <IActionResult> printchart()
        {
            var listchart = chartofAccountService.getAllChartofAccountsCH().Result;

            return(await generatePdf.GetPdf("Views/Subsidiary/chartofacctReport.cshtml", listchart));
        }
Exemplo n.º 26
0
 public async Task <IActionResult> OnGet()
 {
     return(await generatePdf.GetPdf("ViewTemplates/PdfHtmlTemplate.cshtml", "hello world!"));
 }
        public async Task <IActionResult> getReport(string indicator, string year, string mainacct)
        {
            string fundTypeCode = HttpContext.Session.GetString("fundtypecode");
            var    p            = fundService.GetFundTypeCodeByCode(fundTypeCode);
            string ProcessYear  = p.processingYear.ToString();

            if (!string.IsNullOrWhiteSpace(indicator))
            {
                List <LedgersView> j       = new List <LedgersView>();
                string             valDb   = RefractCode2(ProcessYear);
                string             frmForm = RefractCode2(year);



                //string month = model.month;
                //string year = model.year;
                string headerVariable = string.Empty;

                if (valDb == frmForm)
                {
                    j = services.GenerateTrialBalanceReport(indicator, fundTypeCode).ToList();
                }
                else
                {
                    string wdoc2 = "Open" + fundTypeCode + frmForm;
                    //check npf_history
                    j = services.GenerateNpfHistory(wdoc2).OrderBy(x => x.code).ToList();
                    if (indicator == "Main Ledger")
                    {
                        j = services.GenMainLedgers(j).ToList();
                    }
                }


                var q = FilterViewModel(j.ToList());

                if (indicator == "Main Ledger")
                {
                    headerVariable = "Trial Balance Report";

                    return(await generatePdf.GetPdf("Views/TrialbalanceReport/ReportPage.cshtml", GroupSum(q.ToList(), year, headerVariable)));
                }
                else if (indicator == "Subsidiary Ledger")
                {
                    headerVariable = "Trial Balance Report";
                    return(await generatePdf.GetPdf("Views/TrialbalanceReport/ReportPage.cshtml", GetAllSubs(q.ToList(), year, headerVariable)));
                }
                else
                {
                    if (mainacct == null)
                    {
                        return(RedirectToAction("index", "TrialbalanceReport"));
                    }
                    else
                    {
                        //string maincode = mainacct;
                        headerVariable = services.getMainActDesc(mainacct).ToLowerInvariant();
                        var t = GetAllfiltered(q, mainacct);
                        return(await generatePdf.GetPdf("Views/TrialbalanceReport/ReportPage.cshtml", GetAllSubs(t, year, headerVariable)));
                    }
                }
            }

            return(RedirectToAction("Index"));
        }
Exemplo n.º 28
0
 public async Task <IActionResult> GenerateInvoice(Invoice invoice)
 {
     return(await _generatePdf.GetPdf("Views/Templates/InvoicePdf.cshtml", invoice));
 }
        public async Task <IActionResult> printloan()
        {
            var listloan = loantypeService.GetLoanTypes();

            return(await generatePdf.GetPdf("Views/LoanType/LoanReport.cshtml", listloan));
        }
        public async Task <IActionResult> NavipReport(string batch)
        {
            var personlist = navipservice.getallnavip(batch);

            return(await generatePdf.GetPdf("Views/Navips/NavipReportList.cshtml", personlist));
        }