From 6f7b9bf3e6e760f7840010959f20b8015b309f92 Mon Sep 17 00:00:00 2001 From: Suphonchai Phoonsawat Date: Mon, 10 Mar 2025 09:37:34 +0700 Subject: [PATCH] fix start time --- .../Leaves/TimeAttendants/UserDutyTimeRepository.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/BMA.EHR.Application/Repositories/Leaves/TimeAttendants/UserDutyTimeRepository.cs b/BMA.EHR.Application/Repositories/Leaves/TimeAttendants/UserDutyTimeRepository.cs index 48bdd0da..3eefefe0 100644 --- a/BMA.EHR.Application/Repositories/Leaves/TimeAttendants/UserDutyTimeRepository.cs +++ b/BMA.EHR.Application/Repositories/Leaves/TimeAttendants/UserDutyTimeRepository.cs @@ -62,7 +62,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.TimeAttendants { var data = _dbContext.Set() .Where(u => !u.IsProcess) - .Where(u => u.EffectiveDate.Value.Date <= DateTime.Now.Date) + .Where(u => u.EffectiveDate.Value.Date <= DateTime.Now.AddHours(7).Date) .ToList(); foreach (var d in data) @@ -106,6 +106,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.TimeAttendants var data = await _dbContext.Set() .Where(x => x.ProfileId == profileId) .Where(x => x.IsProcess) + .Where(x => x.EffectiveDate.Value.Date <= DateTime.Now.Date) .OrderByDescending(x => x.EffectiveDate) .FirstOrDefaultAsync();