public JsonResult SupplierPaymentReport(string fromDate, string toDate, int id) { var concernId = Convert.ToInt32(Session["ConcernId"]); var userId = Convert.ToInt32(Session["UserId"]); var payment = _report.SupplierDuPaymentReport(concernId, id, fromDate, toDate); ReportDuePayment data = new ReportDuePayment() { PaymentReport = payment }; return(Json(data, JsonRequestBehavior.AllowGet)); }
public ActionResult SupplierDues() { var concernId = Convert.ToInt32(Session["ConcernId"]); var userId = Convert.ToInt32(Session["UserId"]); if (concernId > 0 && userId > 0) { var payments = _report.ResponseSupplierDuesSummaries(concernId); ReportDuePayment duePayment = new ReportDuePayment() { ResponseDues = payments }; return(View(duePayment)); } return(RedirectToAction("Login", "GlobalData", new { Area = "Global" })); }
public ActionResult SupplierPaymentReport() { var concernId = Convert.ToInt32(Session["ConcernId"]); var userId = Convert.ToInt32(Session["UserId"]); if (concernId > 0 && userId > 0) { DateTime date = DateTime.Now; var firstDayOfMonth = new DateTime(date.Year, date.Month, 1); var first = firstDayOfMonth.ToString("yyyy-MM-dd"); var lastDayOfMonth = firstDayOfMonth.AddMonths(1).AddDays(-1); var last = lastDayOfMonth.ToString("yyyy-MM-dd"); var supplier = _context.Suppliers.Where(x => x.IsDelete == 0).ToList(); var payment = _report.SupplierDuPaymentReport(concernId, 0, first, last); ReportDuePayment data = new ReportDuePayment() { Supplier = supplier, PaymentReport = payment }; return(View(data)); } return(RedirectToAction("Login", "GlobalData", new { Area = "Global" })); }