From c1b9aa25c29dd21609f95c277ff1842acd41d38a Mon Sep 17 00:00:00 2001 From: Jean-Christophe Engel Date: Mon, 21 Oct 2024 11:02:47 +0200 Subject: [PATCH] calcul dispo : ajout condition date manquante --- _calcul_dispo.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/_calcul_dispo.html b/_calcul_dispo.html index 7ede91c..a1115e1 100644 --- a/_calcul_dispo.html +++ b/_calcul_dispo.html @@ -37,7 +37,13 @@ {{:include file="./_get_config.html" keep="config"}} {{* parcourir les mouvements et cumuler les entrées/sorties *}} -{{#load type="movement" where="$$.equipment IN %s"|args:$in_equipments assign="mvt"}} +{{if $date == null}} + {{:assign condition="$$.equipment IN %s"|args:$in_equipments}} +{{else}} + {{:assign condition="$$.equipment IN %s AND $$.date <= '%s'"|args:$in_equipments:$date}} +{{/if}} + +{{#load type="movement" where="%s"|args:$condition assign="mvt" order="$$.date ASC"}} {{* matériel propriété de l'asso en stock *}} {{:assign var="stock"