Refactor leave limit logic to use IsProbation property instead of govAge check
All checks were successful
Build & Deploy Leave Service / build (push) Successful in 1m17s
All checks were successful
Build & Deploy Leave Service / build (push) Successful in 1m17s
This commit is contained in:
parent
c81220a049
commit
14fd9d5262
1 changed files with 3 additions and 3 deletions
|
|
@ -897,12 +897,12 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
|
||||
if (leaveType.Code.Trim().ToUpper() == "LV-005")
|
||||
{
|
||||
if (govAge < 180)
|
||||
if (profile.IsProbation! == true)
|
||||
leaveLimit = 0;
|
||||
else
|
||||
{
|
||||
leaveLimit = leaveData == null ?
|
||||
govAge < 180 ? 0 : 10
|
||||
10
|
||||
: leaveData.LeaveDays;
|
||||
}
|
||||
}
|
||||
|
|
@ -911,7 +911,7 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
|
||||
var restOldDay = leaveData == null ? 0 : leaveData.LeaveDays - 10;
|
||||
var restCurrentDay = 10.0;
|
||||
if (govAge < 180)
|
||||
if (profile.IsProbation! == true)
|
||||
{
|
||||
restOldDay = 0;
|
||||
restCurrentDay = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue