fix การนับจำนวน ต้องแยก officer + employee
Some checks failed
release-dev / release-dev (push) Failing after 12s

This commit is contained in:
Suphonchai Phoonsawat 2025-11-11 11:51:22 +07:00
parent f081034e36
commit 87c4f85bf6

View file

@ -1588,7 +1588,7 @@ namespace BMA.EHR.Application.Repositories.Reports
.AsQueryable()
.ToListAsync();
insigniaPeriods = insigniaPeriods
.Where(x => x.StartDate <= DateTime.Now.Date && x.InsigniaRequests.Count == 0).ToList();
.Where(x => x.StartDate <= DateTime.Now.Date && x.InsigniaRequests.Where(x => x.ProfileType!.ToLower().Trim() == type.Trim().ToLower()).Count() == 0).ToList();
foreach (var insigniaPeriod in insigniaPeriods)
{