equipment/mouvements/sorties/index.html

79 lines
2.4 KiB
HTML
Raw Normal View History

2023-12-04 11:01:08 +01:00
{{#restrict section="accounting" level="read"}}{{/restrict}}
2023-10-10 16:16:03 +02:00
{{:admin_header title="Gestion des matériels" current="module_equipment"}}
{{* barre de navigation *}}
2023-12-05 10:07:01 +01:00
{{:include file="../../_nav.html" current="sorties"}}
2023-10-10 16:16:03 +02:00
2023-10-19 14:54:03 +02:00
{{if $_GET.ok}}
2023-12-05 19:17:08 +01:00
{{if $_GET.msg|match:"suppression"}}
{{:assign msg="Sortie supprimée"}}
{{if $_GET.msg|match:"matériel"}}
{{:assign var="msg" value="%s - Matériel supprimé"|args:$msg}}
{{/if}}
{{elseif $_GET.msg == "sortie"}}
{{:assign msg="Sortie enregistrée"}}
{{elseif $_GET.msg == "modification"}}
{{:assign msg="Sortie modifiée"}}
{{/if}}
<p class="block confirm">{{$msg}}</p>
{{elseif $_GET.err}}
2023-12-05 19:17:08 +01:00
{{if $_GET.msg == "suppression"}}
<p class="block error">Impossible de supprimer la sortie</p>
{{/if}}
2023-10-19 14:54:03 +02:00
{{/if}}
<form method="post" action="">
<fieldset class="sortie">
<legend>Ajouter une sortie </legend>
2023-12-05 19:17:08 +01:00
<dl>
{{:linkbutton label="Matériel en stock disponible" shape="plus" href="stock_disponible.html" target="_dialog"}}
{{:linkbutton label="Matériel emprunté" shape="plus" href="emprunte.html" target="_dialog"}}
</dl>
2023-10-19 14:54:03 +02:00
</fieldset>
</form>
{{* lister les sorties *}}
2023-10-27 10:47:59 +02:00
<section class="liste_sorties">
2023-10-19 14:54:03 +02:00
<h2>Liste des sorties</h2>
2023-10-30 13:42:49 +01:00
{{#list
select="
$$.date AS 'Date' ;
2023-12-05 19:17:08 +01:00
$$.output_nature AS 'Type' ;
2023-10-30 13:42:49 +01:00
$$.amount AS 'Nombre' ;
(SELECT $$.designation
FROM @TABLE AS b
WHERE b.key = @TABLE.$$.equipment)
AS 'Matériel' ;
$$.comment AS 'Remarques'"
type="movement"
2023-12-05 19:17:08 +01:00
direction="output"
2023-10-30 13:42:49 +01:00
order=1}}
2023-10-19 14:54:03 +02:00
{{:assign var='mvt_key' value=$key}}
<tr>
<td>{{$date|date_short}}</td>
2023-12-05 19:17:08 +01:00
<td>{{$output_nature}}</td>
2023-10-19 14:54:03 +02:00
<td>{{$amount}}</td>
2023-10-30 13:42:49 +01:00
<td>{{$col4}}</td>
2023-10-19 14:54:03 +02:00
<td>{{$comment}}</td>
<td class="actions">
2023-10-30 13:42:49 +01:00
{{:linkbutton
label="Supprimer"
href="delete_sortie.html?key=%s"|args:$mvt_key
shape="delete"
target="_dialog"}}
{{:linkbutton
label="Modifier"
2023-12-05 19:17:08 +01:00
href="../modifier_mouvement.html?key=%s&direction=output&caller=%s"|args:$mvt_key:$request_url
shape="edit"
2023-10-30 13:42:49 +01:00
target="_dialog"}}
2023-10-19 14:54:03 +02:00
</td>
</tr>
2023-11-29 15:35:31 +01:00
{{else}}
<p class="block alert">Il n'y a aucune sortie.</p>
2023-10-19 14:54:03 +02:00
{{/list}}
</section>
2023-10-10 16:16:03 +02:00
{{:admin_footer}}