udate plans

This commit is contained in:
Rob committed 2026-03-27 13:59:01 +01:00
1 parent 907c141d1f
commit 36d411fe77
2 files changed
+30 -17

No files matched your search

@@ -28,13 +28,13 @@ Each PDF is generated per participant, per month. The PDF contains a table with
| `person.name` | Full name of the participant | Excel column B |
| `monat_jahr` | Month and year in `MM/YYYY` format | Derived from sheet name + filename |
| `antragsnummer` | Application number | `config.json` (hardcoded) |
| `ort` | Location/city | `config.json` (hardcoded) |
| `erstellungsdatum` | Creation date (`DD.MM.YYYY`) | Current system date at generation time |
| `unterschrift.ort` | Location/city (signature line) | `config.json` (hardcoded) |
| `unterschrift.datum` | Creation date (`DD.MM.YYYY`) (signature line) | Current system date at generation time |
| `datum.0` – `datum.22` | Date per row in `DD.MM.YYYY` format (max 23 rows) | Derived from sheet name + year |
| `anwesend.0` – `anwesend.22` | Attendance status dropdown (see mapping below) | Excel day cell |
| `ist.0` – `ist.22` | Actual attendance in hours (`Ist-Stand Anwesenheit (in h)`) | Excel day cell (numeric) |
| `plan.0` – `plan.22` | Planned attendance in hours (`Geplante Anwesenheit lt. Konzeption (in h)`) | Derived from `ist` value |
| `pauschale.0` – `pauschale.22` | Flat rate `Pauschale 8,60 € (mind. 6 h anwesend)` | Set to `8,60` if present (`X`), else empty |
| `plan.0` – `plan.22` | Planned attendance in hours (`Geplante Anwesenheit lt. Konzeption (in h)`) | Always `"6"` (mind. 6h) when present |
| `pauschale_5.0` – `pauschale_5.22` | Flat rate Pauschale 8,60 € | Dropdown value `"1"` if present (`X`), else `"0"` |
## Header Field Derivation Rules
@@ -66,11 +66,13 @@ Each PDF is generated per participant, per month. The PDF contains a table with
### Application Number (`antragsnummer`)
- Hardcoded static value stored in `config.json`. Never derived from Excel.
### Location (`ort`)
### Location (`unterschrift.ort`)
- Hardcoded static value stored in `config.json`. Never derived from Excel.
- PDF field name is configurable via `pdf_field_ort` in `config.json`.
### Creation Date (`erstellungsdatum`)
### Creation Date (`unterschrift.datum`)
- Always the **current system date** at the time of PDF generation, formatted as `DD.MM.YYYY`.
- PDF field name is configurable via `pdf_field_erstellungsdatum` in `config.json`.
## Excel-to-PDF Field Mapping Rules
@@ -81,8 +83,9 @@ Each PDF is generated per participant, per month. The PDF contains a table with
**PDF actions**:
- `datum.N` → Set to the date in `DD.MM.YYYY` format.
- `anwesend.N` → Select `X = anwesend`.
- `ist.N` → Set to the exact numeric value from Excel (actual hours worked).
- `plan.N` → Select the nearest applicable planned value: `3` (for sessions up to 3h) or `6` (for sessions above 3h). The threshold logic must be consistently applied and configurable.
- `ist.N` → Set to the exact numeric value from Excel (actual hours worked), with comma as decimal separator.
- `plan.N` → Always set to `"6"` (= `mind. 6h` dropdown option).
- `pauschale_5.N` → Set to `"1"` (= 8,60 € dropdown option).
### Rule 2: Sick — Value `"K"`
@@ -114,13 +117,13 @@ Each PDF is generated per participant, per month. The PDF contains a table with
- `ist.N` → Leave empty (no hours entered).
- `plan.N` → Leave empty (no planned hours entered).
### Rule 5: Flat Rate — `pauschale.N`
### Rule 5: Flat Rate — `pauschale_5.N`
**Condition**: Applied for every row where attendance is present (`X`).
**PDF actions**:
- `pauschale.N` → Set to `8,60` if `anwesend.N` is `X = anwesend`.
- `pauschale.N` → Leave empty for all other statuses (K, KK, F, etc.).
- `pauschale_5.N` → Set to `"1"` (= 8,60 € in dropdown) if `anwesend.N` is `X = anwesend`.
- `pauschale_5.N` → Set to `"0"` for all other statuses (K, KK, F, etc.).
### Rule 6: No Entry / Empty Cell
@@ -142,6 +145,8 @@ The `anwesend` field is a dropdown. Valid selectable values:
| `F` | `F = unentschuldigtes Fehlen` (unexcused absence) |
| `P` | `P = Praktikum` (internship) |
| `U` | `U = Urlaub` (vacation) |
| `V` | `V = Vorstellungsgespräch` (job interview) |
| `A` | `A = aus Projekt ausgeschieden` (left project) |
## Planned Hours Logic (`plan.N`)
@@ -169,7 +174,7 @@ All of the following must be verified. Errors are **logged** (not silently ignor
| Column A present | Sequential number column exists |
| Column B present | Name column exists |
| Day columns present | At least one day column is detected |
| Attendance values valid | Each non-empty cell contains either a numeric value or a known status code (`K`, `KK`, `F`, `E`, `P`, `U`) |
| Attendance values valid | Each non-empty cell contains either a numeric value or a known status code (`K`, `KK`, `F`, `E`, `P`, `U`, `V`, `A`) |
| `config.json` present and complete | All required keys (`antragsnummer`, `ort`, month mapping, filename pattern) exist |
| PDF template accessible | The PDF template file exists and is readable |
@@ -188,6 +193,11 @@ Erstelldatum : 27.03.2026
Teilnehmer : 12
Fehler : 0
--- Stichproben aus dem Excel-Sheet (erste 10 Tage) ---
Person 1 2 ...
Mustermann, Max 6 K ...
...
Möchten Sie die PDF-Generierung starten? [j/N]
```