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();