4.1 Cryptographically Signed PDF Report & Export Format
PerDiemo outputs official print-ready PDF travel expense reports. The export engine is designed to deliver 100% data fidelity matching the application dashboard while strictly complying with the legal requirements of the Czech Labor Code No. 262/2006 Coll..

---
1. Structure & Contents of the PDF Expense Report
Every exported PDF report provides a complete, audit-proof accounting document comprising:
A. Header & Trip Metadata
- Formal Report Title: Travel Allowances – Summary Report.
- Generation Timestamp: Exact date and time of export generated in the user's browser local time with explicit timezone offset (e.g. `18-08-2026 19:23:47 UTC+02:00`).
- Entity Identification: Employer/company name (MojeFirma s.r.o.), employee/executive name, and vehicle ownership class (e.g. company fleet vs. private vehicle).
- Trip Identifiers: Unique trip code (e.g. `C-2026-9BOB`), trip description/purpose (Business trip to Bratislava), and exact trip duration bounds.
- Decisive CNB Exchange Rate: Explicitly documents the official CNB exchange rate valid for the trip departure date under Section 184 Labor Code, ensuring full auditability for foreign currency conversions.
B. Financial Summary KPI Cards
The top section highlights high-level financial totals:- Total Trips: Total count of processed travel orders.
- Total Per Diem: Combined domestic and foreign per diem allowances after statutory meal reductions.
- Vehicle Allowances: Total mileage reimbursement and vehicle wear-and-tear compensation.
- Total Reimbursement: Highlighted final payout amount due to the employee (including tax-optimized pocket money).
C. Daily Itemized Per Diem & Route Table
The itemized table breaks down travel entitlements by calendar day:- Date & Transport Mode: Calendar date with transport icons (car, flight, train, bus).
- Visual Time Badges: Mirrors application UX — green timestamps indicate departure, purple badges display border crossings with timestamps (`07:55 CZE ➔ SVK`), and red timestamps indicate arrival.
- Continuous Route Chain: Full leg trajectory formatted as a continuous chain (e.g. `BRNO, CZ ➔ BRATISLAVA, SK`).
- Duration & Reductions: Hours elapsed per day, statutory per diem band (e.g. `12–18h (2/3)`, `>18h (1/1)`), and statutory meal reduction percentages for free meals provided under Section 163 and Section 170 of the Labor Code.
- Financial Breakdown: Itemized breakdown of Base Rate, Per Diem, Pocket Money (Section 180 Labor Code), Distance (km), and Vehicle Compensation.
---
2. Alignment with Application User Experience (UX)
PDF exports maintain complete visual and functional alignment with the web dashboard:
- 100% Data Parity: PDF reports consume exact stored database calculation records (`trip.allowances.details`) without performing ad-hoc recalculations. Accountants and employees see identical numbers on paper as on screen.
- Visual Continuity: Utilizing identical color-coded badges and route chaining logic ensures that approving managers immediately understand the document structure without deciphering complex tables.
---
3. Audit Fidelity & Cryptographic SHA-256 Signature
Every exported PDF contains a Cryptographic Audit Signature (SHA-256) at the bottom of the page:

Key Advantages of Cryptographic PDF Auditing:
- Guaranteed Tamper-Proofing: A unique 64-character hash guarantees that approved PDF data matches database records and has not been altered post-export.
- Tax Audit Defense: In the event of a tax authority audit, document authenticity can be verified instantly by comparing audit hashes.
- Dual Approval Signature Blocks: Dedicated signature boxes for employee (Prepared By / Employee Signature) and manager (Approved By / Supervisor Signature) facilitate physical and digital sign-offs.
- Unified Export Filename Timestamps: Exported filenames across all 4 formats (PDF, CSV, JSON, XML) share 100% identical browser local timestamps, guaranteeing filename parity.
---
4. Secure Trip Sharing & Capability Access Tokens
PerDiemo enables instant and secure sharing of specific business trips using capability URLs embedded with cryptographic bearer tokens (`?token=sec_...`):
- Link Structure: `https://www.perdiemo.eu/en/app/trip/C-2026-XXXX?token=sec_...`
- Trip Owner Experience: When opened by the authenticated creator of the trip, the system automatically redirects them to their Trips Dashboard (`/cz/app/dashboard#/trip/C-2026-XXXX`), expanding and highlighting the requested trip card.
- External Recipient Experience (Accountants, Managers): When opened by an auditor or colleague logged in under a different account, or an external recipient without an account, PerDiemo presents a Verified Summary Report Card allowing direct download of the official tax-compliant PDF report. The external trip is never injected into or mixed with the recipient's personal dashboard lists.
- Seamless Sign-In from Report Card: When an external recipient clicks the “Have an account? Sign in to PerDiemo” button, the application reliably preserves the destination trip and, upon successful authentication, immediately returns them to the trip report (or auto-expands it directly in their dashboard if they are the owner).
- Unauthorized Access Prevention: Attempting to view trip details without a valid capability token requires account authentication and ownership, ensuring 100% privacy and data isolation for all travel records.