- {% if reception.merchandiseType and reception.merchandiseType.code == 'AUTRES' and reception.merchandiseDetail %}
-
Précision : {{ reception.merchandiseDetail }}
- {% 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 %}
-
{{ pelletLabel }} : {{ buildingLabels|join(', ') }}
+ {% if reception.receptionType and reception.receptionType.code == 'BOVINS' %}
+ {% if reception.bovinesTypes is not empty %}
+ {% for entry in reception.bovinesTypes %}
+
+ {{ entry.bovineType ? entry.bovineType.label : '-' }} : {{ entry.quantity ?? 0 }}
+
+ {% endfor %}
{% else %}
-
Aucun dépôt de granulés renseigné.
- {% endfor %}
+
-
+ {% endif %}
+
+ {% if reception.bovineDetail %}
+
Autres : {{ reception.bovineDetail }}
+ {% endif %}
{% else %}
- {% set buildingLabels = [] %}
- {% for building in reception.buildings %}
- {% set buildingLabels = buildingLabels|merge([building.label]) %}
- {% endfor %}
- {% if buildingLabels %}
-
Ferme : {{ buildingLabels|join(', ') }}
+ {% if reception.merchandiseType and reception.merchandiseType.code == 'AUTRES' and reception.merchandiseDetail %}
+
Précision : {{ reception.merchandiseDetail }}
+ {% 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 %}
+
{{ pelletLabel }} : {{ buildingLabels|join(', ') }}
+ {% else %}
+
Aucun dépôt de granulés renseigné.
+ {% endfor %}
{% else %}
-
Aucun bâtiment renseigné.
+ {% set buildingLabels = [] %}
+ {% for building in reception.buildings|default([]) %}
+ {% set buildingLabels = buildingLabels|merge([building.label]) %}
+ {% endfor %}
+ {% if buildingLabels %}
+
Ferme : {{ buildingLabels|join(', ') }}
+ {% else %}
+
Aucun bâtiment renseigné.
+ {% endif %}
{% endif %}
{% endif %}
@@ -273,9 +287,9 @@