format year to thai

This commit is contained in:
DESKTOP-2S5P7D1\Windows 10 2023-09-04 17:00:37 +07:00
parent 40861853dd
commit 3ed1eed02d

View file

@ -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<dynamic> Get2YearInsigniaPeriod(Guid id)
{
var period = await _dbContext.Set<InsigniaPeriod>()
.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<dynamic> GetKhr1Report(Guid id)
{
var period = await _dbContext.Set<InsigniaPeriod>()