-
-
Notifications
You must be signed in to change notification settings - Fork 11
Time Data
The Payroll Engine distinguishes between the following types of changeable data:
- Version controled data
- Data model with data fields
- Input control with validation
- Wage calculation
- Report templates
- Third party data
- Time data
- Global case values
- Company case values
- Employee case values
Version Controlled Data is the data that is managed in the regulations. Changes to this data result in a new version of the regulation.
Time data are case values, which are recorded with additional time data. The following description shows how the case time data is structured and how it is used for wage calculation.
Read Travel-Through-Time-Data for a basic understanding of time data.
With the help of the time data, all wage-relevant information of the employee is recorded as a case
at the time of occurrence. In addition to the case value (e.g. wage, days of absence, etc.), the time data also contains the validity period of the case. The immediate change of personnel changes ensures that the data is always up-to-date and complete. On this basis, payroll runs are possible at any time. The validity period determines from when the value is to be valid and whether the change is limited in time.
This offers new possibilities for the display and management of case data:
- The validity period of the value can be limited: Input of the end date
- A case mutation can be relevant for future billing runs: Start date in the future
- A case mutation can be retroactive: Start date in the past (automatic retroactive billing)
- A case mutation can be retroactively reversed (automatic retroactive accounting)
- The evaluation date of the case data can be selected: What was valid then, what does the case data look like at the end of the year?
A conventional mutation corresponds to a case with a current start date and an open end date.
The following illustration shows the effect for the user in data entry.
Type | Description | Period Start | Period End | # Period Values | Example |
---|---|---|---|---|---|
Timeless |
Value without time commitment | - | - | 1 | Pension obligation |
Moment |
Value which is assigned to a point in time | x | - | 1..n 3) | Bonus |
Period |
Value assigned to a period | x | (x) 1) 2) | n 4) | Working hours |
Calendar Period |
Value distributed to the calendar period | x | (x) 1) 2) | n 4) | Monthly wage |
1) A period without end date indicates an endless/open period.
2) A mandatory closed period is achieved by means of scripting (validation) or case actions (SetFieldEndRequired
, SetEndRequired
).
3) Values are aggregated in the period (PeriodAggregation
): Summary, first or last value.
4) Unlimited overlap support mit Splitting on a daily basis.
To cancel invalid data and input errors, the invalid time value is adjusted and stored as a new time value that takes effect a fraction of a second later than the error time value. There are predefined cancellation modes for adjusting the cancellation value: keep, initialize, invert, or restore the value that was valid before the error occurred.
In case scripting, individual cancellation behavior can be defined using CaseChangeFunction.Cancellation
and CaseChangeFunction.CancellationDate
.
The following example shows a scenario where the mutations of the monthly wage and risk bonus overlap.
The calculation of time values taking into account overlaps is possible with the operators addition (+
), subtraction (-
), multiplicationn (*
), division (/
) and modulus (%
).
The following wage type script calculates the above example.
1 var values = GetCaseValues("Salary", "RiskBonus");
2 decimal baseSalary = values["Salary"];
3 return baseSalary + (values["Salary"] * values["RiskBonus"]);
In line 1
the values to be calculated are requested, in this case Salary
and RiskBonus
. For more complex scenarios, the parameter site must be extended accordingly. Line 2
calculates the basic monthly salary, to which the risk bonus is added in line 3
. Important is the multiplication operator, which divides the values into sub-periods and multiplies the values per sub-period. The result of the wage type is the sum of the products of all partial periods.
The conversion in line
2
todecimal
is necessary to obtain the value in line3
as a numerical value.
🤝 Thank you for supporting this project with a donation.
⚡ This is a pre-relase version of the initial development, please read the restrictions.
- Payroll Engine