update LeaveReportController to pass date parameter to GetLastEffectRound method

This commit is contained in:
Suphonchai Phoonsawat 2026-01-09 19:10:16 +07:00
parent 99accd44e3
commit 95cd49ecbc
2 changed files with 60 additions and 12 deletions

View file

@ -2099,7 +2099,7 @@ namespace BMA.EHR.Leave.Service.Controllers
var fullName = $"{p.Prefix}{p.FirstName} {p.LastName}";
var effectiveDate = await _userDutyTimeRepository.GetLastEffectRound(p.Id);
var effectiveDate = await _userDutyTimeRepository.GetLastEffectRound(p.Id, dd.date);
var roundId = effectiveDate != null ? effectiveDate.DutyTimeId : Guid.Empty;
var userRound = await _dutyTimeRepository.GetByIdAsync(roundId);