EALiptisSetComponentFromAnotherWithMax
This document was generated using Claude.ai
Overview
Sets a target salary component value based on the total of other components, with a maximum limit from the component's original value. Calculates the sum of specified salary components and applies it to the target component, ensuring it doesn't exceed the original configured amount.
When This Action Runs
Manual execution during salary processing when you need to set a component value based on other components' totals. Typically used for calculating allowances, bonuses, or deductions that depend on other salary elements but have maximum limits.
How It Works
- Validates parameters - Ensures both required parameters are provided
- Parses component list - Converts CSV parameter into list of component codes to sum
- Calculates total - Sums additions minus deductions for all specified components
- Finds target component - Locates the salary line with the target component code
- Applies maximum limit - Sets value to the lesser of calculated total or original value
- Handles zero totals - Uses original value if calculated total is zero
- Updates calculations - Recalculates addition/deduction amounts and salary totals
Parameters
Parameter 1: Target Component Type (Required) - Code of the salary component to update
Parameter 2: Components To Normalize (Required) - Comma-separated list of component codes to sum (e.g., "basic,insurance")
Database Tables Affected
- SalaryDocumentLine - Updates base value for the target component
- SalaryDocument - Updates total calculations after component modification
Module: hr
Full Class Name: com.namasoft.modules.humanresource.utils.clientscripts.EALiptisSetComponentFromAnotherWithMax