ajout historique global des mouvements

This commit is contained in:
Jean-Christophe Engel 2025-02-19 15:12:17 +01:00
parent dbbff606f6
commit 3e0f3159ae
2 changed files with 42 additions and 0 deletions

View File

@ -13,6 +13,7 @@
<ul>
<li {{if $current == 'inventaire'}} class="current"{{/if}}><a href="{{$module.url}}index.html?prop=1">Inventaire</a></li>
<li {{if $current == 'historique'}} class="current"{{/if}}><a href="{{$module.url}}global_history.html">Historique</a></li>
<li {{if $current == 'config'}} class="current"{{/if}}><a href="{{$module.url}}categories/index.html">Configuration</a></li>
</ul>

41
global_history.html Normal file
View File

@ -0,0 +1,41 @@
{{* -*- brindille -*- *}}
{{*
Afficher l'historique de tous les mouvements
*}}
{{:admin_header title="Gestion des matériels" current="module_equipment"}}
{{:include file="./_nav.html" current="historique"}}
{{* récupérer la config des entrées/sorties *}}
{{:include file="./_get_config.html" keep="config"}}
{{* lister tous les mouvements *}}
{{#list
type="movement"
select="$$.date AS 'Date';
CASE $$.direction WHEN 'input' THEN 'Entrée' WHEN 'output' THEN 'Sortie' END AS 'Mouvement';
$$.operation AS 'Opération';
(SELECT $$.name
FROM @TABLE AS b
WHERE b.key = @TABLE.$$.equipment) AS 'Matériel' ;
$$.amount AS 'Quantité';
$$.comment AS 'Commentaire'"
order=1
desc=true
}}
{{:assign var="op_label" from="config.%s_nature.%s.label"|args:$direction:$operation}}
<tr>
<td>{{$date|date_short}}</td>
<td>{{$col2}}</td>
<td>{{$op_label}}</td>
<td>{{$col4}}</td>
<td class="num">{{$amount}}</td>
<td>{{$comment}}</td>
<td></td>
</tr>
{{/list}}
{{:admin_footer}}