Correction bug affichage matériel à l'extérieur

This commit is contained in:
Jean-Christophe Engel 2023-12-07 22:14:00 +01:00
parent 2bf414fcf3
commit 3b4687647d

View File

@ -47,14 +47,19 @@
{{* itérer sur les matériels de la catégorie *}}
{{#foreach from=$cat_elem.eqpmt key="eqpmt_key" item="eqpmt"}}
{{:assign keys=$eqpmt|keys}}
{{if "stock"|in:$keys && $eqpmt.stock !== 0}}
{{if "exterieur"|in:$keys}}
{{:assign dispo="%d-%d"|math:$eqpmt.stock:$eqpmt.exterieur}}
{{:assign exterieur=$eqpmt.exterieur}}
{{else}}
{{:assign dispo=$eqpmt.stock}}
{{:assign exterieur=0}}
{{/if}}
<tr>
<td>{{$eqpmt.designation}}</td>
<td>{{$eqpmt.stock}}</td>
<td>{{if $eqpmt.exterieur == null}}0{{else}}{{$eqpmt.exterieur}}{{/if}}</td>
<td>{{$exterieur}}</td>
<td>{{$dispo}}</td>
<td class="actions">
{{:linkbutton