feat : ajout d'une page de creation d'une expedition
This commit is contained in:
@@ -141,16 +141,18 @@
|
||||
|
||||
<td style="width:30%; text-align:right; vertical-align:top; font-size: 14px;">
|
||||
<div style="display:inline-block; width:75mm; line-height:1.3;">
|
||||
<strong>{{ reception.supplier.name }}</strong><br>
|
||||
<span>{{ reception.address.street }}</span><br>
|
||||
{% if reception.address.street2 %}
|
||||
<strong>{{ reception.supplier ? reception.supplier.name : '-' }}</strong><br>
|
||||
<span>{{ reception.address ? reception.address.street : '' }}</span><br>
|
||||
{% if reception.address and reception.address.street2 %}
|
||||
<span>{{ reception.address.street2 }}</span><br>
|
||||
{% endif %}
|
||||
<span>{{ reception.address.postalCode }} {{ reception.address.city }}</span><br>
|
||||
{% if reception.supplier.phone %}
|
||||
{% if reception.address %}
|
||||
<span>{{ reception.address.postalCode }} {{ reception.address.city }}</span><br>
|
||||
{% endif %}
|
||||
{% if reception.supplier and reception.supplier.phone %}
|
||||
<span>{{ reception.supplier.phone }}</span><br>
|
||||
{% endif %}
|
||||
{% if reception.supplier.email %}
|
||||
{% if reception.supplier and reception.supplier.email %}
|
||||
<span>{{ reception.supplier.email}}</span><br>
|
||||
{% endif %}
|
||||
</div>
|
||||
@@ -168,7 +170,9 @@
|
||||
<th style="width:25%; text-align:center; white-space:nowrap;">N° réception</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:55%; text-align:center;">{{ reception.supplier.name }}</td>
|
||||
<td style="width:55%; text-align:center;">
|
||||
{{ reception.supplier ? reception.supplier.name : '-' }}
|
||||
</td>
|
||||
<td style="width:20%; text-align:center; white-space:nowrap;">
|
||||
{{ reception.receptionDate|date('d/m/Y') }}
|
||||
</td>
|
||||
@@ -189,13 +193,11 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="width:75%;">
|
||||
<strong>{{ reception.receptionType.label }}</strong><br><br>
|
||||
|
||||
<strong>{{ reception.receptionType ? reception.receptionType.label : '-' }}</strong><br><br>
|
||||
<div class="bigtable-notes">
|
||||
{% set grossWeight = null %}
|
||||
{% set tareWeight = null %}
|
||||
|
||||
{% for weight in reception.weights %}
|
||||
{% for weight in reception.weights|default([]) %}
|
||||
{% 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>
|
||||
@@ -219,45 +221,57 @@
|
||||
<tr class="border-bottom">
|
||||
<td>
|
||||
<strong>
|
||||
{% if reception.merchandiseType %}
|
||||
{{ reception.merchandiseType.label }}
|
||||
{% else %}
|
||||
-
|
||||
{% endif %}
|
||||
Type de bovins
|
||||
</strong>
|
||||
<br><br>
|
||||
|
||||
<div class="bigtable-notes">
|
||||
{% if reception.merchandiseType and reception.merchandiseType.code == 'AUTRES' and reception.merchandiseDetail %}
|
||||
<p><strong>Précision</strong> : {{ reception.merchandiseDetail }}</p>
|
||||
{% endif %}
|
||||
|
||||
{% 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>
|
||||
{% if reception.receptionType and reception.receptionType.code == 'BOVINS' %}
|
||||
{% if reception.bovinesTypes is not empty %}
|
||||
{% for entry in reception.bovinesTypes %}
|
||||
<p>
|
||||
{{ entry.bovineType ? entry.bovineType.label : '-' }} : {{ entry.quantity ?? 0 }}
|
||||
</p>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<p>Aucun dépôt de granulés renseigné.</p>
|
||||
{% endfor %}
|
||||
<p>-</p>
|
||||
{% endif %}
|
||||
|
||||
{% if reception.bovineDetail %}
|
||||
<p>Autres : {{ reception.bovineDetail }}</p>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% set buildingLabels = [] %}
|
||||
{% for building in reception.buildings %}
|
||||
{% set buildingLabels = buildingLabels|merge([building.label]) %}
|
||||
{% endfor %}
|
||||
{% if buildingLabels %}
|
||||
<p><strong>Ferme</strong> : {{ buildingLabels|join(', ') }}</p>
|
||||
{% if reception.merchandiseType and reception.merchandiseType.code == 'AUTRES' and reception.merchandiseDetail %}
|
||||
<p><strong>Précision</strong> : {{ reception.merchandiseDetail }}</p>
|
||||
{% endif %}
|
||||
|
||||
{% if reception.merchandiseType and reception.merchandiseType.code == 'GRANULE' %}
|
||||
{% set pelletGroups = {} %}
|
||||
{% for selection in reception.pelletBuildings|default([]) %}
|
||||
{% 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 %}
|
||||
<p>Aucun bâtiment renseigné.</p>
|
||||
{% set buildingLabels = [] %}
|
||||
{% for building in reception.buildings|default([]) %}
|
||||
{% 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 %}
|
||||
{% endif %}
|
||||
</div>
|
||||
@@ -273,9 +287,9 @@
|
||||
<tr>
|
||||
<td style="width:60%; padding-right:8mm; vertical-align:top;">
|
||||
<div class="meta">
|
||||
Transporteur : <strong>{{ reception.carrier.name }}</strong><br>
|
||||
Mode de livraison : <strong>{{ reception.truck.name }}</strong><br>
|
||||
Immatriculation : <strong>{{ reception.licensePlate }}</strong><br><br>
|
||||
Transporteur : <strong>{{ reception.carrier ? reception.carrier.name : '-' }}</strong><br>
|
||||
Mode de livraison : <strong>{{ reception.truck ? reception.truck.name : '-' }}</strong><br>
|
||||
Immatriculation : <strong>{{ reception.licensePlate ?? '-' }}</strong><br><br>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user