fix #2503
All checks were successful
Build & Deploy Leave Service / build (push) Successful in 2m0s

This commit is contained in:
Suphonchai Phoonsawat 2026-05-20 16:24:24 +07:00
parent c2795d6891
commit 3f8ae1ede9

View file

@ -1706,7 +1706,11 @@ namespace BMA.EHR.Leave.Service.Controllers
var leaveData = await _leaveBeginningRepository.GetByYearAndTypeIdForUserAsync(thisYear, rawData.Type.Id, rawData.KeycloakUserId);
var restDayOld = govAge < 180 ? 0 : leaveData == null ? 0 : (leaveData.LeaveDays + leaveData.BeginningLeaveDays - 10);
var restDayOld = 0.0;
//restDayOld = govAge < 180 ? 0 : leaveData == null ? 0 : (leaveData.LeaveDays + leaveData.BeginningLeaveDays - 10);
restDayOld = govAge < 180 ? 0 : leaveData == null ? 0 : (leaveData.LeaveDays - 10);
if (restDayOld < 0) restDayOld = 0;
var restDayCurrent = govAge < 180 ? 0 : 10;