fix #1841, #1842
Some checks failed
release-dev / release-dev (push) Failing after 13s

This commit is contained in:
Suphonchai Phoonsawat 2025-10-07 14:52:59 +07:00
parent 7ddc1debfc
commit 4494939c5f
2 changed files with 8 additions and 1 deletions

View file

@ -280,7 +280,12 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
.Where(x => x.KeycloakUserId == keycloakUserId);
if (year != 0)
rawData = rawData.Where(x => x.LeaveStartDate.Year == year);
{
var startFiscalDate = new DateTime(year - 1, 10, 1);
var endFiscalDate = new DateTime(year, 9, 30);
rawData = rawData.Where(x => x.LeaveStartDate.Date >= startFiscalDate && x.LeaveStartDate.Date <= endFiscalDate);
}
//rawData = rawData.Where(x => x.LeaveStartDate.Year == year);
if (type != Guid.Empty)
rawData = rawData.Where(x => x.Type.Id == type);