Ajout opérations lignes historique
This commit is contained in:
parent
8454c15225
commit
84fb29c15d
@ -1,3 +1,5 @@
|
|||||||
|
{{* -*- brindille -*- *}}
|
||||||
|
|
||||||
{{:assign equipment_key=$_GET.key|trim}}
|
{{:assign equipment_key=$_GET.key|trim}}
|
||||||
{{#load key=$_GET.key assign="equipment"}}
|
{{#load key=$_GET.key assign="equipment"}}
|
||||||
{{else}}
|
{{else}}
|
||||||
@ -46,12 +48,14 @@
|
|||||||
type="movement"
|
type="movement"
|
||||||
select="$$.date AS 'Date';
|
select="$$.date AS 'Date';
|
||||||
CASE $$.direction WHEN 'input' THEN 'Entrée' WHEN 'output' THEN 'Sortie' END AS 'Mvt';
|
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';
|
$$.amount AS 'Nombre';
|
||||||
$$.comment AS 'Commentaire'"
|
$$.comment AS 'Commentaire'"
|
||||||
equipment=$equipment_key
|
equipment=$equipment_key
|
||||||
order=1
|
order=1
|
||||||
}}
|
}}
|
||||||
|
{{:assign var="type_mvt" from="config.%s_nature.%s"|args:$direction:$col3}}
|
||||||
|
|
||||||
{{if $direction === "input" && $input_nature|in:$input_types ||
|
{{if $direction === "input" && $input_nature|in:$input_types ||
|
||||||
$direction === "output"&& $output_nature|in:$output_types
|
$direction === "output"&& $output_nature|in:$output_types
|
||||||
}}
|
}}
|
||||||
@ -61,7 +65,63 @@
|
|||||||
<td>{{$col3}}</td>
|
<td>{{$col3}}</td>
|
||||||
<td>{{$amount}}</td>
|
<td>{{$amount}}</td>
|
||||||
<td>{{$comment}}</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>
|
</tr>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/list}}
|
{{/list}}
|
||||||
|
@ -9,8 +9,10 @@
|
|||||||
{{if $equipments === null}}
|
{{if $equipments === null}}
|
||||||
<p class="block alert">Aucun matériel.</p>
|
<p class="block alert">Aucun matériel.</p>
|
||||||
{{else}}
|
{{else}}
|
||||||
<section class="inventaire">
|
<details class="inventaire" open="open">
|
||||||
<h2 class="ruler">Matériels dont l'association est propriétaire</h2>
|
<summary>
|
||||||
|
<h2>Matériels dont l'association est propriétaire</h2>
|
||||||
|
</summary>
|
||||||
|
|
||||||
{{* itérer sur les catégories *}}
|
{{* itérer sur les catégories *}}
|
||||||
{{#foreach from=$cumul_mvt key="cat_key" item="cat_elem"}}
|
{{#foreach from=$cumul_mvt key="cat_key" item="cat_elem"}}
|
||||||
@ -25,10 +27,14 @@
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{if $present}}
|
{{if $present}}
|
||||||
{{if $print_cat_name}}
|
{{if $print_cat_name}}
|
||||||
|
<details class="inventaire" open="open">
|
||||||
|
<summary>
|
||||||
<h3>{{$cat_elem.name}}</h3>
|
<h3>{{$cat_elem.name}}</h3>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
</summary>
|
||||||
|
|
||||||
<table class="list">
|
<table class="list">
|
||||||
<thead>
|
<thead>
|
||||||
@ -60,7 +66,7 @@
|
|||||||
<td>{{$dispo}}</td>
|
<td>{{$dispo}}</td>
|
||||||
<td class="actions">
|
<td class="actions">
|
||||||
{{:linkbutton
|
{{:linkbutton
|
||||||
label="Historique des mouvements"
|
label="Mouvements"
|
||||||
href="%shistorique.html?key=%s&prop=1"|args:$module.url:$eqpmt_key
|
href="%shistorique.html?key=%s&prop=1"|args:$module.url:$eqpmt_key
|
||||||
shape="table"
|
shape="table"
|
||||||
target="_dialog"}}
|
target="_dialog"}}
|
||||||
@ -77,10 +83,15 @@
|
|||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
</details>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
|
</details>
|
||||||
|
|
||||||
<h2 class="ruler">Matériels dont l'association n'est pas propriétaire</h2>
|
<details class="inventaire" open="open">
|
||||||
|
<summary>
|
||||||
|
<h2>Matériels dont l'association n'est pas propriétaire</h2>
|
||||||
|
</summary>
|
||||||
|
|
||||||
{{* itérer sur les catégories *}}
|
{{* itérer sur les catégories *}}
|
||||||
{{#foreach from=$cumul_mvt key="cat_key" item="cat_elem"}}
|
{{#foreach from=$cumul_mvt key="cat_key" item="cat_elem"}}
|
||||||
@ -95,11 +106,14 @@
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{if $present}}
|
|
||||||
|
|
||||||
|
{{if $present}}
|
||||||
{{if $print_cat_name}}
|
{{if $print_cat_name}}
|
||||||
|
<details class="inventaire" open="open">
|
||||||
|
<summary>
|
||||||
<h3>{{$cat_elem.name}}</h3>
|
<h3>{{$cat_elem.name}}</h3>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
</summary>
|
||||||
|
|
||||||
<table class="list">
|
<table class="list">
|
||||||
<thead>
|
<thead>
|
||||||
@ -113,7 +127,6 @@
|
|||||||
|
|
||||||
{{* itérer sur les matériels de la catégorie *}}
|
{{* itérer sur les matériels de la catégorie *}}
|
||||||
{{#foreach from=$cat_elem.eqpmt key="eqpmt_key" item="eqpmt"}}
|
{{#foreach from=$cat_elem.eqpmt key="eqpmt_key" item="eqpmt"}}
|
||||||
|
|
||||||
{{:assign keys=$eqpmt|keys}}
|
{{:assign keys=$eqpmt|keys}}
|
||||||
{{if "nonproprio"|in:$keys && $eqpmt.nonproprio !== 0}}
|
{{if "nonproprio"|in:$keys && $eqpmt.nonproprio !== 0}}
|
||||||
{{:assign dispo="%d-%d"|math:$eqpmt.stock:$eqpmt.exterieur}}
|
{{:assign dispo="%d-%d"|math:$eqpmt.stock:$eqpmt.exterieur}}
|
||||||
@ -122,7 +135,7 @@
|
|||||||
<td>{{$eqpmt.nonproprio}}</td>
|
<td>{{$eqpmt.nonproprio}}</td>
|
||||||
<td class="actions">
|
<td class="actions">
|
||||||
{{:linkbutton
|
{{:linkbutton
|
||||||
label="Historique des mouvements"
|
label="Mouvements"
|
||||||
href="%shistorique.html?key=%s"|args:$module.url:$eqpmt_key
|
href="%shistorique.html?key=%s"|args:$module.url:$eqpmt_key
|
||||||
shape="table"
|
shape="table"
|
||||||
target="_dialog"}}
|
target="_dialog"}}
|
||||||
@ -139,7 +152,8 @@
|
|||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
</details>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
</section>
|
</details>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
Loading…
Reference in New Issue
Block a user