Files
SIRH/templates/night-hours-contingent/print.html.twig
T
tristan 327c10fda4
Auto Tag Develop / tag (push) Successful in 7s
feat(overtime-contingent) : contingent d'heures supplémentaires payées (#29)
## Résumé
Suivi par **année civile** (Janv–Déc) des heures supplémentaires payées des employés non-forfait (chauffeurs inclus) face au plafond légal (**350 h** chauffeurs / **220 h** autres).

- **Fiche employé** : encart header `Total H.payés {année} : X h / plafond h` (année civile courante, rouge si dépassement), via `GET /employees/{id}/overtime-contingent`.
- **Export PDF** `GET /overtime-contingent/print?year=&siteIds=` (ROLE_USER, périmètre `findScoped`) : groupé par site, colonnes Janv–Déc + colonne `Total payé / payable`. Drawer liste employés (année + sites).
- Heures payées = `base25 + base50` (hors majoration). Mapping exercice→civil : `mois ≥ 6 ? exercice−1 : exercice`.
- Cœur partagé pur `OvertimePaidContingentCalculator`.
- Ajout « Année civile » dans le titre des deux exports PDF (contingent H.supp. et heures de nuit).

## Tests
- 214 tests PHPUnit verts (calculateur : mapping civil, base-only, plafond ; builder : ventilation mensuelle, ligne à zéro).

## Hors périmètre (consigné)
- Bug latent `SalaryRecapPrintProvider` : rattachement des paiements RTT des mois Juin–Déc par année civile sur un stockage par exercice. À traiter séparément.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Reviewed-on: #29
Co-authored-by: tristan <tristan@yuno.malio.fr>
Co-committed-by: tristan <tristan@yuno.malio.fr>
2026-06-11 15:47:19 +00:00

61 lines
2.3 KiB
Twig

<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8">
<style>
@page { margin: 16px; }
body { font-family: DejaVu Sans, sans-serif; font-size: 10px; color: #000; }
h1 { font-size: 15px; margin: 0 0 2px; }
.meta { font-size: 9px; color: #555; margin-bottom: 8px; }
table { width: 100%; border-collapse: collapse; }
th, td { border: 1px solid #999; padding: 2px 1px; text-align: center; }
th { background: #d9d9d9; }
td.name, th.name { text-align: left; width: 145px; padding-left: 4px; padding-right: 6px; }
.sub { font-size: 9px; }
td.data, th.data { width: 34px; font-size: 9px; }
tr.site-title td { text-align: left; font-weight: bold; }
td.hours { white-space: nowrap; }
td.month-start, th.month-start { border-left: 2.5px solid #333; }
</style>
</head>
<body>
<h1>Contingent heures de nuit — Année civile {{ year }}</h1>
<div class="meta">Édité le {{ exportedAt }}</div>
{% set months = ['Janv', 'Févr', 'Mars', 'Avr', 'Mai', 'Juin', 'Juil', 'Août', 'Sept', 'Oct', 'Nov', 'Déc'] %}
<table>
<thead>
<tr>
<th class="name" rowspan="2">Nom</th>
{% for m in months %}
<th class="month-start" colspan="2">{{ m }}</th>
{% endfor %}
</tr>
<tr>
{% for m in months %}
<th class="sub data month-start">H.nuit</th>
<th class="sub data">N.jours</th>
{% endfor %}
</tr>
</thead>
<tbody>
{% for group in groups %}
<tr class="site-title">
<td colspan="25" style="background: {{ group.siteColor|default('#eee') }}">{{ group.siteName }}</td>
</tr>
{% for row in group.rows %}
<tr>
<td class="name">{{ row.employeeName }}</td>
{% for cell in row.cells %}
<td class="hours data month-start">{{ cell.hours }}</td>
<td class="data">{{ cell.days }}</td>
{% endfor %}
</tr>
{% endfor %}
{% endfor %}
</tbody>
</table>
</body>
</html>