Ajout opérations lignes historique

This commit is contained in:
Jean-Christophe Engel 2024-10-24 10:15:56 +02:00
parent 8454c15225
commit 84fb29c15d
2 changed files with 166 additions and 92 deletions

View file

@ -1,3 +1,5 @@
{{* -*- brindille -*- *}}
{{:assign equipment_key=$_GET.key|trim}}
{{#load key=$_GET.key assign="equipment"}}
{{else}}
@ -46,14 +48,16 @@
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';
CASE $$.direction WHEN 'input' THEN $$.input_nature WHEN 'output' THEN $$.output_nature END AS 'operation';
$$.amount AS 'Nombre';
$$.comment AS 'Commentaire'"
equipment=$equipment_key
order=1
}}
{{if $direction === "input" && $input_nature|in:$input_types ||
$direction === "output" && $output_nature|in:$output_types
{{:assign var="type_mvt" from="config.%s_nature.%s"|args:$direction:$col3}}
{{if $direction === "input" && $input_nature|in:$input_types ||
$direction === "output"&& $output_nature|in:$output_types
}}
<tr>
<td>{{$date|date_short}}</td>
@ -61,7 +65,63 @@
<td>{{$col3}}</td>
<td>{{$amount}}</td>
<td>{{$comment}}</td>
<td></td>
<td class="actions">
{{if $direction === "input"}}
{{* entrée *}}
{{if $type_mvt == 'temporaire'}}
{{:linkbutton
label="Retour"
href="mouvements/sorties/emprunte.html?key=%s"|args:$key
shape="history"
target="_dialog"}}
{{elseif $type_mvt == 'définitif'}}
{{:linkbutton
label="Sortir"
href="mouvements/sorties/stock_disponible.html?key=%s"|args:$key
shape="minus"
target="_dialog"}}
{{/if}}
{{:linkbutton
label="Dupliquer"
href="mouvements/dupliquer_mouvement.html?mvt_key=%s&direction=input"|args:$key
shape="plus"
target="_dialog"}}
{{:linkbutton
label="Modifier"
href="mouvements/modifier_mouvement.html?key=%s&direction=input"|args:$key
shape="edit"
target="_dialog"}}
{{:linkbutton
label="Supprimer"
href="mouvements/entrees/delete_entree.html?key=%s"|args:$key
shape="delete"
target="_dialog"}}
{{else}}
{{* sortie *}}
{{if $type_mvt == 'temporaire'}}
{{:linkbutton
label="Retour"
href="mouvements/entrees/retour.html?key=%s"|args:key
shape="history"
target="_dialog"}}
{{/if}}
{{:linkbutton
label="Dupliquer"
href="mouvements/dupliquer_mouvement.html?mvt_key=%s&direction=output"|args:$key
shape="plus"
target="_dialog"}}
{{:linkbutton
label="Modifier"
href="mouvements/modifier_mouvement.html?key=%s&direction=output"|args:$key
shape="edit"
target="_dialog"}}
{{:linkbutton
label="Supprimer"
href="mouvements/sorties/delete_sortie.html?key=%s"|args:$key
shape="delete"
target="_dialog"}}
{{/if}}
</td>
</tr>
{{/if}}
{{/list}}