# RAMA AG - Client Report Alignment Final Report

Completed 30 November 2026. Status: verified patch active on http://127.0.0.1:3400. Physical-device GPS acceptance is explicitly deferred by the owner until hosting. This report does not claim physical GPS or unrestricted production readiness.

## Installed release and scope

Verified the active RAMA project at C:/Users/PANDAZZ/Desktop/RAMA-AG/rama-workforce-laravel, database rama_workforce_laravel on MariaDB 127.0.0.1:3307, account rama_local@127.0.0.1, application port 3400. The existing runtime status identifies the base as 1.1.4 with previously installed Reports/login overlays. Its Git foundation is 7f1a499c6be70497a9639fd923fe990ba82d2175 (rama-v1.0.0-rc5-1-g7f1a499); that old Git description alone does not identify all installed overlays. The fresh protected source manifest and the exact six-file SHA-256 deployment receipt identify this patch. No unrelated application was accessed, modified or restarted.

## Delivered report structure

The default full report remains 14 pages:

- Page 1: original-style Basisblatt, A4 portrait (595.28 x 841.89 pt).
- Pages 2-13: the previously approved Compact monthly reports, A4 landscape.
- Page 14: original-style Jahresübersicht, A4 landscape (841.89 x 595.28 pt).

Separate client-basisblatt and client-annual Blade templates reproduce German field order, tables, yellow input fields, holiday calendar, full pensum and annual accounting hierarchy, coloured reference status bands, carryover and blank signature lines. Missing personal values remain empty; recorded zero is distinguished from absent opening/source values. The existing approved Rama Gipser AG logo/company remain dynamic. Source-backed historical hours are not reclassified as verified GAV formulas.

The original SMGV export option and all its original templates are preserved. Its 14 rendered pages remain pixel-identical to the active pre-patch version. Full, annual-only, monthly, ZIP and Excel variants were generated successfully using active data in read-only transactions; no production export/history fixtures were inserted.

## Reference field mapping and historical reconciliation

The supplied one-page PDFs were rendered and extracted before implementation. The detailed field-by-field table is in RAMA_AG_REPORT_FIELD_MAPPING.md. Machine evidence contains 492/492 successful supplied-reference checks, including monthly stored source values, all pensum source cells and all calendar dates. The previous complete historical fixture also passed 561/561 comparisons plus 18/18 headline checks, with zero attendance records created and the fixture transaction rolled back.

Historical scheduled 1384.00 h; productive 1250.00 h; holidays 48.00 h; vacation used 104.00 h; supplements 0.50 h; credited 1402.50 h; annual balance 18.50 h. Previous time balance 10.00 h and previous vacation 25.35 h remain intact. Vacation values 176.00, 117.35, total 142.70 and carryover 38.70 remain preserved. January-August employment is 100%, September-December 0%, annual average 66.67%; five working days/eight hours during employment and annual average 3.33 days/5.33 hours are reproduced.

Current data legitimately differs: one minute on 27 November plus thirteen on 28 November adds 14 productive minutes. The live report therefore shows 1250.23 productive, 1402.73 credited and 18.73 balance. These records were preserved. The active contract has no exit date, while the historical source ends on 31.08.2026; the Basisblatt leaves the current exit empty and explicitly notes the historical discrepancy. Effective pensum is still 0% after August. No contract, source value, raw event or total was overridden to manufacture a historical match.

## GPS integration and fixes

The execution path and test matrix are documented in RAMA_AG_GPS_REPORT_INTEGRATION_TEST_REPORT.md: WorkerAttendance -> AttendanceService -> immutable event/location/session records -> DurationEngine -> canonical TimeService/TimeEngine -> monthly/year projections -> PDF/Excel.

Completed live attendance is available automatically in open reporting periods, without manual synchronization or historical import. Closed monthly snapshots remain immutable; late raw events are not silently inserted into closed accounting totals. The existing authorized reopen/correction/reclose workflow remains required for changed closed-period reporting.

Two reproduced integration defects were corrected narrowly: AttendanceService now invalidates an already-resolved scoped TimeService after a new event; accounting labels all open attendance sessions incomplete rather than recorded. Running intervals remain unfinalized. No new calculation engine, approval bypass, GPS threshold, GAV formula, route, permission or schema change was introduced.

The standard test day produced exactly 510 minutes gross work span, 30-minute unpaid break, 480 productive, 480 scheduled and zero daily variance. Before/after productive reporting was 0 -> 480 minutes in monthly and annual projections. Worker history, administrator view and PDF/Excel outputs reconcile to the same canonical data. Positive/negative variance, incomplete days, invalid/missing/inaccurate/stale/outside GPS, duplicate submissions, historical overlap, employment boundaries, month/year/week reconciliation and closed periods were tested.

