!!Get Employee AAL_TODATE

!Functionality:
The purpose of this function is to Capture any leave lines that have been processed within the date range defined.


!Parameters:

|EEM_ID     | ''Required''.  The [EEM_ID] from [P2K_HR_EMPLOYMENTS] belonging to the employee in which FTE is to be gathered
|AS_OF_DATE | ''Required'' The as-of date in which the FTE is to be totaled.  If not provided, the current date is used.


|EEM_ID        |''Required''.The [EEM_ID] from [P2K_HR_EMPLOYMENTS] belonging to the employee to be processed
|LEAVE_TYPE    |''Required''.The [LEAVE_TYPE_CODE] defined on [P2K_AT_LEAVE_POLICY_TYPES] in which leave lines are to be captured
|AC_CODE       |''Required''.The [AC_CODE] as defined on [P2K_AT_ATTENDANCE_COMPONENTS] (ie, A290,A300,etc.)
|START         |''Optional'' The earliest start date from the [P2K_AT_LEAVE_LINES]to be included. (Sysdate will be used if left blank)
|END           |''Optional'' The latest end date from the [P2K_AT_LEAVE_LINES] to be included. (Sysdate will be used if left blank)
|ACCRUALS      |''Optional'' If this preference is set to "Y" than only the leave lines as seen on the [IALA] 'previous evaluation" tab will be returned
|YEAR_TO_DATE  |''Optional'' If this is set to "Y" then the start and end dates will be based on the IALA accrual begin date and accrual end date



!Returns: 
Numeric

!Errors:  
* If any error occurs during data retrieval, 0 is returned

!Example: 

{{P2K_PU.TOTAL_FTE(~)}}

will get the TOTAL_FTE for the passed EEM_ID as of the system date.


{{P2K_PU.TOTAL_FTE(~,'01-Jan-2017')}}

will get the TOTAL_FTE for the passed EEM_ID as of '01-Jan-2017'.

!Notes

* If an AS_OF_DATE is not provided, then the system date will be used.
* The [DES_ID] defined on the [P2K_HR_ASSIGNMENT_DETAILS] will be used to determine if the assignment is active. 
* Any [STATUS_CODE] defined on the [P2K_CM_EMPLOYMENT_STATUSES] table with a [STATUS_TYPE] of 'Active' or 'Leave' will be considered 'ACTIVE' by the funciton.
----
![Notes|Edit:Internal.GET_EID]
[{InsertPage page='Internal.P2K_PU.DES_TYPE' default='Click to create a new notes page'}]