equipment/historique.html

41 lines
1.2 KiB
HTML
Raw Normal View History

2023-12-04 10:56:36 +01:00
{{#restrict section="accounting" level="read"}}
{{:admin_header title="Historique des mouvements" current="module_equipment"}}
{{:assign equipment_key=$_GET.key|trim}}
{{#load key=$_GET.key assign="equipment"}}
{{else}}
{{:error message="Pas de matériel avec la clé %s"|args:$equipment_key}}
{{/load}}
{{#load type="category" where="key = :cle" :cle=$equipment.category assign="category"}}
{{else}}
{{:error message="Le matériel %s n'appartient à aucune catégorie"|args:$equipment.designation}}
{{/load}}
2023-11-29 14:36:44 +01:00
<header class="header">
<h1>Historique des mouvements de {{$equipment.designation}} ({{$category.name}})</h1>
</header>
{{* lister tous les mouvements du matériel passé en paramètre *}}
{{#list
type="movement"
select="$$.date AS 'Date';
$$.direction AS 'Mvt';
CASE $$.direction WHEN 'entrée' THEN $$.inputNature WHEN 'sortie' THEN $$.outputNature END AS 'Type';
$$.amount AS 'Nombre';
$$.comment AS 'Commentaire'"
equipment=$equipment_key
order=1
}}
<tr>
<td>{{$date|date_short}}</td>
<td>{{$direction}}</td>
<td>{{$col3}}</td>
<td>{{$amount}}</td>
<td>{{$comment}}</td>
<td></td>
</tr>
{{/list}}
{{:admin_footer}}