Fix Defect 13/12/66 09:17

This commit is contained in:
Suphonchai Phoonsawat 2023-12-13 09:17:43 +07:00
parent 7fa4ba9750
commit 389a99fce6
6 changed files with 26 additions and 5 deletions

View file

@ -301,6 +301,8 @@ namespace BMA.EHR.Leave.Service.Controllers
approver = list.First().Name;
}
var leaveLast = await _leaveRequestRepository.GetLeaveLastByTypeForUserAsync(userId, req.Type);
var result = new GetUserLeaveProfileResultDto
{
DateSendLeave = DateTime.Now.Date,
@ -318,6 +320,7 @@ namespace BMA.EHR.Leave.Service.Controllers
DateAppoint = profile.DateAppoint == null ? null : profile.DateAppoint.Value.Date,
Salary = lastSalary == null ? 0 : (int)lastSalary.Amount.Value,
SalaryText = lastSalary == null ? "" : ((int)lastSalary.Amount.Value).ToThaiBahtText(false),
LeaveLast = leaveLast == null ? null : leaveLast
};
return Success(result);