From 3b4687647da3a9e38db65ec8598604e4d7e256b8 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Engel Date: Thu, 7 Dec 2023 22:14:00 +0100 Subject: [PATCH] =?UTF-8?q?Correction=20bug=20affichage=20mat=C3=A9riel=20?= =?UTF-8?q?=C3=A0=20l'ext=C3=A9rieur?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- inventaire.html | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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