2024-03-26 17:58:24 +01:00
|
|
|
{{* -*- brindille -*- *}}
|
|
|
|
|
2023-12-07 20:30:32 +01:00
|
|
|
{{* inventaire des entrées/sorties des matériels des catégories de la variable category_keys *}}
|
2023-11-17 11:15:26 +01:00
|
|
|
|
|
|
|
{{* Extraire et compiler les infos de la base *}}
|
2024-03-26 17:58:24 +01:00
|
|
|
{{:include file="./_calcul_dispo.html" keep="cumul_mvt,category_keys,equipments"}}
|
2023-11-17 11:15:26 +01:00
|
|
|
|
|
|
|
{{* Afficher les résultats *}}
|
2024-03-26 17:58:24 +01:00
|
|
|
{{if $equipments === null}}
|
|
|
|
<p class="block alert">Aucun matériel.</p>
|
2023-11-17 11:15:26 +01:00
|
|
|
{{else}}
|
2023-12-06 09:59:11 +01:00
|
|
|
<section class="inventaire">
|
|
|
|
<h2 class="ruler">Matériels dont l'association est propriétaire</h2>
|
|
|
|
|
|
|
|
{{* itérer sur les catégories *}}
|
2023-12-07 17:33:49 +01:00
|
|
|
{{#foreach from=$cumul_mvt key="cat_key" item="cat_elem"}}
|
|
|
|
|
2023-12-06 09:59:11 +01:00
|
|
|
{{* vérifier s'il y a des matériels dans cette catégorie *}}
|
|
|
|
{{:assign present=false}}
|
2023-12-07 20:30:32 +01:00
|
|
|
{{if $cat_elem|keys|has:"eqpmt"}}
|
2024-03-25 20:57:19 +01:00
|
|
|
{{#foreach from=$cat_elem.eqpmt key="eqpmt_key" item="eqpmt"}}
|
2023-12-07 20:30:32 +01:00
|
|
|
{{if $eqpmt.stock !== null && $eqpmt.stock !== 0}}
|
|
|
|
{{:assign present=true}}
|
|
|
|
{{:break}}
|
|
|
|
{{/if}}
|
|
|
|
{{/foreach}}
|
|
|
|
{{/if}}
|
2023-12-06 09:59:11 +01:00
|
|
|
{{if $present}}
|
2024-03-26 17:58:24 +01:00
|
|
|
{{if $print_cat_name}}
|
|
|
|
<h3>{{$cat_elem.name}}</h3>
|
|
|
|
{{/if}}
|
|
|
|
|
2023-12-06 09:59:11 +01:00
|
|
|
<table class="list">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Désignation</th>
|
|
|
|
<th>Stock</th>
|
|
|
|
<th>Sortie</th>
|
|
|
|
<th>Disponible</th>
|
|
|
|
<th class="actions"></th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
|
|
{{* itérer sur les matériels de la catégorie *}}
|
2023-12-07 17:33:49 +01:00
|
|
|
{{#foreach from=$cat_elem.eqpmt key="eqpmt_key" item="eqpmt"}}
|
2023-12-06 09:59:11 +01:00
|
|
|
{{:assign keys=$eqpmt|keys}}
|
|
|
|
{{if "stock"|in:$keys && $eqpmt.stock !== 0}}
|
2023-12-07 22:14:00 +01:00
|
|
|
{{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}}
|
2023-12-06 09:59:11 +01:00
|
|
|
<tr>
|
|
|
|
<td>{{$eqpmt.designation}}</td>
|
|
|
|
<td>{{$eqpmt.stock}}</td>
|
2023-12-07 22:14:00 +01:00
|
|
|
<td>{{$exterieur}}</td>
|
2023-12-06 09:59:11 +01:00
|
|
|
<td>{{$dispo}}</td>
|
|
|
|
<td class="actions">
|
|
|
|
{{:linkbutton
|
|
|
|
label="Historique des mouvements"
|
2024-10-18 17:15:56 +02:00
|
|
|
href="%shistorique.html?key=%s&prop=1"|args:$module.url:$eqpmt_key
|
2023-12-06 09:59:11 +01:00
|
|
|
shape="table"
|
|
|
|
target="_dialog"}}
|
|
|
|
{{:linkbutton
|
|
|
|
label="Modifier"
|
|
|
|
href="%smodifier_materiel.html?key=%s"|args:$module.url:$eqpmt_key
|
|
|
|
shape="edit"
|
|
|
|
target="_dialog"}}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{{/if}}
|
|
|
|
{{else}}
|
|
|
|
<p class="block alert">Il n'y a aucun matériel dans cette catégorie.</p>
|
|
|
|
{{/foreach}}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
{{/if}}
|
|
|
|
{{/foreach}}
|
|
|
|
|
|
|
|
<h2 class="ruler">Matériels dont l'association n'est pas propriétaire</h2>
|
|
|
|
|
|
|
|
{{* itérer sur les catégories *}}
|
2023-12-07 17:33:49 +01:00
|
|
|
{{#foreach from=$cumul_mvt key="cat_key" item="cat_elem"}}
|
|
|
|
|
2023-12-06 09:59:11 +01:00
|
|
|
{{* vérifier s'il y a des matériels dans cette catégorie *}}
|
|
|
|
{{:assign present=false}}
|
2023-12-07 20:30:32 +01:00
|
|
|
{{if $cat_elem|keys|has:"eqpmt"}}
|
2024-03-26 17:58:24 +01:00
|
|
|
{{#foreach from=$cat_elem.eqpmt key="eqpmt_key" item="eqpmt"}}
|
2023-12-07 20:30:32 +01:00
|
|
|
{{if $eqpmt.nonproprio !== null && $eqpmt.nonproprio !== 0}}
|
|
|
|
{{:assign present=true}}
|
|
|
|
{{:break}}
|
|
|
|
{{/if}}
|
|
|
|
{{/foreach}}
|
|
|
|
{{/if}}
|
2023-12-06 09:59:11 +01:00
|
|
|
{{if $present}}
|
2024-03-26 17:58:24 +01:00
|
|
|
|
|
|
|
{{if $print_cat_name}}
|
|
|
|
<h3>{{$cat_elem.name}}</h3>
|
|
|
|
{{/if}}
|
|
|
|
|
2023-12-06 09:59:11 +01:00
|
|
|
<table class="list">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Désignation</th>
|
|
|
|
<th>Quantité</th>
|
|
|
|
<th class="actions"></th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
|
|
{{* itérer sur les matériels de la catégorie *}}
|
2023-12-07 17:33:49 +01:00
|
|
|
{{#foreach from=$cat_elem.eqpmt key="eqpmt_key" item="eqpmt"}}
|
2023-12-06 09:59:11 +01:00
|
|
|
|
|
|
|
{{:assign keys=$eqpmt|keys}}
|
|
|
|
{{if "nonproprio"|in:$keys && $eqpmt.nonproprio !== 0}}
|
|
|
|
{{:assign dispo="%d-%d"|math:$eqpmt.stock:$eqpmt.exterieur}}
|
|
|
|
<tr>
|
|
|
|
<td>{{$eqpmt.designation}}</td>
|
|
|
|
<td>{{$eqpmt.nonproprio}}</td>
|
|
|
|
<td class="actions">
|
|
|
|
{{:linkbutton
|
|
|
|
label="Historique des mouvements"
|
|
|
|
href="%shistorique.html?key=%s"|args:$module.url:$eqpmt_key
|
|
|
|
shape="table"
|
|
|
|
target="_dialog"}}
|
|
|
|
{{:linkbutton
|
|
|
|
label="Modifier"
|
|
|
|
href="%smodifier_materiel.html?key=%s"|args:$module.url:$eqpmt_key
|
|
|
|
shape="edit"
|
|
|
|
target="_dialog"}}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{{/if}}
|
|
|
|
{{else}}
|
|
|
|
<p class="block alert">Il n'y a aucun matériel dans cette catégorie.</p>
|
|
|
|
{{/foreach}}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
{{/if}}
|
|
|
|
{{/foreach}}
|
|
|
|
</section>
|
2023-11-17 11:15:26 +01:00
|
|
|
{{/if}}
|