Compare commits
No commits in common. "4d0bcc1bddc4902f32a7c336bbec01c5b40892fd" and "498e24e7edee0d194ce233d65371d6ca4e5b8aca" have entirely different histories.
4d0bcc1bdd
...
498e24e7ed
12
_nav.html
12
_nav.html
@ -1,21 +1,21 @@
|
|||||||
<nav class="tabs">
|
<nav class="tabs">
|
||||||
{{if $current == 'inventaire'}}
|
{{if $current == 'index'}}
|
||||||
<aside>
|
<aside>
|
||||||
{{:linkbutton label="Ajouter un nouveau matériel" shape="plus" href="mouvements/ajouter_entree.html" target="_dialog"}}
|
{{:linkbutton label="Ajouter un nouveau matériel" shape="plus" href="mouvements/ajouter_entree.html" target="_dialog"}}
|
||||||
</aside>
|
</aside>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li {{if $current == 'inventaire'}} class="current"{{/if}}><a href="{{$module.url}}index.html">Inventaire</a></li>
|
<li {{if $current == 'index'}} class="current"{{/if}}><a href="{{$module.url}}index.html">Inventaire</a></li>
|
||||||
<li {{if $current == 'config'}} class="current"{{/if}}><a href="{{$module.url}}categories/index.html">Configuration</a></li>
|
<li {{if $current == 'config'}} class="current"{{/if}}><a href="{{$module.url}}categories/index.html">Configuration</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
{{if $current == 'inventaire'}}
|
{{if $current == 'index'}}
|
||||||
<ul class="sub">
|
<ul class="sub">
|
||||||
<li {{if $subcurrent == 'proprio'}} class="current"{{/if}}><a href="{{$module.url}}index.html">Matériels permanents</a></li>
|
<li {{if $subcurrent == 'proprio'}} class="current"{{/if}}><a href="{{$module.url}}index.html">Matériel permanent</a></li>
|
||||||
<li {{if $subcurrent == 'nonproprio'}} class="current"{{/if}}><a href="{{$module.url}}inventaire_nonprop.html">Matériels temporaires</a></li>
|
<li {{if $subcurrent == 'nonproprio'}} class="current"{{/if}}><a href="{{$module.url}}inventaire_nonprop.html">Matériel temporaire</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
{{if $subsubcurrent == 'mouvements'}}
|
{{if $subcurrent == 'mouvements'}}
|
||||||
<ul class="sub">
|
<ul class="sub">
|
||||||
<li class="title"><strong>{{$eqpmt}} ({{$category}})</strong></li>
|
<li class="title"><strong>{{$eqpmt}} ({{$category}})</strong></li>
|
||||||
<li class="current"><a>Mouvements</a></li>
|
<li class="current"><a>Mouvements</a></li>
|
||||||
|
@ -39,12 +39,9 @@
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{* barre de navigation *}}
|
{{* barre de navigation *}}
|
||||||
{{if $_GET.prop == 1}}
|
{{if ! $dialog}}
|
||||||
{{:assign proprio="proprio"}}
|
{{:include file="./_nav.html" current="index" subcurrent="mouvements" eqpmt=$equipment.designation category=$category.name}}
|
||||||
{{else}}
|
|
||||||
{{:assign proprio="nonproprio"}}
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{:include file="./_nav.html" current="inventaire" subcurrent=$proprio subsubcurrent="mouvements" eqpmt=$equipment.designation category=$category.name}}
|
|
||||||
|
|
||||||
{{* récupérer la config des entrées/sorties *}}
|
{{* récupérer la config des entrées/sorties *}}
|
||||||
{{:include file="./_get_config.html" keep="config"}}
|
{{:include file="./_get_config.html" keep="config"}}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
{{:admin_header title="Gestion des matériels" custom_css=$custom_css current="module_equipment"}}
|
{{:admin_header title="Gestion des matériels" custom_css=$custom_css current="module_equipment"}}
|
||||||
|
|
||||||
{{* barre de navigation *}}
|
{{* barre de navigation *}}
|
||||||
{{:include file="_nav.html" current="inventaire" subcurrent="proprio"}}
|
{{:include file="_nav.html" current="index" subcurrent="proprio"}}
|
||||||
|
|
||||||
{{if $_GET.ok}}
|
{{if $_GET.ok}}
|
||||||
{{if $_GET.msg == "ajout" }}
|
{{if $_GET.msg == "ajout" }}
|
||||||
|
161
inventaire.html
161
inventaire.html
@ -1,7 +1,7 @@
|
|||||||
{{* -*- brindille -*- *}}
|
{{* -*- brindille -*- *}}
|
||||||
|
|
||||||
{{*
|
{{*
|
||||||
inventaire des entrées/sorties des matériels permanents
|
inventaire des entrées/sorties des matériels permanents de l'association
|
||||||
paramètres
|
paramètres
|
||||||
- category_keys : catégories dont on veut faire l'inventaire
|
- category_keys : catégories dont on veut faire l'inventaire
|
||||||
*}}
|
*}}
|
||||||
@ -9,16 +9,18 @@
|
|||||||
{{* Extraire et compiler les infos de la base *}}
|
{{* Extraire et compiler les infos de la base *}}
|
||||||
{{:include file="./_calcul_dispo.html" keep="cumul_mvt,category_keys,equipments"}}
|
{{:include file="./_calcul_dispo.html" keep="cumul_mvt,category_keys,equipments"}}
|
||||||
|
|
||||||
{{* Vérifier s'il y a au moins un matériel propriété de l'asso *}}
|
{{* Afficher les résultats *}}
|
||||||
{{:assign mat_prop=false}}
|
{{if $equipments === null}}
|
||||||
{{#foreach from=$equipments key=key item=eqpmt}}
|
<p class="block alert">Aucun matériel.</p>
|
||||||
{{if $eqpmt|has_key:"stock"}}
|
{{else}}
|
||||||
{{:assign mat_prop=true}}
|
{{* Vérifier s'il y a au moins un matériel propriété de l'asso *}}
|
||||||
{{:break}}
|
{{:assign mat_prop=false}}
|
||||||
{{/if}}
|
{{#foreach from=$equipments key=key item=eqpmt}}
|
||||||
{{/foreach}}
|
{{if $eqpmt|has_key:"stock"}}
|
||||||
|
{{:assign mat_prop=true}}
|
||||||
{{if $mat_prop}}
|
{{:break}}
|
||||||
|
{{/if}}
|
||||||
|
{{/foreach}}
|
||||||
|
|
||||||
{{* Sélecteur catégories *}}
|
{{* Sélecteur catégories *}}
|
||||||
<fieldset class="shortForm" style="width: 30%;">
|
<fieldset class="shortForm" style="width: 30%;">
|
||||||
@ -26,7 +28,7 @@
|
|||||||
<nav class="dropdown">
|
<nav class="dropdown">
|
||||||
<ul>
|
<ul>
|
||||||
<li><a></a></li>
|
<li><a></a></li>
|
||||||
<li{{if $_GET.cat_key == null}} class="selected"{{/if}}><a href="?">Toutes les catégories</a></li>
|
<li{{if $_GET.cat_key == null}} class="selected"{{/if}}><a href="?">Choisir une catégorie</a></li>
|
||||||
{{#load type="category" assign="category"}}
|
{{#load type="category" assign="category"}}
|
||||||
<li {{if $_GET.cat_key == $key}}class="selected"{{/if}}>
|
<li {{if $_GET.cat_key == $key}}class="selected"{{/if}}>
|
||||||
<a href="?cat_key={{$key}}">
|
<a href="?cat_key={{$key}}">
|
||||||
@ -38,78 +40,73 @@
|
|||||||
</nav>
|
</nav>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<h2>Matériels propriété de l'association</h2>
|
{{if $mat_prop}}
|
||||||
{{#list
|
<h2>Matériels propriété de l'association</h2>
|
||||||
select="
|
{{#list
|
||||||
$$.date AS 'Date' ;
|
select="
|
||||||
(SELECT $$.designation
|
$$.date AS 'Date' ;
|
||||||
FROM @TABLE AS b
|
(SELECT $$.designation
|
||||||
WHERE b.key = @TABLE.$$.equipment) AS 'Matériel' ;
|
FROM @TABLE AS b
|
||||||
"" as 'Catégorie' ;
|
WHERE b.key = @TABLE.$$.equipment) AS 'Matériel' ;
|
||||||
"" AS 'Stock' ;
|
"" as 'Catégorie' ;
|
||||||
"" AS 'Sorti' ;
|
"" AS 'Stock' ;
|
||||||
"" AS 'Dispo'
|
"" AS 'Sortie' ;
|
||||||
"
|
"" AS 'Dispo'
|
||||||
type="movement"
|
"
|
||||||
group="$$.equipment"
|
type="movement"
|
||||||
direction="input"
|
group="$$.equipment"
|
||||||
order=2
|
direction="input"
|
||||||
}}
|
order=2
|
||||||
|
}}
|
||||||
|
|
||||||
{{:assign var=cat_key from="equipments.%s.category"|args:$equipment}}
|
{{:assign var=cat_key from="equipments.%s.category"|args:$equipment}}
|
||||||
{{if $_GET.cat_key != null && $_GET.cat_key != $cat_key}}
|
{{if $_GET.cat_key != null && $_GET.cat_key != $cat_key}}
|
||||||
{{:continue}}
|
{{:continue}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{:assign var=cat_name from="cumul_mvt.%s.name"|args:$cat_key}}
|
{{:assign var=cat_name from="cumul_mvt.%s.name"|args:$cat_key}}
|
||||||
{{:assign var=stock from="equipments.%s.stock"|args:$equipment}}
|
{{:assign var=stock from="equipments.%s.stock"|args:$equipment}}
|
||||||
{{:assign var=exterieur from="equipments.%s.exterieur"|args:$equipment}}
|
{{:assign var=exterieur from="equipments.%s.exterieur"|args:$equipment}}
|
||||||
{{:assign dispo="%d-%d"|math:$stock:$exterieur}}
|
{{:assign dispo="%d-%d"|math:$stock:$exterieur}}
|
||||||
{{*:debug stock=$stock exterieur=$exterieur dispo=$dispo*}}
|
{{*:debug stock=$stock exterieur=$exterieur dispo=$dispo*}}
|
||||||
|
<tr>
|
||||||
{{if $stock == null}}
|
<td>{{$date|date_short}}</td>
|
||||||
{{:continue}}
|
<td>{{$col2}}</td>
|
||||||
{{/if}}
|
<td>{{$cat_name}}</td>
|
||||||
|
<td>{{$stock}}</td>
|
||||||
<tr>
|
<td>{{if $exterieur == null}}0{{else}}{{$exterieur}}{{/if}}</td>
|
||||||
<td>{{$date|date_short}}</td>
|
<td>{{$dispo}}</td>
|
||||||
<td>{{$col2}}</td>
|
<td class="actions">
|
||||||
<td>{{$cat_name}}</td>
|
{{if $exterieur > 0}}
|
||||||
<td>{{$stock}}</td>
|
{{:linkbutton
|
||||||
<td>{{if $exterieur == null}}0{{else}}{{$exterieur}}{{/if}}</td>
|
label="Retour"
|
||||||
<td>{{$dispo}}</td>
|
href="mouvements/entrees/retour.html?key=%s&prop=1"|args:$equipment
|
||||||
<td class="actions">
|
shape="history"
|
||||||
{{if $exterieur > 0}}
|
target="_dialog"}}
|
||||||
|
{{/if}}
|
||||||
|
{{if $dispo > 0}}
|
||||||
|
{{:linkbutton
|
||||||
|
label="Sortie"
|
||||||
|
shape="plus"
|
||||||
|
href="mouvements/sorties/stock_disponible.html?key=%s&prop=1"|args:$equipment
|
||||||
|
target="_dialog"}}
|
||||||
|
{{/if}}
|
||||||
{{:linkbutton
|
{{:linkbutton
|
||||||
label="Retour"
|
label="Entrée"
|
||||||
href="mouvements/entrees/retour.html?key=%s&prop=1"|args:$equipment
|
shape="plus"
|
||||||
shape="history"
|
href="mouvements/entrees/repertorie.html?key=%s&prop=1"|args:$equipment
|
||||||
target="_dialog"}}
|
target="_dialog"}}
|
||||||
{{/if}}
|
|
||||||
{{if $dispo > 0}}
|
|
||||||
{{:linkbutton
|
{{:linkbutton
|
||||||
label="Sortie"
|
label="Mouvements"
|
||||||
shape="plus"
|
href="%shistorique.html?key=%s&prop=1"|args:$module.url:$equipment
|
||||||
href="mouvements/sorties/stock_disponible.html?key=%s&prop=1"|args:$equipment
|
shape="table"}}
|
||||||
target="_dialog"}}
|
{{:linkbutton
|
||||||
{{/if}}
|
label="Modifier"
|
||||||
{{:linkbutton
|
href="%smodifier_materiel.html?key=%s&prop=1"|args:$module.url:$equipment
|
||||||
label="Entrée"
|
shape="edit"
|
||||||
shape="plus"
|
target="_dialog"}}
|
||||||
href="mouvements/entrees/repertorie.html?key=%s&prop=1"|args:$equipment
|
</td>
|
||||||
target="_dialog"}}
|
</tr>
|
||||||
{{:linkbutton
|
{{/list}}
|
||||||
label="Mouvements"
|
{{/if}}
|
||||||
href="%shistorique.html?key=%s&prop=1"|args:$module.url:$equipment
|
|
||||||
shape="table"}}
|
|
||||||
{{:linkbutton
|
|
||||||
label="Modifier"
|
|
||||||
href="%smodifier_materiel.html?key=%s&prop=1"|args:$module.url:$equipment
|
|
||||||
shape="edit"
|
|
||||||
target="_dialog"}}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{{/list}}
|
|
||||||
{{else}}
|
|
||||||
<p class="block alert">Aucun matériel.</p>
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -9,29 +9,31 @@
|
|||||||
{{:admin_header title="Gestion des matériels" custom_css=$custom_css current="module_equipment"}}
|
{{:admin_header title="Gestion des matériels" custom_css=$custom_css current="module_equipment"}}
|
||||||
|
|
||||||
{{* barre de navigation *}}
|
{{* barre de navigation *}}
|
||||||
{{:include file="_nav.html" current="inventaire" subcurrent="nonproprio"}}
|
{{:include file="_nav.html" current="index" subcurrent="nonproprio"}}
|
||||||
|
|
||||||
{{* Extraire et compiler les infos de la base *}}
|
{{* Extraire et compiler les infos de la base *}}
|
||||||
{{:include file="./_calcul_dispo.html" keep="cumul_mvt,category_keys,equipments"}}
|
{{:include file="./_calcul_dispo.html" keep="cumul_mvt,category_keys,equipments"}}
|
||||||
|
|
||||||
{{* Vérifier s'il y a au moins un matériel non propriété de l'asso *}}
|
{{* Afficher les résultats *}}
|
||||||
{{:assign mat_non_prop=false}}
|
{{if $equipments === null}}
|
||||||
{{#foreach from=$equipments key=key item=eqpmt}}
|
<p class="block alert">Aucun matériel.</p>
|
||||||
{{if $eqpmt|has_key:"nonproprio"}}
|
{{else}}
|
||||||
{{:assign mat_non_prop=true}}
|
{{* Vérifier s'il y a au moins un matériel non propriété de l'asso *}}
|
||||||
{{:break}}
|
{{:assign mat_non_prop=false}}
|
||||||
{{/if}}
|
{{#foreach from=$equipments key=key item=eqpmt}}
|
||||||
{{/foreach}}
|
{{if $eqpmt|has_key:"nonproprio"}}
|
||||||
|
{{:assign mat_non_prop=true}}
|
||||||
|
{{:break}}
|
||||||
|
{{/if}}
|
||||||
|
{{/foreach}}
|
||||||
|
|
||||||
{{if $mat_non_prop}}
|
{{* TODO Sélecteur catégories *}}
|
||||||
|
|
||||||
{{* Sélecteur catégories *}}
|
|
||||||
<fieldset class="shortForm" style="width: 30%;">
|
<fieldset class="shortForm" style="width: 30%;">
|
||||||
<legend>Filtrer par catégorie</legend>
|
<legend>Filtrer par catégorie</legend>
|
||||||
<nav class="dropdown">
|
<nav class="dropdown">
|
||||||
<ul>
|
<ul>
|
||||||
<li><a></a></li>
|
<li><a></a></li>
|
||||||
<li{{if $_GET.cat_key == null}} class="selected"{{/if}}><a href="?">Toutes les catégories</a></li>
|
<li{{if $_GET.cat_key == null}} class="selected"{{/if}}><a href="?">Choisir une catégorie</a></li>
|
||||||
{{#load type="category" assign="category"}}
|
{{#load type="category" assign="category"}}
|
||||||
<li {{if $_GET.cat_key == $key}}class="selected"{{/if}}>
|
<li {{if $_GET.cat_key == $key}}class="selected"{{/if}}>
|
||||||
<a href="?cat_key={{$key}}">
|
<a href="?cat_key={{$key}}">
|
||||||
@ -43,64 +45,64 @@
|
|||||||
</nav>
|
</nav>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<h2>Matériels temporairement dans l'association</h2>
|
{{if $mat_non_prop}}
|
||||||
|
<h2>Matériels temporairement dans l'association</h2>
|
||||||
|
|
||||||
{{#list
|
{{#list
|
||||||
select="
|
select="
|
||||||
$$.date AS 'Date' ;
|
$$.date AS 'Date' ;
|
||||||
(SELECT $$.designation
|
(SELECT $$.designation
|
||||||
FROM @TABLE AS b
|
FROM @TABLE AS b
|
||||||
WHERE b.key = @TABLE.$$.equipment) AS 'Matériel' ;
|
WHERE b.key = @TABLE.$$.equipment) AS 'Matériel' ;
|
||||||
"" as 'Catégorie' ;
|
"" as 'Catégorie' ;
|
||||||
"" AS 'Quantité'
|
"" AS 'Quantité'
|
||||||
"
|
"
|
||||||
type="movement"
|
type="movement"
|
||||||
group="$$.equipment"
|
group="$$.equipment"
|
||||||
direction="input"
|
direction="input"
|
||||||
order=2
|
order=2
|
||||||
}}
|
}}
|
||||||
|
|
||||||
{{:assign var=cat_key from="equipments.%s.category"|args:$equipment}}
|
{{:assign var=cat_key from="equipments.%s.category"|args:$equipment}}
|
||||||
{{if $_GET.cat_key != null && $_GET.cat_key != $cat_key}}
|
{{if $_GET.cat_key != null && $_GET.cat_key != $cat_key}}
|
||||||
{{:continue}}
|
{{:continue}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{:assign var=cat_name from="cumul_mvt.%s.name"|args:$cat_key}}
|
{{:assign var=cat_name from="cumul_mvt.%s.name"|args:$cat_key}}
|
||||||
{{:assign var=qte from="equipments.%s.nonproprio"|args:$equipment}}
|
{{:assign var=qte from="equipments.%s.nonproprio"|args:$equipment}}
|
||||||
|
|
||||||
{{if $qte == null}}
|
{{if $qte == null}}
|
||||||
{{:continue}}
|
{{:continue}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{$date|date_short}}</td>
|
<td>{{$date|date_short}}</td>
|
||||||
<td>{{$col2}}</td>
|
<td>{{$col2}}</td>
|
||||||
<td>{{$cat_name}}</td>
|
<td>{{$cat_name}}</td>
|
||||||
<td>{{$qte}}</td>
|
<td>{{$qte}}</td>
|
||||||
<td class="actions">
|
<td class="actions">
|
||||||
{{if $qte > 0}}
|
{{if $qte > 0}}
|
||||||
|
{{:linkbutton
|
||||||
|
label="Retour"
|
||||||
|
href="mouvements/sorties/emprunte.html?key=%s&prop=0"|args:$equipment
|
||||||
|
shape="history"
|
||||||
|
target="_dialog"}}
|
||||||
|
{{/if}}
|
||||||
{{:linkbutton
|
{{:linkbutton
|
||||||
label="Retour"
|
label="Entrée"
|
||||||
href="mouvements/sorties/emprunte.html?key=%s&prop=0"|args:$equipment
|
shape="plus"
|
||||||
shape="history"
|
href="mouvements/entrees/repertorie.html?key=%s&prop=0"|args:$equipment
|
||||||
target="_dialog"}}
|
target="_dialog"}}
|
||||||
{{/if}}
|
{{:linkbutton
|
||||||
{{:linkbutton
|
label="Mouvements"
|
||||||
label="Entrée"
|
href="%shistorique.html?key=%s&prop=0"|args:$module.url:$equipment
|
||||||
shape="plus"
|
shape="table"}}
|
||||||
href="mouvements/entrees/repertorie.html?key=%s&prop=0"|args:$equipment
|
{{:linkbutton
|
||||||
target="_dialog"}}
|
label="Modifier"
|
||||||
{{:linkbutton
|
href="modifier_materiel.html?key=%s&prop=0"|args:$equipment
|
||||||
label="Mouvements"
|
shape="edit"
|
||||||
href="%shistorique.html?key=%s&prop=0"|args:$module.url:$equipment
|
target="_dialog"}}
|
||||||
shape="table"}}
|
</td>
|
||||||
{{:linkbutton
|
</tr>
|
||||||
label="Modifier"
|
{{/list}}
|
||||||
href="modifier_materiel.html?key=%s&prop=0"|args:$equipment
|
{{/if}}
|
||||||
shape="edit"
|
|
||||||
target="_dialog"}}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{{/list}}
|
|
||||||
{{else}}
|
|
||||||
<p class="block alert">Aucun matériel.</p>
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
Loading…
Reference in New Issue
Block a user