diff --git a/Controllers/ProfileReportController.cs b/Controllers/ProfileReportController.cs index 78156eb..da2760e 100644 --- a/Controllers/ProfileReportController.cs +++ b/Controllers/ProfileReportController.cs @@ -519,8 +519,10 @@ namespace BMA.EHR.Report.Service.Controllers OcFullPath = _profileService.GetOrganizationNameFullPath(p.OcId.Value, false, false), }).FirstOrDefault(); - var salary = (from s in _context.ProfileSalaries.Include(x => x.PositionLevel) - join pos in _context.PositionPaths on s.PositionId equals pos.Id + var salary = (from s in _context.ProfileSalaries + .Include(x => x.PositionLevel) + join pos in _context.PositionPaths.AsQueryable() + on s.PositionId equals pos.Id join pos_no in _context.PositionNumbers on s.PosNoId equals pos_no.Id // join pos_lv in _context.PositionLevels on s.PositionLevelId equals pos_lv.Id join pos_type in _context.PositionTypes on s.PositionTypeId equals pos_type.Id @@ -529,14 +531,14 @@ namespace BMA.EHR.Report.Service.Controllers select new { SalaryDate = s.Date == null ? "" : s.Date == new DateTime(1, 1, 1) ? "" : s.Date.Value.ToThaiShortDate(), - Position = s.SalaryClass, + Position = $"{pos.Name} ประเภท{pos_type.Name} ระดับ{s.PositionLevel.Name}", PosNo = pos_no.Name, Rank = s.PositionLevel == null ? null : s.PositionLevel.Name, - Salary = s.Amount == null ? "" : s.Amount.ToString().ToInteger().ToNumericText(), + Salary = s.Amount == null ? "" : s.Amount == 0 ? "-" : s.Amount.ToString().ToInteger().ToNumericText(), RefAll = s.SalaryRef, PositionType = pos_type.Name, PositionLevel = s.PositionLevel == null ? null : s.PositionLevel.Name, - PositionAmount = s.PositionSalaryAmount == null ? "" : s.PositionSalaryAmount.Value.ToString().ToInteger().ToNumericText(), + PositionAmount = s.PositionSalaryAmount == null ? "" : s.PositionSalaryAmount.Value == 0 ? "-" : s.PositionSalaryAmount.Value.ToString().ToInteger().ToNumericText(), FullName = profile2.FullName, OcFullPath = profile2.OcFullPath }).ToList(); diff --git a/Report/Profile/rptKK1_Page2.trdp b/Report/Profile/rptKK1_Page2.trdp index f082e7a..fb0495e 100644 Binary files a/Report/Profile/rptKK1_Page2.trdp and b/Report/Profile/rptKK1_Page2.trdp differ