Adding a per diem JavaScript
You can use the Per Diem JavaScript (alpd_javascript) screen to add, edit, or deactivate a JavaScript running, during the per diem calculation.
- Select Manage > Corporate Data.
- Select Per Diem JavaScript in the Data Type field.
-
Specify this
information:
- Name
- The name of the per diem JavaScript. This is an internationalized (@@) string.
- Description
- The description of the per diem JavaScript. This is an internationalized (@@) string.
- Type
- If you select Per Diem, the JavaScript functions with a signature. For example,
-
function calculate(pdLineData, pdAmount, pdAmount24, pdBob, log)
- This returns the per diem amount.
- If you select Deduction, the JavaScript functions with a signature. For example,
-
function calculate(pdLineData, pdAmount, pdAmount24, pdDeduction, log)
- This returns the amount to deduct from the per diem.
- Status
- The status of the per diem JavaScript. The status can be Active or Inactive.
- Script
- The script
considers one of the function signatures.
Note: Only Professional Services Organization representatives or others with knowledge of the application data structures must be writing or modifying scripts.
- Specify an external key, if required. See, Creating an external key.
- Click Add to save the data.