diff --git a/inventaire.html b/inventaire.html index 3f61fa0..b44a36f 100644 --- a/inventaire.html +++ b/inventaire.html @@ -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}} - {{:assign dispo="%d-%d"|math:$eqpmt.stock:$eqpmt.exterieur}} + {{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}} {{$eqpmt.designation}} {{$eqpmt.stock}} - {{if $eqpmt.exterieur == null}}0{{else}}{{$eqpmt.exterieur}}{{/if}} + {{$exterieur}} {{$dispo}} {{:linkbutton