# RAMA AG — SMGV PDF Specification (Phase 03)

Status: **COMPLETED — structure verified, accounting rules partially verified.**

Source: the client reference `smgv-zeitkontrolle-alle-2026.pdf`, delivered by the owner. A protected copy is kept outside every deployable tree at `D:\- CLAUD PROJECTS\RAMA AG\reference\` (SHA-256 `60b475752329f317556852eec6865be9bad45cdc82dbfef32aa9cff7dc678e15`, 1,961,288 bytes). The PDF contains real employee data, so it is **never committed to Git** and no real values appear in this document. All examples below are anonymised or synthetic.

Analysis method:
- page-object scan of the file;
- full-text layout extraction (`pdftotext -layout`, xpdf 4.06);
- page rendering in an isolated headless Edge PDF viewer;
- manual arithmetic reconciliation on two employees, using visible totals only.

Evidence labels used in this document:
- **[OBS]** directly observed in the PDF;
- **[MATH]** arithmetic relationship verified on the sample pages;
- **[INF]** inferred, not proven;
- **[GAV?]** requires the authoritative GAV text or the owner's confirmation;
- **[CLIENT]** client-specific policy.

## 1. Document structure [OBS]

- File: PDF 1.x, producer `pypdf`. This is a merge of per-employee exports of the SMGV "Arbeitszeitkontrolle" workbook.
- 140 pages = **10 employees × 14 pages**. The page-type sequence repeats strictly as `B M M M M M M M M M M M M J`:

| # | Page | Size | Orientation |
| --- | --- | --- | --- |
| 1 | Basisblatt | A4 595.3 × 841.9 pt | Portrait |
| 2–13 | Monthly sheet, January … December | A4 841.9 × 595.3 pt | Landscape |
| 14 | Jahresübersicht (annual summary) | A4 841.9 × 595.3 pt | Landscape |

- **The expected 14-page structure is confirmed.** For 10 employees the combined PDF has 140 pages.
- Every page carries the SMGV association logo ("maler gipser – Die Kreativen am Bau"). **Decision:** RAMA exports will NOT reproduce that third-party logo. A small neutral text mark "Vorlage: SMGV Arbeitszeitkontrolle" is used instead, so the export does not imply SMGV endorsement. [CLIENT] The owner must confirm whether the association logo may be used.
- Visual conventions:
  - yellow cells = input fields ("Nur die gelben Felder sind Eingabefelder");
  - grey cells = weekends and non-working days;
  - red day numbers = Sundays and public holidays;
  - blue day numbers = public holidays;
  - negative balances in red.

## 2. Page 1 — Basisblatt (portrait) [OBS]

| Block | Fields (German label) | Albanian UI label | Type | Source | Editable |
| --- | --- | --- | --- | --- | --- |
| Header | Arbeitszeitkontrolle SMGV – Basisblatt, year | Kontrolli i kohës së punës SMGV – Fleta bazë, viti | text, year | system | no |
| Firma | Firma | Kompania | text | company setting | admin |
| Mitarbeiter:in | Name | Emri | text | user | admin |
| | Adresse: Strasse Nr, PLZ Ort | Adresa: Rruga Nr, Kodi postar Vendi | text | employee profile | admin |
| | Kontakt: Telefon, E-Mail | Kontakti: Telefoni, Email | text | user | admin |
| | AHV-Nummer | Numri AHV | sensitive text (756.XXXX.XXXX.XX) | employee profile (encrypted) | admin |
| | Geburtsdatum | Data e lindjes | date | employee profile | admin |
| | Eintrittsdatum / Austrittsdatum | Data e fillimit / mbarimit | date | contract | admin |
| Vorjahr (Übertrag) | Stundensaldo [h], Ferien [h] | Saldo orësh / Pushime nga viti i kaluar | decimal hours | opening balance | admin |
| laufendes Jahr | Ferienguthaben: gross entitlement (grey, e.g. 176.00) and effective (green) | E drejta për pushime | decimal hours | calculated / override | calc + manual |
| | Ferien automatisch berechnen (ja/nein) | Llogarit pushimet automatikisht | boolean | contract year setting | admin |
| Feiertagskalender | 12 × 31 grid; holidays marked with "x" | Kalendari i festave | date set | holiday calendar | admin |
| Pensum (Beschäftigungsgrad) | Per month: %, MO, DI, MI, DO, FR (weekday %); Ø AT; Ø Std/Tag; effekt. BG; plus a yearly Ø row | Shkalla e punësimit | decimal % | employment history | admin |
| | "alle Monate gleich" (ja/nein), "alle Tage gleich" (ja/nein) | të gjithë muajt njësoj / të gjitha ditët njësoj | boolean | input helper | admin |
| Footer | Seite 1 | Faqja 1 | | | |

The workbook shows a validation hint "! Gültiges Datum eingeben !" when a date is invalid. [OBS]

## 3. Pages 2–13 — monthly sheet (landscape) [OBS]

Header:
- title "A r b e i t s z e i t k o n t r o l l e {Jahr}" (letter-spaced) and the company name;
- Mitarbeiter:in;
- Anstellung % (monthly effective employment %);
- "im {Monat}";
- Saldo für das Jahr {Jahr} with the running year balance in 4 decimals;
- month name and "Saldo Monat + / −".

Grid: one label column, then 31 day columns, then one total/week column.

| Row group | Rows (German, verbatim) | Unit | Editable in workbook | RAMA source |
| --- | --- | --- | --- | --- |
| Calendar | Kalenderwoche, Tag (01–31), weekday abbreviation (Mo Di Mi Do Fr Sa So) | — | no | calendar (ISO week) |
| Target | Sollstunden, Feiertage ("ft" marker) | h | no (derived from Pensum) | engine |
| Produktivstunden | 00.00–06.00h, 06.00–20.00h, 20.00–24.00h, Tagestotal inkl. bezahlte Reisezeit, Wochentotal | h | yes (yellow) | attendance evidence → engine |
| Gutschriften und Zuschläge | Gutschrift "ft"; Zeitzuschlag 1) 25 % for exceeding the maximum working time; 2) 100 % night work; 3) 100 % Sunday and holiday work | h | partly | engine + rules |
| Unproduktive Stunden | Ferien, Kompensation Vorjahr, Kompensation laufend, Absenzen/Kurzabsenzen, Krankheit, Unfall, Schwangerschaftsabsenzen, Mutterschafts-/Vaterschaftsurlaub, Militär-/Zivil-/Schutzdienst, Berufsschule, Kurse, Kurzarbeit und Schlechtwetter, betrieblich festgelegte Ausfälle, Ferien unbezahlt, Fehlstunden unbezahlt, Unproduktive Std. Total | h | yes | absence records |
| Steuerung & Korrekturen | Karenztag (Krankheit), Tag ausschliessen ("Korrektur-Tage mit einem x markieren") | flag | yes | correction ledger |
| manuelle Korrekturen | Ausbezahlte Stunden Vorjahressaldo; Ausbezahlte Stunden laufendes Jahr (Überstunden); Gutschrift / Abzug Ferien | h | yes | correction ledger |
| Bemerkungen | free text | — | yes | monthly remark |
| Footer | "Ich habe die Monatsabrechnung kontrolliert und auf ihre Richtigkeit geprüft"; Visum Mitarbeiter:in / Visum vorgesetzte Stelle / Datum (signature lines) | — | — | blank lines only, never pre-filled |

Week totals are printed in the column after each Sunday (or after the last day of the month). [OBS]

## 4. Page 14 — Jahresübersicht (landscape) [OBS]

Columns: Jan … Dez and Jahr. Rows, verbatim with their workbook codes:

- Anstellung %
- Sollstunden gemäss GAV
- Produktive Stunden: Tagarbeit 06.00–20.00 Uhr, Nachtarbeit 20.00–06.00 Uhr, Reisezeit (gesamt), Reisezeitabzug, Total
- Zeitzuschläge: aus Überschreitung Höchstarbeitszeit; aus Nacht-, Sonn-, Feiertagsarbeiten
- Unproduktive Stunden with codes:
  - Feiertage Art. 12.2 GAV `ft`
  - Ferien Art. 12.1 GAV `f`
  - Ferien Guthabenkorrektur
  - Absenzen, Kurzabsenzen Art. 11 `a`
  - Krankheit Art. 13 `k`, davon Karenz
  - Unfall Art. 14 `u`
  - Schwangerschaftsabsenzen Art. 15 `s`
  - Mutterschafts-/Vaterschaftsurlaub Art. 15 `e`
  - Militär-, Zivil- und Schutzdienst Art. 16 `m`
  - Kurzarbeit und Schlechtwetterausfälle `ka`
  - betrieblich festgelegte Ausfälle `ba`
  - Berufsschule `bs`
  - Kurse `ku`
- Saldo Vorjahr: Kompensation Vorjahr `kv`, Auszahlung Vorjahr, nach Kompensation und Auszahlung.
  - Band labels: "regulärer Kompensationszeitraum" (Jan–Apr, green); "Meldung an RPBK!" (May–Aug, amber); "Status Kompensation" (Sep–Dez, red), showing "Saldoübertrag {Vorjahr}: x Std. – kompensiert / ausbezahlt / Rest".
- Saldokontrolle laufendes Jahr: Kompensation laufend `kj`, Auszahlung Überstunden
- Unbezahlte Absenzen: Ferien unbezahlt `fu`, Fehlstunden (Kontrolle) `fe`
- Total inkl. Zeitzuschläge (Stunden produktiv & unproduktiv)
- Vergleich: Stunden zu Soll-Stunden (inkl. Vorjahresstunden); Stunden zu Soll-Stunden (kumuliert)
- Ferienkontrolle: Ferienguthaben Vorjahr, Ferienguthaben nach GAV, Ferienguthaben total, Ferien bezogen, Ferien (Korrekturen)
- Karenzkontrolle (some sheets): Karenzstunden total, mit Stunden verrechnet, mit Lohn verrechnet, Karenzstunden korrekt abgerechnet
- Übertrag für das Jahr {Jahr+1}: Stundensaldo, Ferien Übertrag
- Footer: "Ich habe die Jahresabrechnung kontrolliert …", followed by the Visum lines.

## 5. Verified arithmetic relationships [MATH]

Checked on two employees (anonymised as E1 and E2), every month with values:

1. **Sollstunden (month) = Σ working days × Ø Std/Tag × daily Pensum.** E1 in January: 22 weekdays × 8.00 = 176.00. Public holidays still carry Sollstunden; they are credited back through "Gutschrift ft". [MATH]
2. **Total inkl. Zeitzuschläge = Produktive Total + Zeitzuschläge + Σ unproduktive (ft, f, a, k, …).**
   - E1, July: 117.00 + 0.50 + 80.00 = 197.50.
   - E2, April: 164.00 + 1.00 + 16.00 ft + 16.00 k = 197.00. [MATH]
3. **Vergleich (month) = Total inkl. Zeitzuschläge − Sollstunden.** E1: +0.50, +7.00, +10.50, −16.00, −3.50, +7.50, +13.50, −1.00. E2: +21.00, +5.50, 0, 0, 0. [MATH]
4. **Kumuliert = running sum of the monthly Vergleich.** Year value = Σ months. [MATH]
5. **Sollstunden Jahr = Σ Sollstunden of the months.** [MATH]
6. **Anstellung % Jahr = arithmetic mean of the 12 monthly %, with months outside the employment counted as 0.** E1: 8 months at 100 % → 66.67 %. E2: 5 months → 41.67 %. [MATH]
7. **Ferienguthaben total = Ferienguthaben Vorjahr + Ferienguthaben nach GAV.** [MATH]
8. **Ferien Übertrag = Ferienguthaben total − Ferien bezogen (± Korrekturen); it can be negative.** E2: 73.35 − 128.00 = −54.65. [MATH]
9. **Wochentotal = Σ Tagestotal of the calendar week**, printed after Sunday or at the month end. [MATH]
10. **Saldo Monat (header) = Vergleich of that month.** [MATH]

## 6. Inferred, unverified relationships

| Topic | Observation | Status |
| --- | --- | --- |
| Ferienguthaben nach GAV | Gross 176.00 h/year (= 22 days × 8 h). Effective = 176 × Ø annual Anstellung %, rounded **up** to 0.05 h (E1 117.33 → 117.35; E2 73.33 → 73.35) | [INF] + [GAV?] — entitlement per age/GAV article not shown |
| Ø Std/Tag 8.00 at 100 % | 40 h/week | [GAV?] annual/weekly GAV hours not shown in the PDF |
| Zeitzuschlag 1) 25 % | Applies to "Überschreitung Höchstarbeitszeit"; E1 July +0.50, E2 April +1.00 | [GAV?] threshold (daily/weekly/annual maximum) not derivable |
| Zeitzuschlag 2)/3) 100 % | Night work 20–06 and Sunday/holiday work | [GAV?] eligibility and night window not proven |
| Reisezeit / Reisezeitabzug | Rows exist; empty in the sample | [GAV?] paid-travel and deduction policy unknown |
| Saldo Vorjahr compensation bands | Jan–Apr regular compensation, May–Aug report to RPBK, later status | [GAV?] [CLIENT] deadlines and the RPBK reporting duty |
| "(inkl. Vorjahresstunden)" | The sample Vergleich values do **not** include the Vorjahr saldo, but the label says they do | [INF] conflicting: owner to confirm |
| Übertrag Stundensaldo | Equals the last kumuliert value; the unused Vorjahr saldo appears separately as "Rest" | [INF] owner to confirm whether the next-year opening = Übertrag + Rest |
| Karenztag | Row exists; davon Karenz | [GAV?] waiting-day rules |
| Rounding | Values are shown to 2 decimals; the header year saldo to 4 decimals | [INF] RAMA stores integer minutes and displays 2 decimals |

## 7. Data dictionary (RAMA mapping)

All authoritative quantities are stored as **integer minutes** (`*_minutes`) and percentages as **basis points** (10000 = 100.00 %). Hours are displayed as decimal hours with 2 decimals (8.50 = 8 h 30 min), as in the PDF.

| Key | DE label | SQ label | Type | Source | Editable / calculated | Confidence |
| --- | --- | --- | --- | --- | --- | --- |
| soll | Sollstunden | Orët e planifikuara | minutes | contract Pensum × working calendar | calculated | MATH (formula), GAV? (8 h/day) |
| prod_night_early | 00.00–06.00h | 00.00–06.00 | minutes | attendance work intervals | calculated | OBS |
| prod_day | 06.00–20.00h | 06.00–20.00 | minutes | attendance | calculated | OBS |
| prod_night_late | 20.00–24.00h | 20.00–24.00 | minutes | attendance | calculated | OBS |
| travel_paid | Reisezeit (gesamt) | Koha e udhëtimit | minutes | attendance travel | calculated | GAV? |
| travel_deduction | Reisezeitabzug | Zbritja e udhëtimit | minutes | rule | calculated (rule disabled) | GAV? |
| day_total | Tagestotal inkl. bezahlte Reisezeit | Totali ditor | minutes | sum | calculated | OBS |
| credit_ft | Gutschrift "ft" | Kreditim feste | minutes | holiday × daily Soll | calculated | MATH |
| supplement_1/2/3 | Zeitzuschlag 1)/2)/3) | Shtesa kohore | minutes | rules | calculated (rule disabled) | GAV? |
| f, kv, kj, a, k, u, s, e, m, bs, ku, ka, ba, fu, fe | absence categories as in section 4 | see `lang/sq/smgv.php` | minutes | absence records | manual (admin) | OBS |
| karenz, exclude_day | Karenztag, Tag ausschliessen | Ditë karence, Përjashto ditën | flag | correction ledger | manual | OBS / GAV? |
| paid_prev, paid_overtime, vacation_adjust | manuelle Korrekturen | Korrigjime manuale | minutes | correction ledger | manual | OBS |
| total_incl | Total inkl. Zeitzuschläge | Totali me shtesa | minutes | sum | calculated | MATH |
| vergleich | Stunden zu Soll-Stunden | Diferenca ndaj orëve të planifikuara | minutes | total − soll | calculated | MATH |
| kumuliert | (kumuliert) | kumulative | minutes | running sum | calculated | MATH |
| vac_prev / vac_gav / vac_total / vac_taken / vac_carry | Ferienkontrolle | Kontrolli i pushimeve | minutes | opening balance, rule, absences | calculated | MATH / INF |

## 8. Questions for the owner (blocking authoritative accounting)

1. Which GAV version and articles apply (SMGV GAV Maler/Gipser, year)? Please provide the official text or a confirmed rule sheet.
2. Daily target at 100 %: is 8.00 h always correct, or does the GAV annual hour table apply per month?
3. Maximum working time used for Zeitzuschlag 1) (25 %): the daily, weekly or annual limit, and its value.
4. Night window (20:00–06:00?) and the eligibility for the 100 % supplements 2) and 3).
5. Paid travel time and Reisezeitabzug policy (per day? per trip? first/last 30 min?).
6. Vacation entitlement by age or years of service, and the proration rule (rounding up to 0.05 h?).
7. Previous-year saldo: compensation deadline (end of April?), RPBK reporting duty, payout policy, and whether the next-year opening includes the uncompensated "Rest".
8. Karenztag rules for illness.
9. May the SMGV association logo be printed on RAMA exports?
10. The canton or public-holiday calendar to use.

Until these are answered, RAMA computes the verified relationships (sections 5.1–5.10) as **draft** values. Every rule marked [GAV?] stays configurable, versioned and **disabled for authoritative use**.
