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.

  1. Select Manage > Corporate Data.
  2. Select Per Diem JavaScript in the Data Type field.
  3. 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.
  4. Specify an external key, if required. See, Creating an external key.
  5. Click Add to save the data.