예제 #1
0
        public ActionResult VendorTransactionDetail(Guid UID)
        {
            var status = "error";

            try
            {
                if (!Authenticated)
                {
                    status = "Session Expired";
                }
                else
                {
                    //var objIpm = db.Vendors.Where(x => x.UID == UID).Select(s => s.Id).FirstOrDefault();

                    var StringUID = Convert.ToString(UID);

                    var Detail = db.VendorLedgerReport(StringUID);

                    //var Detail = (from vp in db.VendorPayments
                    //              join v in db.Vendors on
                    //              vp.VendorId equals v.Id
                    //              where vp.VendorId == objIpm
                    //              select new
                    //              {
                    //                  vp.PoNumber,
                    //                  Name = v.Name,
                    //                  vp.EntryType,
                    //                  vp.CreatedOn,
                    //                  Debit = vp.Debit,
                    //                  Credit = vp.Credit,
                    //                  Comment=vp.Comment
                    //              }).ToList();

                    status = JsonConvert.SerializeObject(Detail);
                }
            }
            catch (Exception ex)
            {
                ApplicationExceptionLogging(ex.Message, ex.StackTrace, "ReportsController", "PoDetail");
            }

            return(Content(status));
        }