Skip to content

Commit ab1fc9c

Browse files
author
Jani Giannoudis
committed
added various payrun ations
1 parent ec0af4c commit ab1fc9c

4 files changed

Lines changed: 740 additions & 5 deletions

File tree

ACTIONS.md

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,15 +153,28 @@ Collectors are referenced using the `^&` syntax. An optional scope selector cont
153153
| Syntax | Scope | Description |
154154
|:-------|:------|:------------|
155155
| `^&Name` | `Period` (default) | Collector value of the current payrun period |
156+
| `^&Name.PrevPeriod` | `PrevPeriod` | Collector value of the previous period |
157+
| `^&Name.NextPeriod` | `NextPeriod` | Collector value of the next period |
156158
| `^&Name.Cycle` | `Cycle` | Year-to-date collector value across all previous payruns in the current cycle |
159+
| `^&Name.PrevCycle` | `PrevCycle` | Total collector value across all payruns of the previous cycle |
160+
| `^&Name.NextCycle` | `NextCycle` | Total collector value across all payruns of the next cycle |
161+
162+
> `PrevPeriod`, `NextPeriod`, `PrevCycle` and `NextCycle` read from persisted payrun results.
163+
> The payrun job must have been executed with `storeEmptyResults: true` for the referenced periods.
157164
158165
```yaml
159166
# Current period gross income
160167
^&GrossIncome
161168

162-
# Year-to-date gross income (previous payruns in the cycle)
169+
# Previous period gross income
170+
^&GrossIncome.PrevPeriod
171+
172+
# Year-to-date gross income (previous payruns in the current cycle)
163173
^&GrossIncome.Cycle
164174

175+
# Total gross income of the previous cycle (e.g. for holiday pay based on prior year earnings)
176+
^&GrossIncome.PrevCycle
177+
165178
# Income tax: gross income times bracket rate from range lookup
166179
^&GrossIncome * ^#IncomeTax(^&GrossIncome)
167180
```
@@ -173,19 +186,33 @@ Wage types are referenced using the `^$` syntax. Wage types can be identified by
173186
| Syntax | Scope | Description |
174187
|:-------|:------|:------------|
175188
| `^$Name` or `^$100` | `Period` (default) | Wage type value of the current payrun period (by name or number) |
189+
| `^$Name.PrevPeriod` | `PrevPeriod` | Wage type value of the previous period |
190+
| `^$Name.NextPeriod` | `NextPeriod` | Wage type value of the next period |
176191
| `^$Name.Cycle` | `Cycle` | Year-to-date wage type value across all previous payruns in the current cycle |
192+
| `^$Name.PrevCycle` | `PrevCycle` | Total wage type value across all payruns of the previous cycle |
193+
| `^$Name.NextCycle` | `NextCycle` | Total wage type value across all payruns of the next cycle |
177194
| `^$Name.RetroSum` | `RetroSum` | Net sum of all pending retro corrections for the wage type within the current cycle |
178195

196+
> `PrevPeriod`, `NextPeriod`, `PrevCycle` and `NextCycle` read from persisted payrun results.
197+
> The payrun job must have been executed with `storeEmptyResults: true` for the referenced periods.
198+
179199
```yaml
180200
# Social security: 8% on current period base salary
181201
^$BaseSalary * 0.08
182202

183203
# Reference by wage type number
184204
^$100 * 0.08
185205

186-
# Year-to-date base salary (previous payruns in the cycle)
206+
# Year-to-date base salary (previous payruns in the current cycle)
187207
^$BaseSalary.Cycle
188208

209+
# Total base salary of the previous cycle (e.g. for annual bonus based on prior year earnings)
210+
^$BaseSalary.PrevCycle
211+
212+
# Holiday pay: 8% of prior year gross income, paid out in May
213+
? PeriodStart.Month == 5
214+
^&GrossIncome.PrevCycle * 0.08
215+
189216
# Retro delta wage type: net correction for BaseSalary since last closed period
190217
^$BaseSalary.RetroSum
191218
```

0 commit comments

Comments
 (0)