feat : ajout de la partie reception des marchandises (étape 3) et modification du bon de réception
This commit is contained in:
@@ -16,12 +16,10 @@
|
||||
p{ margin:0; }
|
||||
em{ font-style: normal; }
|
||||
|
||||
.red{ color:red; }
|
||||
|
||||
.company-block{
|
||||
font-size:14px;
|
||||
text-align:left;
|
||||
line-height:1.25;
|
||||
line-height:1.3;
|
||||
}
|
||||
|
||||
.box{
|
||||
@@ -36,7 +34,7 @@
|
||||
text-align:center;
|
||||
font-size: 18pt;
|
||||
font-weight: 700;
|
||||
margin: 64px 0 15px 0;
|
||||
margin: 64px 0 20px 0;
|
||||
}
|
||||
|
||||
.info-table {
|
||||
@@ -47,7 +45,7 @@
|
||||
}
|
||||
|
||||
.info-table th {
|
||||
font-size: 16px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
table{
|
||||
@@ -63,30 +61,60 @@
|
||||
}
|
||||
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-wrap{
|
||||
border: 1px solid #000;
|
||||
height: 425px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.bigtable{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: none;
|
||||
border-collapse: collapse;
|
||||
table-layout: fixed;
|
||||
}
|
||||
|
||||
.bigtable th,
|
||||
.bigtable td{
|
||||
font-size: 16px;
|
||||
border: 1px solid #333;
|
||||
}
|
||||
|
||||
.bigtable thead th{ border-top: 0; }
|
||||
.bigtable tbody tr:last-child td{ border-bottom: 0; }
|
||||
|
||||
.bigtable tr th:first-child,
|
||||
.bigtable tr td:first-child{ border-left: 0; }
|
||||
|
||||
.bigtable tr th:last-child,
|
||||
.bigtable tr td:last-child{ border-right: 0; }
|
||||
|
||||
.bigtable thead th{ border-bottom: 0; }
|
||||
.bigtable tbody tr:first-child td{ border-top: 1px solid #333; }
|
||||
|
||||
.bigtable-notes{
|
||||
font-size: 14px;
|
||||
line-height: 1.25;
|
||||
}
|
||||
|
||||
/* ligne “filler” pour forcer la hauteur comme l'exemple */
|
||||
.fill td{
|
||||
border-top:none;
|
||||
height: 75mm; /* ajuste si besoin */
|
||||
.border-bottom {
|
||||
border-bottom: 1px solid #000;
|
||||
}
|
||||
|
||||
.footer-block{ page-break-inside: avoid; }
|
||||
|
||||
.signature-title{ font-size:12px; margin-bottom:2mm; }
|
||||
.signature-box{ height: 22mm; margin-bottom: 4mm; }
|
||||
.signature-box {
|
||||
height: 22mm;
|
||||
margin-bottom: 4mm;
|
||||
border: 0.5px solid #000;
|
||||
|
||||
padding: 6px 10px;
|
||||
}
|
||||
|
||||
.meta{ font-size: 16px; line-height: 1.35; }
|
||||
</style>
|
||||
</head>
|
||||
@@ -104,7 +132,7 @@
|
||||
14 Allée d’Argenson<br>
|
||||
Z.I Nord – Secteur Est<br>
|
||||
86100 CHATELLERAULT<br>
|
||||
TEL : 05 49 20 09 10<br>
|
||||
Tel. : 05 49 20 09 10<br>
|
||||
Email : lpc.contacts@lpc-liot.fr<br>
|
||||
RCS Châtellerault B 444 262 455
|
||||
</td>
|
||||
@@ -113,7 +141,7 @@
|
||||
</td>
|
||||
|
||||
<td style="width:30%; text-align:right; vertical-align:top; font-size: 14px;">
|
||||
<div style="display:inline-block; width:75mm;">
|
||||
<div style="display:inline-block; width:75mm; line-height:1.3;">
|
||||
<strong>{{ reception.supplier.name }}</strong><br>
|
||||
<span>{{ reception.address.street }}</span><br>
|
||||
<span>{{ reception.address.postalCode }} {{ reception.address.city }}</span>
|
||||
@@ -140,57 +168,100 @@
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<!-- GRAND TABLEAU -->
|
||||
<table class="bigtable" style="margin-bottom:10px; width:100%; border-collapse:collapse; table-layout:fixed;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:75%; text-align:center;">Désignation</th>
|
||||
<th style="width:25%; text-align:right; white-space:nowrap;">Qté livrée (kg)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<div class="bigtable-wrap">
|
||||
<table class="bigtable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:75%; text-align:center;">Désignation</th>
|
||||
<th style="width:25%; text-align:center; white-space:nowrap;">Qté livrée (kg)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="width:75%;">
|
||||
<strong class="red">MAÏS sec</strong><br><br>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="width:75%;">
|
||||
<strong>{{ reception.receptionType.label }}</strong><br><br>
|
||||
|
||||
<div class="bigtable-notes">
|
||||
{% set grossWeight = null %}
|
||||
{% set tareWeight = null %}
|
||||
<div class="bigtable-notes">
|
||||
{% 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>
|
||||
{% 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 style="width:25%; text-align:center; white-space:nowrap;">
|
||||
{% if grossWeight and tareWeight %}
|
||||
{{ grossWeight.weight - tareWeight.weight }}
|
||||
{% else %}
|
||||
0
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="border-bottom">
|
||||
<td>
|
||||
<strong>
|
||||
{% if reception.merchandiseType %}
|
||||
{{ reception.merchandiseType.label }}
|
||||
{% else %}
|
||||
-
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</td>
|
||||
</strong>
|
||||
<br><br>
|
||||
|
||||
<td style="width:25%; text-align:right; white-space:nowrap;">
|
||||
{% if grossWeight and tareWeight %}
|
||||
{{ grossWeight.weight - tareWeight.weight }}
|
||||
{% else %}
|
||||
0
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<div class="bigtable-notes">
|
||||
{% if reception.merchandiseType and reception.merchandiseType.code == 'AUTRES' and reception.merchandiseDetail %}
|
||||
<p><strong>Précision</strong> : {{ reception.merchandiseDetail }}</p>
|
||||
{% endif %}
|
||||
|
||||
<!-- filler : garde le grand bloc haut comme sur l'exemple -->
|
||||
<tr class="fill">
|
||||
<td style="width:75%;"></td>
|
||||
<td style="width:25%;"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
{% if reception.merchandiseType and reception.merchandiseType.code == 'GRANULE' %}
|
||||
{% set pelletGroups = {} %}
|
||||
{% for selection in reception.pelletBuildings %}
|
||||
{% set pelletLabel = selection.pelletType.label %}
|
||||
{% if pelletGroups[pelletLabel] is not defined %}
|
||||
{% set pelletGroups = pelletGroups|merge({ (pelletLabel): [] }) %}
|
||||
{% endif %}
|
||||
{% set pelletGroups = pelletGroups|merge({
|
||||
(pelletLabel): pelletGroups[pelletLabel]|merge([selection.building.label])
|
||||
}) %}
|
||||
{% endfor %}
|
||||
|
||||
{% for pelletLabel, buildingLabels in pelletGroups %}
|
||||
<p><strong>{{ pelletLabel }}</strong> : {{ buildingLabels|join(', ') }}</p>
|
||||
{% else %}
|
||||
<p>Aucun dépôt de granulés renseigné.</p>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{% set buildingLabels = [] %}
|
||||
{% for building in reception.buildings %}
|
||||
{% set buildingLabels = buildingLabels|merge([building.label]) %}
|
||||
{% endfor %}
|
||||
{% if buildingLabels %}
|
||||
<p><strong>Ferme</strong> : {{ buildingLabels|join(', ') }}</p>
|
||||
{% else %}
|
||||
<p>Aucun bâtiment renseigné.</p>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- BAS : meta à gauche / signatures à droite (sans float) -->
|
||||
<table class="layout">
|
||||
<!-- BAS : meta à gauche / signatures à droite -->
|
||||
<table class="layout footer-block">
|
||||
<tr>
|
||||
<td style="width:60%; padding-right:8mm; vertical-align:top;">
|
||||
<div class="meta">
|
||||
|
||||
Reference in New Issue
Block a user