## Validation evidence

- Final regression: 98 tests, 518 assertions; zero failures, errors or skips.
- Source historical fixture: 561 comparisons and 18 headline checks passed.
- Supplied first/last reference checks: 492 passed.
- All 14 final pages and all 14 dynamic second-employee pages rendered; contact sheets and individual pages reviewed.
- Monthly pages 2-13: all twelve pixel-identical to the unchanged active release when compared on the same reporting date.
- Original layout: all fourteen pages pixel-identical.
- Initially, crossing midnight changed November 30 from future Z to missing ?, as expected in both releases. A same-day active baseline was regenerated for a fair visual comparison; the original baseline is retained.
- Final deployed full PDF is byte-identical to the visually verified staging artifact. SHA-256: 62936be92862c5bd351de22d3796b053cb5c93e214e188b3c281cbb4223d249d.
- The dynamic second employee has its own contract, contact/profile values and unverified draft notice; no Avni values are hardcoded in templates.
- Actual browser was at the protected login boundary after normal session expiry; a fresh owner PDF preview session was not claimed. Preview/download route authorization remains covered by the existing administrator/worker tests.

## Deployment and preservation

Only six verified application files were deployed: AttendanceService.php, TimeService.php, SmgvExportService.php, new ClientReportData.php and the two new client templates. RAMA-only maintenance lasted about six seconds. Laravel views were cleared/rebuilt, then RAMA reopened. No machine-wide PHP setting or application process changed; PID 88620 retains its process-wide memory_limit=768M and port 3400. No frontend rebuild or database migration was necessary.

Fresh protected backup: 593 source/private/asset files in an integrity/hash-verified ZIP, plus a consistent 50-table/32-trigger database snapshot containing 6,975 rows, round-trip verified. Sixty-two protected environment/private/database/routes/original-PDF/global-layout files were hash-verified unchanged during deployment.

The final read-only database comparison confirms every attendance table, contract, employment period, absence, import, historical value, export, monthly closing and other business table unchanged. All users/passwords/roles are preserved; normal session expiry adds an authentication audit entry, rotates a recaller token and prunes expired sessions. All schemas, constraints and 32 trigger bodies remain unchanged. No real employee attendance or unauthorized test account was created.

The development worktree retains its earlier, separately pending monthly PDF refinements. They were not deployed. Its export service presentation metadata was preserved while merging this patch; the exact active deployed service hash is recorded separately in evidence/deployment.json rather than claiming the whole development worktree matches production.

## Remaining limitations

Physical smartphone GPS acceptance is deferred by the owner until an authorized HTTPS hosting address exists. No tunnel, hosting or network exposure was created. The manual test procedure is included in the integration report.

Automatic GAV travel pay/deductions, supplementary pay eligibility, vacation entitlement/proration, previous-year compensation deadlines, RPBK obligations and Karenz settlement remain unverified. Static reference colours do not certify a legal deadline or duty. Karenz flag data does not justify inventing hours or wage settlement values. The current schema supplies a global default holiday calendar; it has no per-employee calendar assignment. The active/open contract versus historical exit requires owner data review, not a silent data rewrite.

## Deliverables and recovery

All requested deliverables are in client-report-alignment/output/pdf:

1. RAMA_AG_Arbeitszeitkontrolle_Avni_Hoti_2026_final.pdf - current active data.
2. RAMA_AG_BASISBLATT_COMPARISON.png.
3. RAMA_AG_JAHRESUEBERSICHT_COMPARISON.png.
4. RAMA_AG_REPORT_FIELD_MAPPING.md.
5. RAMA_AG_GPS_REPORT_INTEGRATION_TEST_REPORT.md.
6. RAMA_AG_CLIENT_REPORT_ALIGNMENT_FINAL_REPORT.md.

A separate historical-reference PDF and synthetic integration/dynamic-employee PDFs are supporting evidence, clearly named separately from the current final report. The deliverables ZIP contains the six requested outputs; a separate application patch ZIP and SHA256SUMS support recovery.

For rollback, place only RAMA in maintenance, restore the three pre-existing service files named in the deployment receipt from protected-backup/rama-application-before-core.zip, clear/rebuild views and reopen RAMA. The three new, unused helper/template files may remain harmlessly, or be removed only after verifying their exact paths against introduced_files and the RAMA root. Preserve the current environment, private storage and current database; this patch has no schema change and requires no database restore. Do not restore an old database over current business records.
