Ajout historique des mouvements d'un matériel
This commit is contained in:
parent
08ce30c4cf
commit
385724cae5
40
historique.html
Normal file
40
historique.html
Normal file
@ -0,0 +1,40 @@
|
||||
{{:admin_header title="Historique des mouvements" current="module_equipment"}}
|
||||
|
||||
{{* barre de navigation *}}
|
||||
{{:include file="/%s/_nav.html"|args:$module.name current="index"}}
|
||||
|
||||
{{: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}}
|
||||
|
||||
<h3>Historique des mouvements de {{$equipment.designation}} ({{$category.name}})</h3>
|
||||
|
||||
{{* 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}}
|
@ -42,7 +42,9 @@
|
||||
<td>{{$stock}}</td>
|
||||
<td>{{$sortie}}</td>
|
||||
<td>{{$dispo}}</td>
|
||||
<td></td>
|
||||
<td class="actions">
|
||||
{{:linkbutton label="Historique des mouvements" href="historique.html?key=%s"|args:$equipment_key shape="table" target="_dialog"}}
|
||||
</td>
|
||||
</tr>
|
||||
{{else}}
|
||||
<p class="block alert">Il n'y a aucun matériel dans cette catégorie.</p>
|
||||
|
Loading…
Reference in New Issue
Block a user