From e4bcfee80ca926a19ca85281a978d22e7181fd17 Mon Sep 17 00:00:00 2001 From: Suphonchai Phoonsawat Date: Wed, 29 Apr 2026 11:45:46 +0700 Subject: [PATCH] fix issue #2448 --- .../Leaves/LeaveRequests/LeaveRequestRepository.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/BMA.EHR.Application/Repositories/Leaves/LeaveRequests/LeaveRequestRepository.cs b/BMA.EHR.Application/Repositories/Leaves/LeaveRequests/LeaveRequestRepository.cs index 751011b1..e58cb0f9 100644 --- a/BMA.EHR.Application/Repositories/Leaves/LeaveRequests/LeaveRequestRepository.cs +++ b/BMA.EHR.Application/Repositories/Leaves/LeaveRequests/LeaveRequestRepository.cs @@ -1902,8 +1902,8 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests .Include(x => x.Type) .Where(x => x.KeycloakUserId == keycloakUserId) .Where(x => x.Type.Id == leaveTypeId) - .Where(x => (x.DateSendLeave ?? x.CreatedAt).Date >= startDate - && (x.DateSendLeave ?? x.CreatedAt).Date < endDate) + .Where(x => ((x.DateSendLeave ?? x.CreatedAt).Date >= startDate + && (x.DateSendLeave ?? x.CreatedAt).Date < endDate)) //.Where(x => x.LeaveStartDate.Date >= startDate.Date && x.LeaveStartDate.Date <= endDate.Date) .Where(x => x.LeaveStatus == "DRAFT") .ToListAsync(); @@ -1928,7 +1928,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests .Include(x => x.Type) .Where(x => x.KeycloakUserId == keycloakUserId) .Where(x => x.Type.Id == leaveTypeId) - .Where(x => (x.DateSendLeave ?? x.CreatedAt).Date >= startDate && (x.DateSendLeave ??x.CreatedAt).Date < endDate) + .Where(x => ((x.DateSendLeave ?? x.CreatedAt).Date >= startDate && (x.DateSendLeave ??x.CreatedAt).Date < endDate)) //.Where(x => x.LeaveStartDate.Date >= startDate.Date && x.LeaveStartDate.Date <= endDate.Date) .Where(x => x.LeaveStatus == "NEW") .ToListAsync();