feat : modification des exports PDF et affichage du type de contrat sur l'écran des heures
Some checks failed
Auto Tag Develop / tag (push) Has been cancelled

This commit is contained in:
2026-04-17 08:58:58 +02:00
parent be7c16778a
commit 1095421424
19 changed files with 768 additions and 83 deletions

View File

@@ -14,10 +14,24 @@
font-size: 9px;
}
.title-bar {
position: relative;
margin: 0 0 4mm 0;
}
h1 {
text-align: center;
font-size: 16px;
margin: 0 0 4mm 0;
margin: 0;
}
.export-date {
position: absolute;
top: 0;
right: 0;
font-size: 9px;
color: #333;
padding-top: 4px;
}
h2 {
@@ -54,11 +68,70 @@
td.time { text-align: center; }
td.presence { text-align: center; }
td.total { text-align: center; font-weight: bold; }
tr.weekend td { background: #f3f3f3; color: #555; }
tr.weekend td.date { color: #333; }
.signature-footer {
page-break-inside: avoid;
margin-top: 6mm;
}
.signature-intro {
text-align: center;
font-weight: 700;
margin-bottom: 6mm;
font-size: 11px;
}
.signature-blocks {
display: table;
width: 100%;
table-layout: fixed;
border-collapse: separate;
border-spacing: 4mm 0;
}
.signature-block {
display: table-cell;
border: 1px solid #0a0a0a;
padding: 3mm;
vertical-align: top;
width: 33.33%;
}
.signature-block .title {
text-align: center;
font-weight: 700;
font-size: 11px;
margin-bottom: 7mm;
text-decoration: underline;
}
.signature-block .line {
margin-bottom: 2mm;
font-size: 10px;
}
.signature-block .signature-line {
margin-top: 6mm;
margin-bottom: 18mm;
font-size: 10px;
}
</style>
</head>
<body>
<h1>{{ employeeName }} - {{ year }}</h1>
{% set months = {
1:'Janvier', 2:'Février', 3:'Mars', 4:'Avril', 5:'Mai', 6:'Juin',
7:'Juillet', 8:'Août', 9:'Septembre', 10:'Octobre', 11:'Novembre', 12:'Décembre'
} %}
<div class="title-bar">
<h1>
{{ employeeName }}{% if contractLabel %} - {{ contractLabel }}{% endif %}<br>
{% if month %}{{ months[month] }} {{ year }}{% else %}{{ year }}{% endif %}
</h1>
<div class="export-date">Exporté le {{ "now"|date('d/m/Y') }} à {{ "now"|date('H:i:s') }}</div>
</div>
{% for segment in segments %}
{% if segments|length > 1 %}
@@ -78,7 +151,7 @@
</thead>
<tbody>
{% for row in segment.rows %}
<tr>
<tr class="{{ row.isWeekend ? 'weekend' : '' }}">
<td class="date">{{ row.date }}</td>
<td class="absence">{{ row.absenceLabel ?? '' }}</td>
<td class="presence">{{ row.presentMorning ? 'X' : '' }}</td>
@@ -102,7 +175,7 @@
</thead>
<tbody>
{% for row in segment.rows %}
<tr>
<tr class="{{ row.isWeekend ? 'weekend' : '' }}">
<td class="date">{{ row.date }}</td>
<td class="absence">{{ row.absenceLabel ?? '' }}</td>
<td class="time">{{ row.dayHours }}</td>
@@ -130,7 +203,7 @@
</thead>
<tbody>
{% for row in segment.rows %}
<tr>
<tr class="{{ row.isWeekend ? 'weekend' : '' }}">
<td class="date">{{ row.date }}</td>
<td class="absence">{{ row.absenceLabel ?? '' }}</td>
<td class="time">{{ row.morningFrom }}</td>
@@ -147,5 +220,36 @@
{% endif %}
{% endfor %}
<div class="signature-footer">
<div class="signature-intro">
Nom + Prénom<br>
Signature avec mention « bon pour accord »
</div>
<div class="signature-blocks">
<div class="signature-block">
<p class="title">Direction</p>
<p class="line">Nom : ...............</p>
<p class="line">Prénom : ...............</p>
<p class="line">Mention : ........................................</p>
<p class="signature-line">Signature :</p>
</div>
<div class="signature-block">
<p class="title">Responsable usine</p>
<p class="line">Nom : ...............</p>
<p class="line">Prénom : ...............</p>
<p class="line">Mention : ........................................</p>
<p class="signature-line">Signature :</p>
</div>
<div class="signature-block">
<p class="title">Salarié</p>
<p class="line">Nom : ...............</p>
<p class="line">Prénom : ...............</p>
<p class="line">Mention : ........................................</p>
<p class="signature-line">Signature :</p>
</div>
</div>
</div>
</body>
</html>

View File

@@ -28,13 +28,22 @@
.date-box {
position: absolute;
top: 0;
right: 0;
left: 0;
border: 2px solid #000;
padding: 4px 12px;
font-size: 14px;
font-weight: 700;
}
.export-date {
position: absolute;
top: 0;
right: 0;
font-size: 10px;
color: #333;
padding-top: 6px;
}
table.recap {
width: 100%;
border-collapse: collapse;
@@ -77,8 +86,9 @@
<body>
<div class="title-bar">
<h1>RECAPITULATIF CONGES & RTT</h1>
<div class="date-box">{{ today|date('d/m/Y') }}</div>
<h1>RECAPITULATIF CONGES & RTT</h1>
<div class="export-date">Exporté le {{ "now"|date('d/m/Y') }} à {{ "now"|date('H:i:s') }}</div>
</div>
<table class="recap">

View File

@@ -11,7 +11,7 @@
margin: 0;
padding: 2mm;
font-family: Helvetica, sans-serif;
font-size: 10px;
font-size: 9px;
}
.title-bar {
@@ -28,7 +28,7 @@
.month-box {
position: absolute;
top: 0;
right: 0;
left: 0;
border: 2px solid #000;
padding: 4px 12px;
font-size: 14px;
@@ -36,16 +36,25 @@
text-transform: uppercase;
}
.export-date {
position: absolute;
top: 0;
right: 0;
font-size: 10px;
color: #333;
padding-top: 6px;
}
table.recap {
width: 100%;
border-collapse: collapse;
table-layout: auto;
border: 4px solid #0a0a0a;
border: 2px solid #0a0a0a;
}
th, td {
border: 2px solid #0a0a0a;
padding: 3px 3px;
border: 1px solid #0a0a0a;
padding: 2px 2px;
vertical-align: middle;
overflow: hidden;
white-space: nowrap;
@@ -60,7 +69,7 @@
thead th {
text-align: center;
font-weight: 700;
font-size: 10px;
font-size: 9px;
white-space: normal;
}
@@ -74,16 +83,16 @@
text-align: left;
white-space: normal;
word-break: break-word;
font-size: 10px;
font-size: 9px;
}
td.obs {
text-align: left;
white-space: normal;
word-break: break-word;
font-size: 9px;
font-size: 8px;
}
tbody td { font-size: 10px; }
tbody td { font-size: 9px; }
</style>
</head>
<body>
@@ -94,43 +103,45 @@
} %}
<div class="title-bar">
<h1>RECAPITULATIF SALAIRE DU {{ from|date('d/m/Y') }} au {{ to|date('d/m/Y') }}</h1>
<div class="month-box">{{ months[from|date('n')|number_format] }} {{ from|date('Y') }}</div>
<h1>RECAPITULATIF SALAIRE DU {{ from|date('d/m/Y') }} au {{ to|date('d/m/Y') }}</h1>
<div class="export-date">Exporté le {{ "now"|date('d/m/Y') }} à {{ "now"|date('H:i:s') }}</div>
</div>
<table class="recap">
<thead>
<tr>
<th rowspan="2" style="width: 24mm; text-align: left;">Nom</th>
<th rowspan="2" style="width: 12mm;">Base</th>
<th rowspan="2" style="width: 12mm;">Jour de<br>présence<br>Cadre</th>
<th rowspan="2" style="width: 9mm;">Frais<br>Kms</th>
<th rowspan="2" style="width: 9mm;">Heures<br>de<br>nuit</th>
<th rowspan="2" style="width: 9mm;">Panier<br>de<br>nuit</th>
<th rowspan="2" style="width: 12mm;">Heures<br>payés</th>
<th rowspan="2" style="width: 9mm;">Heures<br>dim.</th>
<th rowspan="2" style="width: 9mm;">Prime</th>
<th rowspan="2" style="width: 20mm; text-align: left;">Nom</th>
<th rowspan="2" style="width: 10mm;">Base</th>
<th rowspan="2" style="width: 10mm;">Jour de<br>présence<br>Cadre</th>
<th rowspan="2" style="width: 8mm;">Frais<br>Kms</th>
<th rowspan="2" style="width: 8mm;">Heures<br>de<br>nuit</th>
<th rowspan="2" style="width: 8mm;">Panier<br>de<br>nuit</th>
<th rowspan="2" style="width: 10mm;">Heures<br>payés</th>
<th rowspan="2" style="width: 8mm;">Heures<br>férié</th>
<th rowspan="2" style="width: 8mm;">Heures<br>dim.</th>
<th rowspan="2" style="width: 8mm;">Prime</th>
<th colspan="2">Congés</th>
<th colspan="2">Maladie</th>
<th colspan="4">CHAUFFEUR</th>
<th rowspan="2" style="width: 26mm;">Observations</th>
<th rowspan="2" style="width: 20mm;">Observations</th>
</tr>
<tr>
<th style="width: 10mm;">Nbre</th>
<th style="width: 26mm;">Date</th>
<th style="width: 10mm;">Nbre</th>
<th style="width: 26mm;">Date</th>
<th style="width: 8mm;">PDJ</th>
<th style="width: 10mm;">REPAS</th>
<th style="width: 12mm;">NUITEE</th>
<th style="width: 12mm;">samedi</th>
<th style="width: 8mm;">Nbre</th>
<th style="width: 22mm;">Date</th>
<th style="width: 8mm;">Nbre</th>
<th style="width: 22mm;">Date</th>
<th style="width: 7mm;">PDJ</th>
<th style="width: 9mm;">REPAS</th>
<th style="width: 10mm;">NUITEE</th>
<th style="width: 10mm;">samedi</th>
</tr>
</thead>
<tbody>
{% for siteId, group in siteGroups %}
{% set siteColor = group.color ?? '#B3E5FC' %}
<tr class="site-header">
<td style="background: {{ siteColor }}; text-align: left;" colspan="18">
<td style="background: {{ siteColor }}; text-align: left;" colspan="19">
{{ group.name }}
</td>
</tr>
@@ -143,6 +154,7 @@
<td class="num">{{ row.nightHours > 0 ? row.nightHours : '' }}</td>
<td class="num">{{ row.nightBasketCount > 0 ? row.nightBasketCount : '' }}</td>
<td class="num">{{ row.paidHours > 0 ? row.paidHours : '' }}</td>
<td class="num">{{ row.holidayHours > 0 ? row.holidayHours : '' }}</td>
<td class="num">{{ row.sundayHours > 0 ? row.sundayHours : '' }}</td>
<td class="num">{{ row.bonusAmount > 0 ? row.bonusAmount ~ ' €' : '' }}</td>
<td class="num">{{ row.congesCount > 0 ? row.congesCount : '' }}</td>
@@ -157,7 +169,7 @@
</tr>
{% else %}
<tr>
<td colspan="18">Aucun employé.</td>
<td colspan="19">Aucun employé.</td>
</tr>
{% endfor %}
{% endfor %}