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}}
|
||||
{{#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}}
|
||||
|
190
inventaire.html
190
inventaire.html
@ -7,10 +7,12 @@
|
||||
|
||||
{{* Afficher les résultats *}}
|
||||
{{if $equipments === null}}
|
||||
<p class="block alert">Aucun matériel.</p>
|
||||
<p class="block alert">Aucun matériel.</p>
|
||||
{{else}}
|
||||
<section class="inventaire">
|
||||
<h2 class="ruler">Matériels dont l'association est propriétaire</h2>
|
||||
<details class="inventaire" open="open">
|
||||
<summary>
|
||||
<h2>Matériels dont l'association est propriétaire</h2>
|
||||
</summary>
|
||||
|
||||
{{* itérer sur les catégories *}}
|
||||
{{#foreach from=$cumul_mvt key="cat_key" item="cat_elem"}}
|
||||
@ -25,62 +27,71 @@
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
|
||||
{{if $present}}
|
||||
{{if $print_cat_name}}
|
||||
<h3>{{$cat_elem.name}}</h3>
|
||||
<details class="inventaire" open="open">
|
||||
<summary>
|
||||
<h3>{{$cat_elem.name}}</h3>
|
||||
{{/if}}
|
||||
</summary>
|
||||
|
||||
<table class="list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Désignation</th>
|
||||
<th>Stock</th>
|
||||
<th>Sortie</th>
|
||||
<th>Disponible</th>
|
||||
<th class="actions"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
{{* itérer sur les matériels de la catégorie *}}
|
||||
{{#foreach from=$cat_elem.eqpmt key="eqpmt_key" item="eqpmt"}}
|
||||
{{:assign keys=$eqpmt|keys}}
|
||||
{{if "stock"|in:$keys && $eqpmt.stock !== 0}}
|
||||
{{if "exterieur"|in:$keys}}
|
||||
{{:assign dispo="%d-%d"|math:$eqpmt.stock:$eqpmt.exterieur}}
|
||||
{{:assign exterieur=$eqpmt.exterieur}}
|
||||
{{else}}
|
||||
{{:assign dispo=$eqpmt.stock}}
|
||||
{{:assign exterieur=0}}
|
||||
{{/if}}
|
||||
<table class="list">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>{{$eqpmt.designation}}</td>
|
||||
<td>{{$eqpmt.stock}}</td>
|
||||
<td>{{$exterieur}}</td>
|
||||
<td>{{$dispo}}</td>
|
||||
<td class="actions">
|
||||
{{:linkbutton
|
||||
label="Historique des mouvements"
|
||||
href="%shistorique.html?key=%s&prop=1"|args:$module.url:$eqpmt_key
|
||||
shape="table"
|
||||
target="_dialog"}}
|
||||
{{:linkbutton
|
||||
label="Modifier"
|
||||
href="%smodifier_materiel.html?key=%s"|args:$module.url:$eqpmt_key
|
||||
shape="edit"
|
||||
target="_dialog"}}
|
||||
</td>
|
||||
<th>Désignation</th>
|
||||
<th>Stock</th>
|
||||
<th>Sortie</th>
|
||||
<th>Disponible</th>
|
||||
<th class="actions"></th>
|
||||
</tr>
|
||||
{{/if}}
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
{{* itérer sur les matériels de la catégorie *}}
|
||||
{{#foreach from=$cat_elem.eqpmt key="eqpmt_key" item="eqpmt"}}
|
||||
{{:assign keys=$eqpmt|keys}}
|
||||
{{if "stock"|in:$keys && $eqpmt.stock !== 0}}
|
||||
{{if "exterieur"|in:$keys}}
|
||||
{{:assign dispo="%d-%d"|math:$eqpmt.stock:$eqpmt.exterieur}}
|
||||
{{:assign exterieur=$eqpmt.exterieur}}
|
||||
{{else}}
|
||||
<p class="block alert">Il n'y a aucun matériel dans cette catégorie.</p>
|
||||
{{/foreach}}
|
||||
</tbody>
|
||||
</table>
|
||||
{{:assign dispo=$eqpmt.stock}}
|
||||
{{:assign exterieur=0}}
|
||||
{{/if}}
|
||||
<tr>
|
||||
<td>{{$eqpmt.designation}}</td>
|
||||
<td>{{$eqpmt.stock}}</td>
|
||||
<td>{{$exterieur}}</td>
|
||||
<td>{{$dispo}}</td>
|
||||
<td class="actions">
|
||||
{{:linkbutton
|
||||
label="Mouvements"
|
||||
href="%shistorique.html?key=%s&prop=1"|args:$module.url:$eqpmt_key
|
||||
shape="table"
|
||||
target="_dialog"}}
|
||||
{{:linkbutton
|
||||
label="Modifier"
|
||||
href="%smodifier_materiel.html?key=%s"|args:$module.url:$eqpmt_key
|
||||
shape="edit"
|
||||
target="_dialog"}}
|
||||
</td>
|
||||
</tr>
|
||||
{{/if}}
|
||||
{{else}}
|
||||
<p class="block alert">Il n'y a aucun matériel dans cette catégorie.</p>
|
||||
{{/foreach}}
|
||||
</tbody>
|
||||
</table>
|
||||
</details>
|
||||
{{/if}}
|
||||
{{/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 *}}
|
||||
{{#foreach from=$cumul_mvt key="cat_key" item="cat_elem"}}
|
||||
@ -95,51 +106,54 @@
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
|
||||
{{if $present}}
|
||||
|
||||
{{if $print_cat_name}}
|
||||
<h3>{{$cat_elem.name}}</h3>
|
||||
<details class="inventaire" open="open">
|
||||
<summary>
|
||||
<h3>{{$cat_elem.name}}</h3>
|
||||
{{/if}}
|
||||
</summary>
|
||||
|
||||
<table class="list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Désignation</th>
|
||||
<th>Quantité</th>
|
||||
<th class="actions"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
{{* itérer sur les matériels de la catégorie *}}
|
||||
{{#foreach from=$cat_elem.eqpmt key="eqpmt_key" item="eqpmt"}}
|
||||
|
||||
{{:assign keys=$eqpmt|keys}}
|
||||
{{if "nonproprio"|in:$keys && $eqpmt.nonproprio !== 0}}
|
||||
{{:assign dispo="%d-%d"|math:$eqpmt.stock:$eqpmt.exterieur}}
|
||||
<table class="list">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>{{$eqpmt.designation}}</td>
|
||||
<td>{{$eqpmt.nonproprio}}</td>
|
||||
<td class="actions">
|
||||
{{:linkbutton
|
||||
label="Historique des mouvements"
|
||||
href="%shistorique.html?key=%s"|args:$module.url:$eqpmt_key
|
||||
shape="table"
|
||||
target="_dialog"}}
|
||||
{{:linkbutton
|
||||
label="Modifier"
|
||||
href="%smodifier_materiel.html?key=%s"|args:$module.url:$eqpmt_key
|
||||
shape="edit"
|
||||
target="_dialog"}}
|
||||
</td>
|
||||
<th>Désignation</th>
|
||||
<th>Quantité</th>
|
||||
<th class="actions"></th>
|
||||
</tr>
|
||||
{{/if}}
|
||||
{{else}}
|
||||
<p class="block alert">Il n'y a aucun matériel dans cette catégorie.</p>
|
||||
{{/foreach}}
|
||||
</tbody>
|
||||
</table>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
{{* itérer sur les matériels de la catégorie *}}
|
||||
{{#foreach from=$cat_elem.eqpmt key="eqpmt_key" item="eqpmt"}}
|
||||
{{:assign keys=$eqpmt|keys}}
|
||||
{{if "nonproprio"|in:$keys && $eqpmt.nonproprio !== 0}}
|
||||
{{:assign dispo="%d-%d"|math:$eqpmt.stock:$eqpmt.exterieur}}
|
||||
<tr>
|
||||
<td>{{$eqpmt.designation}}</td>
|
||||
<td>{{$eqpmt.nonproprio}}</td>
|
||||
<td class="actions">
|
||||
{{:linkbutton
|
||||
label="Mouvements"
|
||||
href="%shistorique.html?key=%s"|args:$module.url:$eqpmt_key
|
||||
shape="table"
|
||||
target="_dialog"}}
|
||||
{{:linkbutton
|
||||
label="Modifier"
|
||||
href="%smodifier_materiel.html?key=%s"|args:$module.url:$eqpmt_key
|
||||
shape="edit"
|
||||
target="_dialog"}}
|
||||
</td>
|
||||
</tr>
|
||||
{{/if}}
|
||||
{{else}}
|
||||
<p class="block alert">Il n'y a aucun matériel dans cette catégorie.</p>
|
||||
{{/foreach}}
|
||||
</tbody>
|
||||
</table>
|
||||
</details>
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
</section>
|
||||
</details>
|
||||
{{/if}}
|
||||
|
Loading…
Reference in New Issue
Block a user