3.1 Calculations Under the Hood: Border Crossings, Multi-Country Transit, and OZZ Fallback Rate
Processing cross-border business travel across multiple European states represents one of the most complex statutory accounting tasks. If an employee drives through Austria to Italy in a single day, or flies via a Frankfurt layover to Spain, standard spreadsheet calculators quickly reach their limits.
This article transparently details (the Whitebox approach) how PerDiemo's deterministic calculation algorithm evaluates travel allowances under the Czech Labor Code No. 262/2006 Coll..
---
1. Decisive Country Rule in Multi-State Transit (Section 170 (3) Labor Code)
Official reference: Section 170 (3) Labor Code
The core statutory rule for determining foreign per diem allowances during multiple border crossings within a single calendar day is governed by Section 170 (3) of the Labor Code:
"If an international business trip spans multiple foreign countries within a single calendar day, the employee is entitled to the per diem rate of the country where they spent the greatest number of hours during that calendar day."

Foreign Per Diem Duration Bands (Section 170 (3) Labor Code)
Official reference: Section 170 (3) Labor Code
Under statutory rules:
1. More than 12 hours abroad: Full basic rate (3/3).
2. More than 6 to 12 hours abroad: Two-thirds rate (2/3).
3. 1 to 6 hours abroad (without domestic overlap): One-third rate (1/3).
4. Less than 1 hour abroad: No foreign per diem is granted, and time is added to the domestic leg.
---
1.1. Foreign Transit Under 1 Hour Per Country: Summing Transit Snippets
In practice, payroll accountants face a major challenge: statutory law requires a minimum of 1 hour abroad to qualify for a 1/3 foreign allowance. But what if an employee drives through Slovakia (40 minutes), Hungary (40 minutes), and Austria (40 minutes)?
The employee did not spend a full 60 minutes in any single country individually. Is the per diem entitlement forfeited?

Deterministic Algorithm in PerDiemo:
PerDiemo's calculation engine aggregates all sub-hour foreign transit snippets across visited countries ((40 min + 40 min + 40 min = 120 min = 2 hours) total abroad). The employee qualifies for a 1/3 foreign allowance! Because equal time was spent in all three countries (40 min each), the favorable rate selection rule applies.
---
1.2. Equal Time Split Across Foreign Countries: Favorable Rate Selection Rule
Consider a scenario where a sales representative spends exactly 5 hours in Germany and exactly 5 hours in Poland during a single calendar day.
Under Section 170 (3) of the Labor Code: if time spent across two or more foreign countries is identical, the employee is entitled to the per diem rate that is more favorable to them.

Deterministic Algorithm in PerDiemo:
The system automatically evaluates the daily base rate for Germany (e.g., 50 EUR) and Poland (e.g., 45 EUR), converts both amounts to CZK using official CNB exchange rates, and automatically assigns the country rate that guarantees higher financial compensation to the employee.
---
2. Border Crossing Precedence in Air and Land Transport (Section 166 Labor Code)
Official reference: Section 166 Labor Code
PerDiemo's calculation engine strictly enforces the principle: Explicit border crossing events take absolute precedence over general transport modes.
- Automotive transport: The exact timestamp of physical border crossing is decisive.
- Air transport: Under Section 166 (2) of the Labor Code, scheduled flight departure and arrival times mark border crossings. For cases where users enter only flight takeoff times from a calendar, PerDiemo features a smart Recommended 3-hour pre-flight check-in buffer, simulating a 3-hour domestic transit segment.
- Microstates detection (Monaco, San Marino, Vatican): Standard geocoding services often miss microstates. PerDiemo's unique algorithm reliably detects and calculates transit through Monaco (MCO), San Marino (SMR), and Vatican City (VAT).
---
2.1. Integrated Database of 60+ Major European Border Crossings
To ensure instantaneous route calculation without reliance on third-party map providers, PerDiemo's relational database contains pre-seeded coordinates for over 60 critical European motorway and transit border crossings (including checkpoints such as Hegyeshalom, Kúty, Rozvadov, Břeclav, Mikulov, Cieszyn, Horgoš, Dobrakovo, Nickelsdorf, Bregana, and more):
- Instant Response (< 1 ms): Magic Wand itinerary expansion operates directly against local database indexes, eliminating external geocoding latency and network delays.
- Failover Immunity: When a border checkpoint is entered in the itinerary by common name or regional variation, the engine instantly matches coordinates, country assignment, and distance.
- Server-Side Request Pacing: For non-standard or unindexed locations, the backend enforces a mandatory 1.1-second inter-request delay for external OpenStreetMap Nominatim queries, eliminating HTTP 429 rate-limit errors on shared cloud IPs.
---
3. Catch-All OZZ Fallback Rate (Other Countries — 45.00 EUR / 50.00 USD)
What happens if a trip destination country has no custom rate assigned in the Ministry of Finance decree?