Désactivation boutons entrées/sorties
This commit is contained in:
parent
cb79af5157
commit
e52a4e6329
12
mouvements/entrees/_temporaire.html
Normal file
12
mouvements/entrees/_temporaire.html
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{{* déterminer la quantité des matériels sortis temporairement *}}
|
||||||
|
{{#foreach from=$cumul_mvt key="cat_key" item="cat_elem"}}
|
||||||
|
{{#foreach from=$cat_elem.eqpmt key="eqpmt_key" item="eqpmt"}}
|
||||||
|
{{:assign quantite=$eqpmt.exterieur}}
|
||||||
|
{{if $quantite != 0}}
|
||||||
|
{{:assign
|
||||||
|
var="temporaire.%s.%s"|args:$cat_elem.name:$eqpmt_key
|
||||||
|
value="%s (quantité : %d)"|args:$eqpmt.designation:$quantite
|
||||||
|
}}
|
||||||
|
{{/if}}
|
||||||
|
{{/foreach}}
|
||||||
|
{{/foreach}}
|
@ -21,57 +21,83 @@
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<form method="post" action="">
|
{{* vérifier s'il existe des catégories *}}
|
||||||
<fieldset class="entree">
|
{{#load type="category"}}
|
||||||
<legend>Ajouter une entrée</legend>
|
{{:assign categories_exist=true}}
|
||||||
<dl>
|
{{else}}
|
||||||
{{:linkbutton label="Matériel répertorié" shape="plus" href="repertorie.html" target="_dialog"}}
|
<p class="block alert">Il n'y a aucune catégorie : vous devez en ajouter.</p>
|
||||||
{{:linkbutton label="Matériel non répertorié" shape="plus" href="non_repertorie.html" target="_dialog"}}
|
{{/load}}
|
||||||
{{:linkbutton label="Retour de sortie temporaire" shape="plus" href="retour.html" target="_dialog"}}
|
|
||||||
</dl>
|
|
||||||
</fieldset>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
{{* lister les entrées *}}
|
{{if $categories_exist}}
|
||||||
<section class="liste_entrees">
|
|
||||||
<h2>Liste des entrées</h2>
|
|
||||||
|
|
||||||
{{#list
|
{{#load type="equipment"}}
|
||||||
select="
|
{{:assign disabled=false}}
|
||||||
$$.date AS 'Date' ;
|
|
||||||
$$.input_nature AS 'Type' ;
|
|
||||||
$$.amount AS 'Nombre' ;
|
|
||||||
(SELECT $$.designation
|
|
||||||
FROM @TABLE AS b
|
|
||||||
WHERE b.key = @TABLE.$$.equipment) AS 'Matériel' ;
|
|
||||||
$$.comment AS 'Remarques'"
|
|
||||||
type="movement"
|
|
||||||
direction="input"
|
|
||||||
order=1}}
|
|
||||||
|
|
||||||
{{:assign var='mvt_key' value=$key}}
|
|
||||||
<tr>
|
|
||||||
<td>{{$date|date_short}}</td>
|
|
||||||
<td>{{$input_nature}}</td>
|
|
||||||
<td>{{$amount}}</td>
|
|
||||||
<td>{{$col4}}</td>
|
|
||||||
<td>{{$comment}}</td>
|
|
||||||
<td class="actions">
|
|
||||||
{{:linkbutton
|
|
||||||
label="Supprimer"
|
|
||||||
href="delete_entree.html?key=%s"|args:$mvt_key
|
|
||||||
shape="delete"
|
|
||||||
target="_dialog"}}
|
|
||||||
{{:linkbutton
|
|
||||||
label="Modifier"
|
|
||||||
href="../modifier_mouvement.html?key=%s&direction=input"|args:$mvt_key
|
|
||||||
shape="edit"
|
|
||||||
target="_dialog"}}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{{else}}
|
{{else}}
|
||||||
<p class="block alert">Il n'y a aucune entrée.</p>
|
{{:assign disabled=true}}
|
||||||
{{/list}}
|
{{/load}}
|
||||||
</section>
|
|
||||||
|
{{* vérifier s'il y a des sorties temporaires *}}
|
||||||
|
{{if ! $disabled}}
|
||||||
|
{{:include file="../../_calcul_dispo.html" keep="cumul_mvt"}}
|
||||||
|
{{:include file="_temporaire.html" keep="temporaire"}}
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
<form method="post" action="">
|
||||||
|
<fieldset class="entree">
|
||||||
|
<legend>Ajouter une entrée</legend>
|
||||||
|
<dl>
|
||||||
|
{{if ! $disabled}}
|
||||||
|
{{:linkbutton label="Matériel répertorié" shape="plus" href="repertorie.html" target="_dialog"}}
|
||||||
|
{{/if}}
|
||||||
|
{{:linkbutton label="Matériel non répertorié" shape="plus" href="non_repertorie.html" target="_dialog"}}
|
||||||
|
{{if ! $disabled && $temporaire != null}}
|
||||||
|
{{:linkbutton label="Retour de sortie temporaire" shape="plus" href="retour.html" target="_dialog"}}
|
||||||
|
{{/if}}
|
||||||
|
</dl>
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
{{* lister les entrées *}}
|
||||||
|
<section class="liste_entrees">
|
||||||
|
<h2>Liste des entrées</h2>
|
||||||
|
|
||||||
|
{{#list
|
||||||
|
select="
|
||||||
|
$$.date AS 'Date' ;
|
||||||
|
$$.input_nature AS 'Type' ;
|
||||||
|
$$.amount AS 'Nombre' ;
|
||||||
|
(SELECT $$.designation
|
||||||
|
FROM @TABLE AS b
|
||||||
|
WHERE b.key = @TABLE.$$.equipment) AS 'Matériel' ;
|
||||||
|
$$.comment AS 'Remarques'"
|
||||||
|
type="movement"
|
||||||
|
direction="input"
|
||||||
|
order=1}}
|
||||||
|
|
||||||
|
{{:assign var='mvt_key' value=$key}}
|
||||||
|
<tr>
|
||||||
|
<td>{{$date|date_short}}</td>
|
||||||
|
<td>{{$input_nature}}</td>
|
||||||
|
<td>{{$amount}}</td>
|
||||||
|
<td>{{$col4}}</td>
|
||||||
|
<td>{{$comment}}</td>
|
||||||
|
<td class="actions">
|
||||||
|
{{:linkbutton
|
||||||
|
label="Supprimer"
|
||||||
|
href="delete_entree.html?key=%s"|args:$mvt_key
|
||||||
|
shape="delete"
|
||||||
|
target="_dialog"}}
|
||||||
|
{{:linkbutton
|
||||||
|
label="Modifier"
|
||||||
|
href="../modifier_mouvement.html?key=%s&direction=input"|args:$mvt_key
|
||||||
|
shape="edit"
|
||||||
|
target="_dialog"}}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{{else}}
|
||||||
|
<p class="block alert">Il n'y a aucune entrée.</p>
|
||||||
|
{{/list}}
|
||||||
|
</section>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
{{:admin_footer}}
|
{{:admin_footer}}
|
||||||
|
@ -64,17 +64,7 @@
|
|||||||
{{if $cumul_mvt !== null}}
|
{{if $cumul_mvt !== null}}
|
||||||
|
|
||||||
{{* déterminer la quantité des matériels sortis temporairement *}}
|
{{* déterminer la quantité des matériels sortis temporairement *}}
|
||||||
{{#foreach from=$cumul_mvt key="cat_key" item="cat_elem"}}
|
{{:include file="_temporaire.html" keep="temporaire"}}
|
||||||
{{#foreach from=$cat_elem.eqpmt key="eqpmt_key" item="eqpmt"}}
|
|
||||||
{{:assign quantite=$eqpmt.exterieur}}
|
|
||||||
{{if $quantite != 0}}
|
|
||||||
{{:assign
|
|
||||||
var="temporaire.%s.%s"|args:$cat_elem.name:$eqpmt_key
|
|
||||||
value="%s (quantité : %d)"|args:$eqpmt.designation:$quantite
|
|
||||||
}}
|
|
||||||
{{/if}}
|
|
||||||
{{/foreach}}
|
|
||||||
{{/foreach}}
|
|
||||||
|
|
||||||
{{if $temporaire != null}}
|
{{if $temporaire != null}}
|
||||||
|
|
||||||
|
13
mouvements/sorties/_temporaire.html
Normal file
13
mouvements/sorties/_temporaire.html
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{{* calculer les quantité de matériels dont l'asso n'est pas propriétaire *}}
|
||||||
|
{{#foreach from=$cumul_mvt key="cat_key" item="cat_elem"}}
|
||||||
|
{{#foreach from=$cat_elem.eqpmt key="eqpmt_key" item="eqpmt"}}
|
||||||
|
{{:assign quantite="%d-%d"|math:$eqpmt.nonproprio:$eqpmt.retour}}
|
||||||
|
{{if $quantite != 0}}
|
||||||
|
{{:assign
|
||||||
|
var="temporaire.%s.%s"|args:$cat_elem.name:$eqpmt_key
|
||||||
|
value="%s (quantité : %d)"|args:$eqpmt.designation:$quantite
|
||||||
|
}}
|
||||||
|
{{/if}}
|
||||||
|
{{/foreach}}
|
||||||
|
{{/foreach}}
|
||||||
|
{{:debug temporaire=$temporaire}}
|
@ -62,17 +62,7 @@
|
|||||||
|
|
||||||
{{if $cumul_mvt !== null}}
|
{{if $cumul_mvt !== null}}
|
||||||
{{* calculer les quantité de matériels dont l'asso n'est pas propriétaire *}}
|
{{* calculer les quantité de matériels dont l'asso n'est pas propriétaire *}}
|
||||||
{{#foreach from=$cumul_mvt key="cat_key" item="cat_elem"}}
|
{{:include file="_temporaire.html" keep="temporaire"}}
|
||||||
{{#foreach from=$cat_elem.eqpmt key="eqpmt_key" item="eqpmt"}}
|
|
||||||
{{:assign quantite="%d-%d"|math:$eqpmt.nonproprio:$eqpmt.retour}}
|
|
||||||
{{if $quantite != 0}}
|
|
||||||
{{:assign
|
|
||||||
var="temporaire.%s.%s"|args:$cat_elem.name:$eqpmt_key
|
|
||||||
value="%s (quantité : %d)"|args:$eqpmt.designation:$quantite
|
|
||||||
}}
|
|
||||||
{{/if}}
|
|
||||||
{{/foreach}}
|
|
||||||
{{/foreach}}
|
|
||||||
|
|
||||||
{{if $temporaire != null}}
|
{{if $temporaire != null}}
|
||||||
{{* formulaire de sortie de matériel *}}
|
{{* formulaire de sortie de matériel *}}
|
||||||
|
@ -21,56 +21,81 @@
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<form method="post" action="">
|
{{* vérifier s'il existe des catégories *}}
|
||||||
<fieldset class="sortie">
|
{{#load type="category"}}
|
||||||
<legend>Ajouter une sortie </legend>
|
{{:assign categories_exist=true}}
|
||||||
<dl>
|
{{else}}
|
||||||
{{:linkbutton label="Matériel en stock disponible" shape="plus" href="stock_disponible.html" target="_dialog"}}
|
<p class="block alert">Il n'y a aucune catégorie : vous devez en ajouter.</p>
|
||||||
{{:linkbutton label="Matériel emprunté" shape="plus" href="emprunte.html" target="_dialog"}}
|
{{/load}}
|
||||||
</dl>
|
|
||||||
</fieldset>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
{{* lister les sorties *}}
|
{{if $categories_exist}}
|
||||||
<section class="liste_sorties">
|
|
||||||
<h2>Liste des sorties</h2>
|
|
||||||
|
|
||||||
{{#list
|
{{* vérifier s'il y a eu des entrées de matériel *}}
|
||||||
select="
|
{{#load type="equipment"}}
|
||||||
$$.date AS 'Date' ;
|
{{:assign disabled=false}}
|
||||||
$$.output_nature AS 'Type' ;
|
|
||||||
$$.amount AS 'Nombre' ;
|
|
||||||
(SELECT $$.designation
|
|
||||||
FROM @TABLE AS b
|
|
||||||
WHERE b.key = @TABLE.$$.equipment) AS 'Matériel' ;
|
|
||||||
$$.comment AS 'Remarques'"
|
|
||||||
type="movement"
|
|
||||||
direction="output"
|
|
||||||
order=1}}
|
|
||||||
|
|
||||||
{{:assign var='mvt_key' value=$key}}
|
|
||||||
<tr>
|
|
||||||
<td>{{$date|date_short}}</td>
|
|
||||||
<td>{{$output_nature}}</td>
|
|
||||||
<td>{{$amount}}</td>
|
|
||||||
<td>{{$col4}}</td>
|
|
||||||
<td>{{$comment}}</td>
|
|
||||||
<td class="actions">
|
|
||||||
{{:linkbutton
|
|
||||||
label="Supprimer"
|
|
||||||
href="delete_sortie.html?key=%s"|args:$mvt_key
|
|
||||||
shape="delete"
|
|
||||||
target="_dialog"}}
|
|
||||||
{{:linkbutton
|
|
||||||
label="Modifier"
|
|
||||||
href="../modifier_mouvement.html?key=%s&direction=output"|args:$mvt_key
|
|
||||||
shape="edit"
|
|
||||||
target="_dialog"}}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{{else}}
|
{{else}}
|
||||||
<p class="block alert">Il n'y a aucune sortie.</p>
|
{{:assign disabled=true}}
|
||||||
{{/list}}
|
{{/load}}
|
||||||
</section>
|
|
||||||
|
{{* vérifier s'il y a des entrées temporaires *}}
|
||||||
|
{{if ! $disabled}}
|
||||||
|
{{:include file="../../_calcul_dispo.html" keep="cumul_mvt"}}
|
||||||
|
{{:include file="_temporaire.html" keep="temporaire"}}
|
||||||
|
|
||||||
|
<form method="post" action="">
|
||||||
|
<fieldset class="sortie">
|
||||||
|
<legend>Ajouter une sortie </legend>
|
||||||
|
<dl>
|
||||||
|
{{:linkbutton label="Matériel en stock disponible" shape="plus" href="stock_disponible.html" target="_dialog"}}
|
||||||
|
{{if $temporaire != null}}
|
||||||
|
{{:linkbutton label="Matériel emprunté" shape="plus" href="emprunte.html" target="_dialog"}}
|
||||||
|
{{/if}}
|
||||||
|
</dl>
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
{{* lister les sorties *}}
|
||||||
|
<section class="liste_sorties">
|
||||||
|
<h2>Liste des sorties</h2>
|
||||||
|
|
||||||
|
{{#list
|
||||||
|
select="
|
||||||
|
$$.date AS 'Date' ;
|
||||||
|
$$.output_nature AS 'Type' ;
|
||||||
|
$$.amount AS 'Nombre' ;
|
||||||
|
(SELECT $$.designation
|
||||||
|
FROM @TABLE AS b
|
||||||
|
WHERE b.key = @TABLE.$$.equipment) AS 'Matériel' ;
|
||||||
|
$$.comment AS 'Remarques'"
|
||||||
|
type="movement"
|
||||||
|
direction="output"
|
||||||
|
order=1}}
|
||||||
|
|
||||||
|
{{:assign var='mvt_key' value=$key}}
|
||||||
|
<tr>
|
||||||
|
<td>{{$date|date_short}}</td>
|
||||||
|
<td>{{$output_nature}}</td>
|
||||||
|
<td>{{$amount}}</td>
|
||||||
|
<td>{{$col4}}</td>
|
||||||
|
<td>{{$comment}}</td>
|
||||||
|
<td class="actions">
|
||||||
|
{{:linkbutton
|
||||||
|
label="Supprimer"
|
||||||
|
href="delete_sortie.html?key=%s"|args:$mvt_key
|
||||||
|
shape="delete"
|
||||||
|
target="_dialog"}}
|
||||||
|
{{:linkbutton
|
||||||
|
label="Modifier"
|
||||||
|
href="../modifier_mouvement.html?key=%s&direction=output"|args:$mvt_key
|
||||||
|
shape="edit"
|
||||||
|
target="_dialog"}}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{{else}}
|
||||||
|
<p class="block alert">Il n'y a aucune sortie.</p>
|
||||||
|
{{/list}}
|
||||||
|
</section>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
{{:admin_footer}}
|
{{:admin_footer}}
|
||||||
|
Loading…
Reference in New Issue
Block a user