diff --git a/BMA.EHR.Application/Repositories/Reports/InsigniaReportRepository.cs b/BMA.EHR.Application/Repositories/Reports/InsigniaReportRepository.cs index 98ba6fc7..cefd7326 100644 --- a/BMA.EHR.Application/Repositories/Reports/InsigniaReportRepository.cs +++ b/BMA.EHR.Application/Repositories/Reports/InsigniaReportRepository.cs @@ -42,10 +42,20 @@ namespace BMA.EHR.Application.Repositories.Reports .FirstOrDefaultAsync(x => x.Id == id); if (period == null) throw new Exception(GlobalMessages.InsigniaPeriodNotFound); - string thaiYear = period.Year.ToThaiYear().ToString(); + string thaiYear = period.Year.ToThaiYear().ToString().ToThaiNumber(); return thaiYear; } + public async Task Get2YearInsigniaPeriod(Guid id) + { + var period = await _dbContext.Set() + .FirstOrDefaultAsync(x => x.Id == id); + if (period == null) + throw new Exception(GlobalMessages.InsigniaPeriodNotFound); + string thaiYear = period.Year.ToThaiYear().ToString().ToThaiNumber(); + return thaiYear.Substring(2); + } + public async Task GetKhr1Report(Guid id) { var period = await _dbContext.Set()