238 lines
7.9 KiB
Twig
238 lines
7.9 KiB
Twig
<!doctype html>
|
||
<html lang="fr">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
|
||
<style>
|
||
@page { margin: 56px 56px; }
|
||
|
||
body{
|
||
font-family: Arial, sans-serif;
|
||
font-size: 13px;
|
||
margin:0;
|
||
color:#000;
|
||
}
|
||
|
||
p{ margin:0; }
|
||
em{ font-style: normal; }
|
||
|
||
.red{ color:red; }
|
||
|
||
.company-block{
|
||
font-size:13px;
|
||
text-align:left;
|
||
line-height:1.25;
|
||
}
|
||
|
||
.box{
|
||
border:1px solid #000;
|
||
border-radius:10px;
|
||
padding:10px;
|
||
font-size:13px;
|
||
height: 80px;
|
||
}
|
||
|
||
.title{
|
||
text-align:center;
|
||
font-size: 18pt;
|
||
font-weight: 700;
|
||
margin: 0 0 4mm 0;
|
||
}
|
||
|
||
table{ width:100%; border-collapse: collapse; }
|
||
th, td{
|
||
border:1px solid #333;
|
||
padding:4px 6px;
|
||
vertical-align: top;
|
||
font-size: 9pt;
|
||
}
|
||
th{ text-align:center; font-weight:700; }
|
||
|
||
/* tables de layout (sans bordures) */
|
||
.layout, .layout td{ border:none !important; padding:0; }
|
||
|
||
/* GRAND TABLEAU : verrouillage dompdf */
|
||
.bigtable{ table-layout: fixed; }
|
||
|
||
/* ligne “filler” pour forcer la hauteur comme l'exemple */
|
||
.fill td{
|
||
border-top:none;
|
||
height: 75mm; /* ajuste si besoin */
|
||
}
|
||
|
||
/* Bloc IDTF comme l’exemple */
|
||
table.idtf{
|
||
width: 350px; /* ou 100% si tu préfères */
|
||
border-collapse: collapse;
|
||
border: 1px solid #333 !important; /* bordure extérieure */
|
||
margin-top: 12px; /* ~3mm */
|
||
font-size: 8.5pt;
|
||
table-layout: fixed;
|
||
}
|
||
|
||
/* IMPORTANT: on cible td DANS table.idtf et on force */
|
||
table.idtf td{
|
||
border: 1px solid #333 !important;
|
||
padding: 3px 5px;
|
||
vertical-align: top;
|
||
}
|
||
|
||
/* Largeurs en % (pas de mm) */
|
||
table.idtf td.n{ width: 8%; text-align:center; }
|
||
table.idtf td.prod{ width: 52%; }
|
||
table.idtf td.net{ width: 20%; }
|
||
table.idtf td.date{ width: 20%; }
|
||
|
||
.signature-title{ font-size:9pt; margin-bottom:2mm; }
|
||
.signature-box{ height: 22mm; margin-bottom: 4mm; }
|
||
.meta{ font-size: 9pt; line-height: 1.35; }
|
||
</style>
|
||
</head>
|
||
|
||
<body>
|
||
|
||
<!-- HEADER -->
|
||
<table class="layout" style="width:100%;">
|
||
<tr>
|
||
<td style="width:70%; vertical-align:top;">
|
||
<!-- table imbriquée : 1 ligne logo, 1 ligne texte (dompdf-friendly) -->
|
||
<table class="layout" style="width:100%;">
|
||
<tr>
|
||
<td style="padding:0; border:none;">
|
||
<img src="https://static.mixsuite.fr/liot/logo.png"
|
||
style="width:110px; display:block; margin:0 0 4mm 0;">
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="company-block" style="padding:0; border:none;">
|
||
<strong>SA LIOT Châtellerault</strong><br>
|
||
Site de <b>Châtellerault</b><br>
|
||
14 Allée d’Argenson<br>
|
||
Z.I Nord – Secteur Est<br>
|
||
86100 CHATELLERAULT<br>
|
||
TEL : 05 49 20 09 10 – Fax : 05 49 85 37 82<br>
|
||
Email : lpc.contacts@lpc-liot.fr<br>
|
||
RCS Châtellerault B 339 505 612
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
|
||
<td style="width:30%; text-align:left; vertical-align:top;">
|
||
<div class="box" style="display:inline-block; width:75mm;">
|
||
<strong class="red">Nom de l'entreprise</strong><br><br><br>
|
||
<span class="red">Adresse de l'entreprise</span>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
|
||
<div class="title">BON DE RECEPTION</div>
|
||
|
||
<!-- INFOS (code/date/num) -->
|
||
<table style="margin-bottom:3mm; width:100%; border-collapse:collapse; table-layout:fixed;">
|
||
<tr>
|
||
<th style="width:60%; text-align:center;">Code fournisseur</th>
|
||
<th style="width:20%; text-align:center; white-space:nowrap;">Date</th>
|
||
<th style="width:20%; text-align:center; white-space:nowrap;">N° réception</th>
|
||
</tr>
|
||
<tr>
|
||
<td class="red" style="width:60%; text-align:center;">XXX</td>
|
||
<td style="width:20%; text-align:center; white-space:nowrap;">
|
||
{{ reception.receptionDate|date('d/m/Y') }}
|
||
</td>
|
||
<td class="red" style="width:20%; text-align:center; white-space:nowrap;">86-BR-XXXX</td>
|
||
</tr>
|
||
</table>
|
||
|
||
|
||
<!-- GRAND TABLEAU -->
|
||
<table class="bigtable" style="margin-bottom:10px; width:100%; border-collapse:collapse; table-layout:fixed;">
|
||
<thead>
|
||
<tr>
|
||
<th style="width:15%; text-align:center;">Code</th>
|
||
<th style="width:65%; text-align:center;">Désignation</th>
|
||
<th style="width:20%; text-align:right; white-space:nowrap;">Qté livrée (kg)</th>
|
||
</tr>
|
||
</thead>
|
||
|
||
<tbody>
|
||
<tr>
|
||
<td class="red" style="width:12%;">M</td>
|
||
|
||
<td style="width:68%;">
|
||
<strong class="red">MAÏS sec</strong><br><br>
|
||
|
||
<div style="font-size:8.5pt; line-height:1.25;">
|
||
{% set grossWeight = null %}
|
||
{% set tareWeight = null %}
|
||
|
||
{% for weight in reception.weights %}
|
||
{% if weight.type == 'gross' %}
|
||
{% set grossWeight = weight %}
|
||
<p>Poids à plein : {{ grossWeight.weight }}kg (pesée n°{{ grossWeight.dsd }} {{ grossWeight.weighedAt|date('d/m/Y H:i:s') }})</p>
|
||
{% elseif weight.type == 'tare' %}
|
||
{% set tareWeight = weight %}
|
||
<p>Poids à vide : {{ tareWeight.weight }}kg (pesée n°{{ tareWeight.dsd }} {{ tareWeight.weighedAt|date('d/m/Y H:i:s') }})</p>
|
||
{% endif %}
|
||
{% endfor %}
|
||
</div>
|
||
</td>
|
||
|
||
<td class="red" style="width:20%; text-align:right; white-space:nowrap;">
|
||
{% if grossWeight and tareWeight %}
|
||
{{ grossWeight.weight - tareWeight.weight }}
|
||
{% else %}
|
||
0
|
||
{% endif %}
|
||
</td>
|
||
</tr>
|
||
|
||
<!-- filler : garde le grand bloc haut comme sur l'exemple -->
|
||
<tr class="fill">
|
||
<td style="width:15%;"></td>
|
||
<td style="width:65%;"></td>
|
||
<td style="width:20%;"></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
|
||
|
||
<!-- BAS : meta à gauche / signatures à droite (sans float) -->
|
||
<table class="layout">
|
||
<tr>
|
||
<td style="width:60%; padding-right:8mm; vertical-align:top;">
|
||
<div class="meta red">
|
||
Transporteur : <strong class="red">Nom du transporteur</strong><br>
|
||
Mode de livraison : <strong class="red">Fond-mouvant</strong><br>
|
||
Immatriculation : <strong class="red">{{ reception.licensePlate }}</strong><br><br>
|
||
Poids annoncé : <strong class="red">XXXXX kg</strong>
|
||
</div>
|
||
|
||
<!-- Bloc IDTF -->
|
||
<table class="idtf">
|
||
<tr>
|
||
<td class="n">1</td>
|
||
<td class="prod red">
|
||
Produit : <span class="red">Nom du produit</span><br>
|
||
N° IDTF : <span class="red">4000XX</span>
|
||
</td>
|
||
<td class="net red">Nettoyage : <span class="red">A</span></td>
|
||
<td class="date red">Date : <span class="red">14/01/2026</span></td>
|
||
</tr>
|
||
|
||
<!-- répète le <tr> si besoin -->
|
||
</table>
|
||
</td>
|
||
|
||
<td style="width:40%; vertical-align:top;">
|
||
<div class="signature-title">Signature :</div>
|
||
<div class="box signature-box">Ets Liot :</div>
|
||
<div class="box signature-box">Transporteur :</div>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
|
||
</body>
|
||
</html>
|