示例#1
0
        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));
        }
示例#2
0
        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" }));
        }
示例#3
0
        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" }));
        }