udate plans
This commit is contained in:
1 parent
907c141d1f
commit
36d411fe77
2 files changed
+30
-17
No files matched your search
@@ -34,10 +34,11 @@ Excel-Datei → excel_reader → MonthlyAttendance → pdf_filler → PDF-Datei
|
|||||||
|
|
||||||
## Entwurfsentscheidungen
|
## Entwurfsentscheidungen
|
||||||
- `plan.N` = immer `"6"` (mind. 6h), unabhängig von tatsächlichen Stunden
|
- `plan.N` = immer `"6"` (mind. 6h), unabhängig von tatsächlichen Stunden
|
||||||
- Sheet-Auswahl: manuell via `--sheet <name>` (z.B. `--sheet Feb`)
|
- Sheet-Auswahl: manuell via `--month <name>` (z.B. `--month Feb`)
|
||||||
- Output-Benennung: `(n) Nachname, Vorname.pdf` (n = lfd. Nummer aus Spalte A)
|
- Output-Benennung: `(n) Nachname, Vorname.pdf` (n = lfd. Nummer aus Spalte A)
|
||||||
- `pauschale.N` = `"8,60"` wenn anwesend (X), sonst leer
|
- `pauschale_5.N` = Dropdown-Wert `"1"` (= 8,60 €) wenn anwesend (X), sonst `"0"`
|
||||||
- PDF-Template liegt in `./template/sab.pdf`
|
- PDF-Template liegt in `./template/sab.pdf`
|
||||||
|
- PDF-Felder für Ort und Datum: `unterschrift.ort` / `unterschrift.datum`
|
||||||
|
|
||||||
## Excel-Struktur
|
## Excel-Struktur
|
||||||
- Spalte A (Index 0): lfd. Nummer
|
- Spalte A (Index 0): lfd. Nummer
|
||||||
@@ -50,11 +51,13 @@ Excel-Datei → excel_reader → MonthlyAttendance → pdf_filler → PDF-Datei
|
|||||||
- "E" → entschuldigtes Fehlen
|
- "E" → entschuldigtes Fehlen
|
||||||
- "P" → Praktikum
|
- "P" → Praktikum
|
||||||
- "U" → Urlaub
|
- "U" → Urlaub
|
||||||
|
- "V" → Vorstellungsgespräch
|
||||||
|
- "A" → aus Projekt ausgeschieden
|
||||||
- Leer → Zeile überspringen
|
- Leer → Zeile überspringen
|
||||||
|
|
||||||
## PDF-Feld-Mapping (pro Zeile N, max 23 Zeilen)
|
## PDF-Feld-Mapping (pro Zeile N, max 23 Zeilen)
|
||||||
| Excel-Zelle | datum.N | anwesend.N | ist.N | plan.N | pauschale.N |
|
| Excel-Zelle | datum.N | anwesend.N | ist.N | plan.N | pauschale_5.N |
|
||||||
|---|---|---|---|---|---|
|
|---|---|---|---|---|---|
|
||||||
| Numerisch | DD.MM.YYYY | X | Wert (dt. Format) | "6" | "8,60" |
|
| Numerisch | DD.MM.YYYY | X | Wert (dt. Format) | "6" | "1" |
|
||||||
| "K"/"KK"/etc| DD.MM.YYYY | Code | leer | leer | leer |
|
| "K"/"KK"/etc| DD.MM.YYYY | Code | leer | leer | "0" |
|
||||||
| Leer | (überspringen) | — | — | — | — |
|
| Leer | (überspringen) | — | — | — | — |
|
||||||
@@ -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 |
|
| `person.name` | Full name of the participant | Excel column B |
|
||||||
| `monat_jahr` | Month and year in `MM/YYYY` format | Derived from sheet name + filename |
|
| `monat_jahr` | Month and year in `MM/YYYY` format | Derived from sheet name + filename |
|
||||||
| `antragsnummer` | Application number | `config.json` (hardcoded) |
|
| `antragsnummer` | Application number | `config.json` (hardcoded) |
|
||||||
| `ort` | Location/city | `config.json` (hardcoded) |
|
| `unterschrift.ort` | Location/city (signature line) | `config.json` (hardcoded) |
|
||||||
| `erstellungsdatum` | Creation date (`DD.MM.YYYY`) | Current system date at generation time |
|
| `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 |
|
| `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 |
|
| `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) |
|
| `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 |
|
| `plan.0` – `plan.22` | Planned attendance in hours (`Geplante Anwesenheit lt. Konzeption (in h)`) | Always `"6"` (mind. 6h) when present |
|
||||||
| `pauschale.0` – `pauschale.22` | Flat rate `Pauschale 8,60 € (mind. 6 h anwesend)` | Set to `8,60` if present (`X`), else empty |
|
| `pauschale_5.0` – `pauschale_5.22` | Flat rate Pauschale 8,60 € | Dropdown value `"1"` if present (`X`), else `"0"` |
|
||||||
|
|
||||||
## Header Field Derivation Rules
|
## 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`)
|
### Application Number (`antragsnummer`)
|
||||||
- Hardcoded static value stored in `config.json`. Never derived from Excel.
|
- 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.
|
- 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`.
|
- 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
|
## 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**:
|
**PDF actions**:
|
||||||
- `datum.N` → Set to the date in `DD.MM.YYYY` format.
|
- `datum.N` → Set to the date in `DD.MM.YYYY` format.
|
||||||
- `anwesend.N` → Select `X = anwesend`.
|
- `anwesend.N` → Select `X = anwesend`.
|
||||||
- `ist.N` → Set to the exact numeric value from Excel (actual hours worked).
|
- `ist.N` → Set to the exact numeric value from Excel (actual hours worked), with comma as decimal separator.
|
||||||
- `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.
|
- `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"`
|
### 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).
|
- `ist.N` → Leave empty (no hours entered).
|
||||||
- `plan.N` → Leave empty (no planned 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`).
|
**Condition**: Applied for every row where attendance is present (`X`).
|
||||||
|
|
||||||
**PDF actions**:
|
**PDF actions**:
|
||||||
- `pauschale.N` → Set to `8,60` if `anwesend.N` is `X = anwesend`.
|
- `pauschale_5.N` → Set to `"1"` (= 8,60 € in dropdown) if `anwesend.N` is `X = anwesend`.
|
||||||
- `pauschale.N` → Leave empty for all other statuses (K, KK, F, etc.).
|
- `pauschale_5.N` → Set to `"0"` for all other statuses (K, KK, F, etc.).
|
||||||
|
|
||||||
### Rule 6: No Entry / Empty Cell
|
### 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) |
|
| `F` | `F = unentschuldigtes Fehlen` (unexcused absence) |
|
||||||
| `P` | `P = Praktikum` (internship) |
|
| `P` | `P = Praktikum` (internship) |
|
||||||
| `U` | `U = Urlaub` (vacation) |
|
| `U` | `U = Urlaub` (vacation) |
|
||||||
|
| `V` | `V = Vorstellungsgespräch` (job interview) |
|
||||||
|
| `A` | `A = aus Projekt ausgeschieden` (left project) |
|
||||||
|
|
||||||
## Planned Hours Logic (`plan.N`)
|
## 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 A present | Sequential number column exists |
|
||||||
| Column B present | Name column exists |
|
| Column B present | Name column exists |
|
||||||
| Day columns present | At least one day column is detected |
|
| 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 |
|
| `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 |
|
| PDF template accessible | The PDF template file exists and is readable |
|
||||||
|
|
||||||
@@ -188,6 +193,11 @@ Erstelldatum : 27.03.2026
|
|||||||
Teilnehmer : 12
|
Teilnehmer : 12
|
||||||
Fehler : 0
|
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]
|
Möchten Sie die PDF-Generierung starten? [j/N]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user