!!Payment Rules Information

!Functionality:
This function retrieves information as seen on IPPM, for an employee's payment rules.

!Parameters:

|EEM_ID        | The actual ID for the employment record of the employee you are getting data for
|WHAT          | Identifies which element of the IPPM display you want to access.  This must be one of the values noted below.
|SPLIT_SEQUENCE| ''Optional''. Identifies which split sequence you want to access.  This must be one of the values noted below.
|AS_OF         | ''Optional''. Provides a date frame to retrieve the data.  If it is not provided, the current system date will be used.

!WHAT Parameter Values
* Any field name from [P2K_PR_PAYMENT_RULE_DETAILS]

!SPLIT_SEQUENCE Parameter Values - OPTIONAL
|FIRST                 | __Default if not provided__. The first split sequence in ascending order (regardless of split sequence code). 
|LAST                  | The last split sequence in ascending order
|PAY REMAIN            | The one split sequence record with the [PAY_REMAINING] toggle on
|a number from 1 to 999| This reflects an ordinal number (1 is first, 2 is second, etc. rather than looking for an exact match for sequence number)

!Returns: 
Varchar2  (regardless of the type of data being requested)

!Errors:  
* If an invalid WHAT parameter is passed, then {{BAD WHAT}} is returned
* If bad data, or no data is found then {{ERROR}} is returned


!Example: 

{{P2K_PU.PPR(~,'BANK_TRANSIT_CODE','PAY REMAIN')}}

Will return the [BANK_TRANSIT_CODE] for the payment rules record that is marked with the [PAY_REMAINING] toggle on.

!Notes:
|PAY_REMAINING    | The value returned will either be 1 (if the toggle is on) or N if  the toggle is off.  The data in the database is "1" or NULL

----
![Notes|Edit:Internal.P2K_PU.PPR]
[{InsertPage page='Internal.P2K_PU.PPR' default='Click to create a new notes page'}]