2024-03-26 17:58:24 +01:00
|
|
|
{{* -*- brindille -*- *}}
|
|
|
|
|
2024-11-14 16:21:10 +01:00
|
|
|
{{*
|
2024-11-16 10:26:48 +01:00
|
|
|
inventaire des entrées/sorties des matériels permanents
|
2024-11-14 16:21:10 +01:00
|
|
|
*}}
|
2023-11-17 11:15:26 +01:00
|
|
|
|
|
|
|
{{* Extraire et compiler les infos de la base *}}
|
2024-12-10 15:05:50 +01:00
|
|
|
{{:include file="./_calcul_dispo.html" keep="categories,equipments"}}
|
|
|
|
|
|
|
|
{{* Sélecteur catégories *}}
|
|
|
|
<fieldset class="shortForm" style="width: 30%;">
|
|
|
|
<legend>Filtrer par catégorie</legend>
|
|
|
|
<nav class="dropdown">
|
|
|
|
<ul>
|
|
|
|
<li><a></a></li>
|
|
|
|
<li{{if $_GET.cat_key == null}} class="selected"{{/if}}><a href="?prop=1">Toutes les catégories</a></li>
|
|
|
|
{{#foreach from=$categories key=key item=name}}
|
|
|
|
<li {{if $_GET.cat_key == $key}}class="selected"{{/if}}>
|
|
|
|
<a href="?cat_key={{$key}}&prop=1">
|
|
|
|
<strong>{{$name}}</strong>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{{/foreach}}
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
</fieldset>
|
2023-11-17 11:15:26 +01:00
|
|
|
|
2024-11-16 10:26:48 +01:00
|
|
|
{{* Vérifier s'il y a au moins un matériel propriété de l'asso *}}
|
2024-11-18 20:47:48 +01:00
|
|
|
{{:assign mat_present=false}}
|
2024-11-16 10:26:48 +01:00
|
|
|
{{#foreach from=$equipments key=key item=eqpmt}}
|
|
|
|
{{if $eqpmt|has_key:"stock"}}
|
2024-11-18 20:47:48 +01:00
|
|
|
{{:assign mat_present=true}}
|
2024-11-16 10:26:48 +01:00
|
|
|
{{:break}}
|
|
|
|
{{/if}}
|
|
|
|
{{/foreach}}
|
|
|
|
|
2024-11-18 20:47:48 +01:00
|
|
|
{{if $mat_present}}
|
2023-12-06 09:59:11 +01:00
|
|
|
|
2024-11-16 10:26:48 +01:00
|
|
|
<h2>Matériels propriété de l'association</h2>
|
2024-11-18 20:47:48 +01:00
|
|
|
|
2024-11-16 10:26:48 +01:00
|
|
|
{{#list
|
|
|
|
select="
|
2024-12-10 15:05:50 +01:00
|
|
|
$$.designation AS 'Matériel' ;
|
|
|
|
"" AS 'Catégorie' ;
|
2024-12-02 09:32:20 +01:00
|
|
|
"" AS 'Stock' ;
|
|
|
|
"" AS 'Sorti' ;
|
|
|
|
"" AS 'Dispo'
|
2024-11-16 10:26:48 +01:00
|
|
|
"
|
2024-12-10 15:05:50 +01:00
|
|
|
type="equipment"
|
2024-12-02 09:32:20 +01:00
|
|
|
order=1
|
2024-11-16 10:26:48 +01:00
|
|
|
}}
|
2024-12-10 15:05:50 +01:00
|
|
|
{{:assign var=eqpmt_key value=$key}}
|
|
|
|
{{:assign var=cat_key value=$category}}
|
|
|
|
{{:assign var=cat_name from=categories.%s|args:$cat_key}}
|
2024-10-28 09:53:29 +01:00
|
|
|
|
2024-11-16 10:26:48 +01:00
|
|
|
{{if $_GET.cat_key != null && $_GET.cat_key != $cat_key}}
|
|
|
|
{{:continue}}
|
|
|
|
{{/if}}
|
2024-10-28 09:53:29 +01:00
|
|
|
|
2024-12-10 15:05:50 +01:00
|
|
|
{{:assign var=stock from="equipments.%s.stock"|args:$eqpmt_key}}
|
|
|
|
{{:assign var=exterieur from="equipments.%s.exterieur"|args:$eqpmt_key}}
|
2024-11-16 10:26:48 +01:00
|
|
|
{{:assign dispo="%d-%d"|math:$stock:$exterieur}}
|
|
|
|
|
|
|
|
{{if $stock == null}}
|
|
|
|
{{:continue}}
|
|
|
|
{{/if}}
|
|
|
|
|
|
|
|
<tr>
|
2024-12-10 15:05:50 +01:00
|
|
|
<td>{{$designation}}</td>
|
2024-11-16 10:26:48 +01:00
|
|
|
<td>{{$cat_name}}</td>
|
|
|
|
<td>{{$stock}}</td>
|
|
|
|
<td>{{if $exterieur == null}}0{{else}}{{$exterieur}}{{/if}}</td>
|
|
|
|
<td>{{$dispo}}</td>
|
|
|
|
<td class="actions">
|
|
|
|
{{if $exterieur > 0}}
|
2024-11-15 20:26:29 +01:00
|
|
|
{{:linkbutton
|
2024-11-16 10:26:48 +01:00
|
|
|
label="Retour"
|
2024-12-10 15:05:50 +01:00
|
|
|
href="mouvements/entrees/retour.html?key=%s"|args:$eqpmt_key
|
2024-11-16 10:26:48 +01:00
|
|
|
shape="history"
|
|
|
|
target="_dialog"}}
|
|
|
|
{{/if}}
|
|
|
|
{{if $dispo > 0}}
|
2024-11-15 20:26:29 +01:00
|
|
|
{{:linkbutton
|
2024-11-16 10:26:48 +01:00
|
|
|
label="Sortie"
|
|
|
|
shape="plus"
|
2024-12-10 15:05:50 +01:00
|
|
|
href="mouvements/sorties/stock_disponible.html?key=%s"|args:$eqpmt_key
|
2024-11-16 10:26:48 +01:00
|
|
|
target="_dialog"}}
|
|
|
|
{{/if}}
|
|
|
|
{{:linkbutton
|
|
|
|
label="Entrée"
|
|
|
|
shape="plus"
|
2024-12-10 15:05:50 +01:00
|
|
|
href="mouvements/entrees/repertorie.html?key=%s"|args:$eqpmt_key
|
2024-11-16 10:26:48 +01:00
|
|
|
target="_dialog"}}
|
|
|
|
{{:linkbutton
|
|
|
|
label="Mouvements"
|
2024-12-10 15:05:50 +01:00
|
|
|
href="historique.html?key=%s&prop=1"|args:$eqpmt_key
|
2024-11-16 10:26:48 +01:00
|
|
|
shape="table"}}
|
|
|
|
{{:linkbutton
|
|
|
|
label="Modifier"
|
2024-12-10 15:05:50 +01:00
|
|
|
href="modifier_materiel.html?key=%s&prop=1"|args:$eqpmt_key
|
2024-11-16 10:26:48 +01:00
|
|
|
shape="edit"
|
|
|
|
target="_dialog"}}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{{/list}}
|
|
|
|
{{else}}
|
|
|
|
<p class="block alert">Aucun matériel.</p>
|
2023-11-17 11:15:26 +01:00
|
|
|
{{/if}}
|