Per Diems in WILSON β Feature Description
What Are Per Diems?
Per diems (German: Verpflegungsmehraufwendungen, VMA) are meal allowances that employers may grant to employees when they work away from their primary place of work β for example to offset higher meal costs during travel or on-site assignments.
Important: Per diems are not a statutory obligation for employers, but a voluntary benefit. Whether per diems are paid, and in what amount, is at the employer's discretion and is typically governed by collective bargaining agreements or individual employment contracts.
Tax exemption: Per diems are tax-free up to a legally defined threshold. This threshold is country-specific β German rates apply for domestic assignments; separate country-specific rates apply for international assignments. Any amount paid above the applicable threshold is subject to payroll tax.
In WILSON, allowance amounts are currently fixed at the German statutory tax-free limits:
Category | Amount |
|---|---|
Full day away from home | β¬28.00 |
Away from home > 8 hours | β¬14.00 |
Breakfast deduction | β β¬5.60 |
Lunch deduction | β β¬11.20 |
Dinner deduction | β β¬11.20 |
Current Limitation: International Assignments
WILSON currently calculates per diems exclusively based on German statutory tax-free rates β regardless of which country the assignment took place in. Automatic application of country-specific international rates (as required by German tax law for assignments outside Germany) is not yet supported.
If employees were deployed abroad, per diem amounts must be manually reviewed and corrected after export before being processed in payroll. This is especially relevant when the applicable foreign daily rates differ from the German rates (β¬28 / β¬14).
Prerequisites
For per diems to be calculated for a shift, the following conditions must be met:
- The WILSON.Payroll module is active.
- The VMA payroll category is configured in the employee's payroll settings for the shift date.
- The shift is in status "Submitted", "Times Accepted", or "Submitted to Payroll Provider".
- The shift contains reported activity times (i.e. the employee has reported start and end of activities via the app or manually).
The Foundation: "Away From Home" β Not the Shift Date
This is the most commonly misunderstood aspect of the system, and it is critical to understanding all downstream calculations.
WILSON does not calculate per diems directly based on the shift date. Instead, it constructs so-called "away-from-home trips" from the reported activity times. Only based on these trips does the system determine whether a daily allowance applies β and if so, for which calendar day.
What Is an "Away-From-Home Trip"?
A trip is a continuous period of time during which the employee is away from their home location without having returned home in between.
Home location is defined as either:
- The employee's personally assigned home location (marked as "HOME"), or
- The location of the employee's organizational unit.
Each reported activity contains information about the location at the start and location at the end of the activity. From these, the system determines whether the employee departed from or returned to their home location. Multiple consecutive activities without a return home in between are merged into a single, continuous trip.
A new trip begins when:
- The employee returned home between two activities, or
- There is a gap of more than one full calendar day between two activities.
How Does the Calculation Work?
Step 1 β Trigger
The calculation is triggered automatically when:
- A shift reaches the status "Submitted" (β preliminary/temporary transaction)
- A shift reaches the status "Times Accepted" (β final transaction)
- A shift is deleted (β existing transactions are removed)
Step 2 β Context Window
When triggered, WILSON fetches all relevant shifts for the employee within a window of Β±2 days around the shift date. This ensures that adjacent shifts that may be part of the same trip are also taken into account.
Step 3 β Evaluate Activity Times
For each shift in the context window, the reported activity times are evaluated:
- Reported start time and end time of each activity
- Start location and end location of each activity (home or away)
Unreported, skipped, or cancelled activities are ignored.
Step 4 β Construct Trips
Continuous away-from-home trips are built from the activity time frames (see above). The result is a list of trips, each containing:
- Start datetime (when the employee left home)
- End datetime (when they returned or the last activity ended)
- Number of shifts that are part of this trip
Step 5 β Calculate Per Diem Per Calendar Day
WILSON then evaluates a 3-day calculation window β the day before the shift date, the shift date itself, and the day after β to determine whether and which allowance applies per calendar day:
Condition (in priority order) | Per Diem Amount |
|---|---|
Employee was away for the full calendar day (midnight to midnight) | β¬28.00 |
Total time away on this day > 8 hours | β¬14.00 |
It is the arrival or departure day of a multi-day trip | β¬14.00 |
Total time away β€ 8 hours | β¬0.00 |
Important: Exactly 8 hours away does not trigger a per diem β the threshold is strictly greater than 8 hours.
Step 6 β Apply Meal Deductions
If provided meals are recorded for the shift (breakfast, lunch, dinner), the corresponding amounts are deducted from the calculated per diem amount. The result can never fall below β¬0.00.
Step 7 β Save Transaction (Upsert)
For each calendar day on which a per diem applies, a payroll transaction is stored. It is uniquely identified by the combination of:
- Calendar date of absence
- Employee
- VMA payroll category
This means: multiple shifts on the same day still produce only one per diem transaction β they are aggregated. And if a shift spans multiple calendar days, separate transactions are created for each affected day.
Why Can a Per Diem Appear for the Day After the Shift?
This phenomenon follows directly from how the system is built:
- The shift date (
startDate) only marks the planned beginning β e.g.2024-01-15. - The reported activity times can extend into the next calendar day β e.g. end of work at 03:00 on
2024-01-16. - WILSON always calculates for the day before, the shift date, and the day after.
- Since the employee was still away from home on
2024-01-16according to reported times, a per diem transaction is created for that calendar day β even though the shift date was the 15th.
The system calculates based on actual reported presence, not the date on the shift record.
Special Cases and Edge Cases
Multi-Day Absences (Travel Chains)
When an employee is away for multiple consecutive days with shifts each day, the individual shifts are merged into a single continuous trip. Arrival and departure days automatically receive the small allowance (β¬14), and full days in between receive the large allowance (β¬28).
Intermediate Return Home Breaks the Trip
If the employee briefly returns home between two shifts, the trip ends. If a new trip begins on a later day, the away time is calculated fresh β it is not added to the previous trip's duration.
Gaps in the Trip (> 1 Day Without Activity)
If there is a gap of more than one full calendar day between two shifts with no reported activity, the trip is considered interrupted. The subsequent shift starts a new trip.
Daylight Saving Time
Since all calculations are timezone-aware and use Europe/Berlin, calendar days are handled correctly during clock changes:
- When clocks move forward (spring): one calendar day has 23 hours β full day away = 23 hours
- When clocks move back (fall): one calendar day has 25 hours β full day away = 25 hours
Idempotency
The calculation can be re-triggered any number of times for the same shift (e.g. if the employee corrects their reported times). Existing transactions are updated, not duplicated.
Integration With Payroll Export
Per diem transactions appear in the employee's time summary in the "VMA" / "Per Diem" column and are automatically included in the next payroll export to DATEV or SAP HR. Preliminary transactions (shift in status "Submitted") are marked as such and are only finalized once the shift times are accepted.