feat : ajout de l'export récap. salaire
Some checks failed
Auto Tag Develop / tag (push) Has been cancelled
Some checks failed
Auto Tag Develop / tag (push) Has been cancelled
This commit is contained in:
163
templates/salary-recap/print.html.twig
Normal file
163
templates/salary-recap/print.html.twig
Normal file
@@ -0,0 +1,163 @@
|
||||
<!doctype html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Récapitulatif Salaire</title>
|
||||
|
||||
<style>
|
||||
@page { size: A4 landscape; margin: 4mm; }
|
||||
|
||||
html, body {
|
||||
margin: 0;
|
||||
padding: 2mm;
|
||||
font-family: Helvetica, sans-serif;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.title-bar {
|
||||
position: relative;
|
||||
margin: 0 0 6mm 0;
|
||||
}
|
||||
|
||||
h1 {
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.month-box {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
border: 2px solid #000;
|
||||
padding: 4px 12px;
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
table.recap {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
table-layout: auto;
|
||||
border: 4px solid #0a0a0a;
|
||||
}
|
||||
|
||||
th, td {
|
||||
border: 2px solid #0a0a0a;
|
||||
padding: 3px 3px;
|
||||
vertical-align: middle;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.site-header td {
|
||||
font-weight: 700;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
thead th {
|
||||
text-align: center;
|
||||
font-weight: 700;
|
||||
font-size: 11px;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
td.name {
|
||||
text-align: left;
|
||||
font-weight: bold;
|
||||
}
|
||||
td.base { text-align: center; }
|
||||
td.num { text-align: center; }
|
||||
td.dates {
|
||||
text-align: left;
|
||||
white-space: normal;
|
||||
word-break: break-word;
|
||||
font-size: 10px;
|
||||
}
|
||||
td.obs { }
|
||||
|
||||
tbody td { font-size: 12px; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
{% 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>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>
|
||||
</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 colspan="2">Congés</th>
|
||||
<th colspan="2">Maladie</th>
|
||||
<th colspan="4">CHAUFFEUR</th>
|
||||
<th rowspan="2" style="width: 26mm;">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>
|
||||
</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">
|
||||
{{ group.name }}
|
||||
</td>
|
||||
</tr>
|
||||
{% for row in group.employees %}
|
||||
<tr>
|
||||
<td class="name">{{ row.lastName }}<br>{{ row.firstName }}</td>
|
||||
<td class="base">{{ row.contractName ?? '' }}</td>
|
||||
<td class="num">{{ row.presenceDays > 0 ? row.presenceDays : '' }}</td>
|
||||
<td class="num">{{ row.mileageKm > 0 ? row.mileageKm : '' }}</td>
|
||||
<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.sundayHours > 0 ? row.sundayHours : '' }}</td>
|
||||
<td class="num">{{ row.bonusAmount > 0 ? row.bonusAmount : '' }}</td>
|
||||
<td class="num">{{ row.congesCount > 0 ? row.congesCount : '' }}</td>
|
||||
<td class="dates">{{ row.congesDates }}</td>
|
||||
<td class="num">{{ row.maladieCount > 0 ? row.maladieCount : '' }}</td>
|
||||
<td class="dates">{{ row.maladieDates }}</td>
|
||||
<td class="num">{{ row.isDriver and row.driverBreakfast > 0 ? row.driverBreakfast : '' }}</td>
|
||||
<td class="num">{{ row.isDriver and row.driverMeals > 0 ? row.driverMeals : '' }}</td>
|
||||
<td class="num">{{ row.isDriver and row.driverOvernight > 0 ? row.driverOvernight : '' }}</td>
|
||||
<td class="num">{{ row.isDriver and row.driverSaturdays > 0 ? row.driverSaturdays : '' }}</td>
|
||||
<td class="obs"></td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="18">Aucun employé.</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user