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