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,14 +48,16 @@
|
||||||
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
|
||||||
}}
|
}}
|
||||||
{{if $direction === "input" && $input_nature|in:$input_types ||
|
{{:assign var="type_mvt" from="config.%s_nature.%s"|args:$direction:$col3}}
|
||||||
$direction === "output" && $output_nature|in:$output_types
|
|
||||||
|
{{if $direction === "input" && $input_nature|in:$input_types ||
|
||||||
|
$direction === "output"&& $output_nature|in:$output_types
|
||||||
}}
|
}}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{$date|date_short}}</td>
|
<td>{{$date|date_short}}</td>
|
||||||
|
@ -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}}
|
||||||
|
|
190
inventaire.html
190
inventaire.html
|
@ -7,10 +7,12 @@
|
||||||
|
|
||||||
{{* Afficher les résultats *}}
|
{{* Afficher les résultats *}}
|
||||||
{{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,62 +27,71 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{if $present}}
|
{{if $present}}
|
||||||
{{if $print_cat_name}}
|
{{if $print_cat_name}}
|
||||||
<h3>{{$cat_elem.name}}</h3>
|
<details class="inventaire" open="open">
|
||||||
|
<summary>
|
||||||
|
<h3>{{$cat_elem.name}}</h3>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
</summary>
|
||||||
|
|
||||||
<table class="list">
|
<table class="list">
|
||||||
<thead>
|
<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}}
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{$eqpmt.designation}}</td>
|
<th>Désignation</th>
|
||||||
<td>{{$eqpmt.stock}}</td>
|
<th>Stock</th>
|
||||||
<td>{{$exterieur}}</td>
|
<th>Sortie</th>
|
||||||
<td>{{$dispo}}</td>
|
<th>Disponible</th>
|
||||||
<td class="actions">
|
<th class="actions"></th>
|
||||||
{{: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>
|
|
||||||
</tr>
|
</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}}
|
{{else}}
|
||||||
<p class="block alert">Il n'y a aucun matériel dans cette catégorie.</p>
|
{{:assign dispo=$eqpmt.stock}}
|
||||||
{{/foreach}}
|
{{:assign exterieur=0}}
|
||||||
</tbody>
|
{{/if}}
|
||||||
</table>
|
<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}}
|
{{/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,51 +106,54 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{if $present}}
|
{{if $present}}
|
||||||
|
|
||||||
{{if $print_cat_name}}
|
{{if $print_cat_name}}
|
||||||
<h3>{{$cat_elem.name}}</h3>
|
<details class="inventaire" open="open">
|
||||||
|
<summary>
|
||||||
|
<h3>{{$cat_elem.name}}</h3>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
</summary>
|
||||||
|
|
||||||
<table class="list">
|
<table class="list">
|
||||||
<thead>
|
<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}}
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{$eqpmt.designation}}</td>
|
<th>Désignation</th>
|
||||||
<td>{{$eqpmt.nonproprio}}</td>
|
<th>Quantité</th>
|
||||||
<td class="actions">
|
<th class="actions"></th>
|
||||||
{{: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>
|
|
||||||
</tr>
|
</tr>
|
||||||
{{/if}}
|
</thead>
|
||||||
{{else}}
|
<tbody>
|
||||||
<p class="block alert">Il n'y a aucun matériel dans cette catégorie.</p>
|
|
||||||
{{/foreach}}
|
{{* itérer sur les matériels de la catégorie *}}
|
||||||
</tbody>
|
{{#foreach from=$cat_elem.eqpmt key="eqpmt_key" item="eqpmt"}}
|
||||||
</table>
|
{{: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}}
|
{{/if}}
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
</section>
|
</details>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
Loading…
Reference in New Issue