Compare commits
No commits in common. "ec249b78ee31a0d32b8d8aba04d6b36923ce1b4a" and "4736cce759366c7d1fe0355e5c70ae808f8f8592" have entirely different histories.
ec249b78ee
...
4736cce759
28 changed files with 91 additions and 67 deletions
|
@ -6,7 +6,7 @@
|
||||||
*}}
|
*}}
|
||||||
|
|
||||||
{{* config par défaut *}}
|
{{* config par défaut *}}
|
||||||
{{:read file="./default.json" assign="config_defaut"}}
|
{{:read file="./defaut.json" assign="config_defaut"}}
|
||||||
{{:assign config_defaut=$config_defaut|json_decode}}
|
{{:assign config_defaut=$config_defaut|json_decode}}
|
||||||
|
|
||||||
{{:assign var="directions.input" value="entrée"}}
|
{{:assign var="directions.input" value="entrée"}}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
{{if $subsubcurrent == null && $cat == 0}}
|
{{if $subsubcurrent == null && $cat == 0}}
|
||||||
{{:linkbutton label="Ajouter une catégorie" shape="plus" href="categories/add_category.html" target="_dialog"}}
|
{{:linkbutton label="Ajouter une catégorie" shape="plus" href="categories/add_category.html" target="_dialog"}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{:linkbutton label="Ajouter un nouveau matériel" shape="plus" href="movements/add_new_equipment.html" target="_dialog"}}
|
{{:linkbutton label="Ajouter un nouveau matériel" shape="plus" href="mouvements/ajouter_entree.html" target="_dialog"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</aside>
|
</aside>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -46,8 +46,8 @@
|
||||||
</aside>
|
</aside>
|
||||||
{{elseif $subcurrent == 'typesES'}}
|
{{elseif $subcurrent == 'typesES'}}
|
||||||
<aside>
|
<aside>
|
||||||
{{:linkbutton label="Ajouter un type d'entrée" shape="plus" href="config/add_movement_type.html?dir=input" target="_dialog"}}
|
{{:linkbutton label="Ajouter un type d'entrée" shape="plus" href="config/ajouter_type_mouvement.html?dir=input" target="_dialog"}}
|
||||||
{{:linkbutton label="Ajouter un type de sortie" shape="plus" href="config/add_movement_type.html?dir=output" target="_dialog"}}
|
{{:linkbutton label="Ajouter un type de sortie" shape="plus" href="config/ajouter_type_mouvement.html?dir=output" target="_dialog"}}
|
||||||
</aside>
|
</aside>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<ul class="sub">
|
<ul class="sub">
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{{* -*- brindille -*- *}}
|
{{* -*- brindille -*- *}}
|
||||||
|
|
||||||
{{:admin_header title="Matériels archivés" current="module_equipment"}}
|
{{:admin_header title="Matériels archivés" custom_css=$custom_css current="module_equipment"}}
|
||||||
{{:include file="_nav.html" current="archives"}}
|
{{:include file="_nav.html" current="archives"}}
|
||||||
|
|
||||||
{{if $_GET.ok}}
|
{{if $_GET.ok}}
|
||||||
|
@ -54,7 +54,7 @@
|
||||||
<td class="actions">
|
<td class="actions">
|
||||||
{{:linkbutton
|
{{:linkbutton
|
||||||
label="Historique"
|
label="Historique"
|
||||||
href="equipment_history.html?key=%s&prop=1¤t=archives"|args:$key
|
href="historique.html?key=%s&prop=1¤t=archives"|args:$key
|
||||||
shape="table"}}
|
shape="table"}}
|
||||||
{{:linkbutton
|
{{:linkbutton
|
||||||
label="Modifier"
|
label="Modifier"
|
||||||
|
|
|
@ -38,9 +38,9 @@
|
||||||
<td class="actions">
|
<td class="actions">
|
||||||
{{:assign var="locked" from="locked_%ss"|args:$direction}}
|
{{:assign var="locked" from="locked_%ss"|args:$direction}}
|
||||||
{{if ! $locked|has:$label}}
|
{{if ! $locked|has:$label}}
|
||||||
{{:linkbutton label="Supprimer" shape="delete" href="config/delete_movement_type.html?dir=%s&op_key=%s"|args:$direction:$key target="_dialog"}}
|
{{:linkbutton label="Supprimer" shape="delete" href="config/supprimer_type_mouvement.html?dir=%s&op_key=%s"|args:$direction:$key target="_dialog"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{:linkbutton label="Modifier" shape="edit" href="config/modify_movement_type.html?dir=%s&op_key=%s"|args:$direction:$key target="_dialog"}}
|
{{:linkbutton label="Modifier" shape="edit" href="config/modifier_type_mouvement.html?dir=%s&op_key=%s"|args:$direction:$key target="_dialog"}}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
|
|
|
@ -124,11 +124,11 @@
|
||||||
<aside>
|
<aside>
|
||||||
{{if $_GET.prop}}
|
{{if $_GET.prop}}
|
||||||
{{if $equipment.stock > 0}}
|
{{if $equipment.stock > 0}}
|
||||||
{{:linkbutton label="Sortie" shape="minus" href="movements/output_equipment.html?key=%s"|args:$_GET.key target="_dialog"}}
|
{{:linkbutton label="Sortie" shape="minus" href="mouvements/sorties/stock_disponible.html?key=%s"|args:$_GET.key target="_dialog"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{:linkbutton label="Entrée" shape="plus" href="movements/input_equipment.html?key=%s"|args:$_GET.key target="_dialog"}}
|
{{:linkbutton label="Entrée" shape="plus" href="mouvements/entrees/repertorie.html?key=%s"|args:$_GET.key target="_dialog"}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{:linkbutton label="Entrée" shape="plus" href="movements/input_equipment.html?key=%s"|args:$_GET.key target="_dialog"}}
|
{{:linkbutton label="Entrée" shape="plus" href="mouvements/entrees/repertorie.html?key=%s"|args:$_GET.key target="_dialog"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</aside>
|
</aside>
|
||||||
</nav>
|
</nav>
|
||||||
|
@ -212,7 +212,7 @@
|
||||||
{{if $temp_ext != null && $temp_ext > 0}}
|
{{if $temp_ext != null && $temp_ext > 0}}
|
||||||
{{:linkbutton
|
{{:linkbutton
|
||||||
label="Retour"
|
label="Retour"
|
||||||
href="movements/output_return.html?key=%s&prop=%s"|args:$key:$_GET.prop
|
href="mouvements/output_return.html?key=%s&prop=%s"|args:$key:$_GET.prop
|
||||||
shape="reset"
|
shape="reset"
|
||||||
target="_dialog"}}
|
target="_dialog"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -222,18 +222,18 @@
|
||||||
{{else}}
|
{{else}}
|
||||||
{{:linkbutton
|
{{:linkbutton
|
||||||
label="Dupliquer"
|
label="Dupliquer"
|
||||||
href="movements/copy_movement.html?key=%s&prop=%s"|args:$key:$_GET.prop
|
href="mouvements/dupliquer_mouvement.html?key=%s&prop=%s"|args:$key:$_GET.prop
|
||||||
shape="plus"
|
shape="plus"
|
||||||
target="_dialog"}}
|
target="_dialog"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{:linkbutton
|
{{:linkbutton
|
||||||
label="Modifier"
|
label="Modifier"
|
||||||
href="movements/modify_movement.html?key=%s"|args:$key
|
href="mouvements/modifier_mouvement.html?key=%s"|args:$key
|
||||||
shape="edit"
|
shape="edit"
|
||||||
target="_dialog"}}
|
target="_dialog"}}
|
||||||
{{:linkbutton
|
{{:linkbutton
|
||||||
label="Supprimer"
|
label="Supprimer"
|
||||||
href="movements/delete_movement.html?key=%s&prop=%s"|args:$key:$_GET.prop
|
href="mouvements/supprimer_mouvement.html?key=%s&prop=%s"|args:$key:$_GET.prop
|
||||||
shape="delete"
|
shape="delete"
|
||||||
target="_dialog"}}
|
target="_dialog"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -305,24 +305,24 @@
|
||||||
{{if $temp_in != null && $temp_in > 0}}
|
{{if $temp_in != null && $temp_in > 0}}
|
||||||
{{:linkbutton
|
{{:linkbutton
|
||||||
label="Retour"
|
label="Retour"
|
||||||
href="movements/input_return.html?key=%s&prop=%s"|args:$key:$_GET.prop
|
href="mouvements/input_return.html?key=%s&prop=%s"|args:$key:$_GET.prop
|
||||||
shape="reset"
|
shape="reset"
|
||||||
target="_dialog"}}
|
target="_dialog"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{:linkbutton
|
{{:linkbutton
|
||||||
label="Dupliquer"
|
label="Dupliquer"
|
||||||
href="movements/copy_movement.html?key=%s&prop=%s"|args:$key:$_GET.prop
|
href="mouvements/dupliquer_mouvement.html?key=%s&prop=%s"|args:$key:$_GET.prop
|
||||||
shape="plus"
|
shape="plus"
|
||||||
target="_dialog"}}
|
target="_dialog"}}
|
||||||
{{:linkbutton
|
{{:linkbutton
|
||||||
label="Modifier"
|
label="Modifier"
|
||||||
href="movements/modify_movement.html?key=%s"|args:$key
|
href="mouvements/modifier_mouvement.html?key=%s"|args:$key
|
||||||
shape="edit"
|
shape="edit"
|
||||||
target="_dialog"}}
|
target="_dialog"}}
|
||||||
{{:linkbutton
|
{{:linkbutton
|
||||||
label="Supprimer"
|
label="Supprimer"
|
||||||
href="movements/delete_movement.html?key=%s&prop=%s"|args:$key:$_GET.prop
|
href="mouvements/supprimer_mouvement.html?key=%s&prop=%s"|args:$key:$_GET.prop
|
||||||
shape="delete"
|
shape="delete"
|
||||||
target="_dialog"}}
|
target="_dialog"}}
|
||||||
</td>
|
</td>
|
|
@ -1,6 +1,6 @@
|
||||||
{{* -*- brindille -*- *}}
|
{{* -*- brindille -*- *}}
|
||||||
|
|
||||||
{{:admin_header title="Gestion des matériels" current="module_equipment"}}
|
{{:admin_header title="Gestion des matériels" custom_css=$custom_css current="module_equipment"}}
|
||||||
|
|
||||||
{{* barre de navigation *}}
|
{{* barre de navigation *}}
|
||||||
{{if $_GET.prop == null || $_GET.prop}}
|
{{if $_GET.prop == null || $_GET.prop}}
|
||||||
|
@ -29,10 +29,10 @@
|
||||||
{{if $result.count == 0}}
|
{{if $result.count == 0}}
|
||||||
<p class="block alert">Il n'y a aucune catégorie : vous devez en ajouter.</p>
|
<p class="block alert">Il n'y a aucune catégorie : vous devez en ajouter.</p>
|
||||||
{{else}}
|
{{else}}
|
||||||
{{if $_GET.prop == null || $_GET.prop == "1"}}
|
{{if $_GET.prop == null || $_GET.prop}}
|
||||||
{{:include file="./_inventory.html"}}
|
{{:include file="./inventaire.html"}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{:include file="./_temp_inventory.html"}}
|
{{:include file="./inventaire_nonprop.html"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
{{:assign condition="1"}}
|
{{:assign condition="1"}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{:assign cat_key=$_GET.cat_key|quote_sql}}
|
{{:assign cat_key=$_GET.cat_key|quote_sql}}
|
||||||
{{:assign condition="$$.category = %s"|args:$cat_key}}
|
{{:assign condition="$$.category == %s"|args:$cat_key}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#list
|
{{#list
|
||||||
|
@ -63,21 +63,21 @@
|
||||||
{{:linkbutton
|
{{:linkbutton
|
||||||
label="Sortie"
|
label="Sortie"
|
||||||
shape="minus"
|
shape="minus"
|
||||||
href="movements/output_equipment.html?key=%s"|args:$key
|
href="mouvements/sorties/stock_disponible.html?key=%s"|args:$key
|
||||||
target="_dialog"}}
|
target="_dialog"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{:linkbutton
|
{{:linkbutton
|
||||||
label="Entrée"
|
label="Entrée"
|
||||||
shape="plus"
|
shape="plus"
|
||||||
href="movements/input_equipment.html?key=%s"|args:$key
|
href="mouvements/entrees/repertorie.html?key=%s"|args:$key
|
||||||
target="_dialog"}}
|
target="_dialog"}}
|
||||||
{{:linkbutton
|
{{:linkbutton
|
||||||
label="Historique"
|
label="Historique"
|
||||||
href="equipment_history.html?key=%s&prop=1"|args:$key
|
href="historique.html?key=%s&prop=1"|args:$key
|
||||||
shape="table"}}
|
shape="table"}}
|
||||||
{{:linkbutton
|
{{:linkbutton
|
||||||
label="Modifier"
|
label="Modifier"
|
||||||
href="modify_equipment.html?key=%s&prop=1"|args:$key
|
href="modifier_materiel.html?key=%s&prop=1&stock=%s"|args:$key:$col3
|
||||||
shape="edit"
|
shape="edit"
|
||||||
target="_dialog"}}
|
target="_dialog"}}
|
||||||
</td>
|
</td>
|
|
@ -34,7 +34,7 @@
|
||||||
{{:assign condition="1"}}
|
{{:assign condition="1"}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{:assign cat_key=$_GET.cat_key|quote_sql}}
|
{{:assign cat_key=$_GET.cat_key|quote_sql}}
|
||||||
{{:assign condition="$$.category = %s"|args:$cat_key}}
|
{{:assign condition="$$.category == %s"|args:$cat_key}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#list
|
{{#list
|
||||||
|
@ -58,15 +58,15 @@
|
||||||
{{:linkbutton
|
{{:linkbutton
|
||||||
label="Entrée"
|
label="Entrée"
|
||||||
shape="plus"
|
shape="plus"
|
||||||
href="movements/input_equipment.html?key=%s"|args:$key
|
href="mouvements/entrees/repertorie.html?key=%s"|args:$key
|
||||||
target="_dialog"}}
|
target="_dialog"}}
|
||||||
{{:linkbutton
|
{{:linkbutton
|
||||||
label="Historique"
|
label="Historique"
|
||||||
href="equipment_history.html?key=%s&prop=0"|args:$key
|
href="historique.html?key=%s&prop=0"|args:$key
|
||||||
shape="table"}}
|
shape="table"}}
|
||||||
{{:linkbutton
|
{{:linkbutton
|
||||||
label="Modifier"
|
label="Modifier"
|
||||||
href="modify_equipment.html?key=%s&prop=0"|args:$key
|
href="modifier_materiel.html?key=%s&prop=0"|args:$key
|
||||||
shape="edit"
|
shape="edit"
|
||||||
target="_dialog"}}
|
target="_dialog"}}
|
||||||
</td>
|
</td>
|
|
@ -3,7 +3,7 @@
|
||||||
{{*
|
{{*
|
||||||
Paramètres :
|
Paramètres :
|
||||||
- key : clé du matériel à modifier
|
- key : clé du matériel à modifier
|
||||||
- prop : =1 si matériel propriété de l'association, 0 sinon
|
- prop : =1 si matériel propriété de l'association
|
||||||
*}}
|
*}}
|
||||||
|
|
||||||
{{:assign equipment_key=$_GET.key|trim}}
|
{{:assign equipment_key=$_GET.key|trim}}
|
||||||
|
@ -17,11 +17,9 @@
|
||||||
{{#form on="save"}}
|
{{#form on="save"}}
|
||||||
|
|
||||||
{{if $_POST.archive == 1}}
|
{{if $_POST.archive == 1}}
|
||||||
{{* vérifier les qunatités *}}
|
{{* vérifier si le stock est nul *}}
|
||||||
{{if $_GET.prop == 1 && $equipment.stock != 0}}
|
{{if $_GET.stock != 0}}
|
||||||
{{:error message="L'archivage n'est possible que si le stock est nul !"}}
|
{{:error message="L'archivage n'est possible que si le stock est nul !"}}
|
||||||
{{elseif $_GET.prop == 0 && $equipment.notowned != 0}}
|
|
||||||
{{:error message="L'archivage n'est possible que s'il n'y a plus de matériel présent temporairement"}}
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{* archiver le matériel *}}
|
{{* archiver le matériel *}}
|
||||||
{{:save
|
{{:save
|
|
@ -1,5 +1,5 @@
|
||||||
name="Gestion des matériels"
|
name="Gestion des matériels"
|
||||||
description="Permet de gérer un inventaire de matériels, ainsi que de suivre les prêts (en test)."
|
description="Gestion des matériels: stock, entrées, sorties."
|
||||||
author="Jean-Christophe Engel"
|
author="Jean-Christophe Engel"
|
||||||
author_url="https://git.roflcopter.fr/lesanges"
|
author_url="https://git.roflcopter.fr/lesanges"
|
||||||
home_button=false
|
home_button=false
|
||||||
|
|
|
@ -66,11 +66,11 @@
|
||||||
-------------------- Traiter la saisie --------------------
|
-------------------- Traiter la saisie --------------------
|
||||||
*}}
|
*}}
|
||||||
{{#form on="save"}}
|
{{#form on="save"}}
|
||||||
{{* vérifier la validité de la saisie *}}
|
|
||||||
{{if $_POST.amount <= 0}}
|
{{if $_POST.amount <= 0}}
|
||||||
{{:error message="La quantité (%s) doit être strictement positive !!"|args:$_POST.amount}}
|
{{:error message="La quantité (%s) doit être strictement positive !!"|args:$_POST.amount}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
{{* vérifier la validité de la saisie *}}
|
||||||
{{if $_POST.date|parse_date|strtotime > $now}}
|
{{if $_POST.date|parse_date|strtotime > $now}}
|
||||||
{{:error message="Impossible de saisir une date dans le futur (%s)"|args:$_POST.date}}
|
{{:error message="Impossible de saisir une date dans le futur (%s)"|args:$_POST.date}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -135,7 +135,7 @@
|
||||||
|
|
||||||
{{* Vérifier la cohérence des mouvements du matériel *}}
|
{{* Vérifier la cohérence des mouvements du matériel *}}
|
||||||
{{:include
|
{{:include
|
||||||
file="./_validate_modification.html"
|
file="./valider_modification.html"
|
||||||
keep="erreur"
|
keep="erreur"
|
||||||
movements=$movements_new
|
movements=$movements_new
|
||||||
}}
|
}}
|
||||||
|
@ -192,7 +192,7 @@
|
||||||
user=$user.id
|
user=$user.id
|
||||||
storage=$_POST.storage
|
storage=$_POST.storage
|
||||||
}}
|
}}
|
||||||
{{:redirect force="../equipment_history.html?ok=1&key=%s&prop=%s&msg=copie"|args:$eqpmt_key:$prop}}
|
{{:redirect force="../historique.html?ok=1&key=%s&prop=%s&msg=copie"|args:$eqpmt_key:$prop}}
|
||||||
{{/form}}
|
{{/form}}
|
||||||
|
|
||||||
{{:admin_header title="Dupliquer un mouvement" current="module_equipment"}}
|
{{:admin_header title="Dupliquer un mouvement" current="module_equipment"}}
|
|
@ -8,11 +8,11 @@
|
||||||
|
|
||||||
{{* barre de navigation *}}
|
{{* barre de navigation *}}
|
||||||
{{if ! $dialog}}
|
{{if ! $dialog}}
|
||||||
{{:include file="../_nav.html" current="entrees"}}
|
{{:include file="../../_nav.html" current="entrees"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{* 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"}}
|
||||||
|
|
||||||
{{* types d'entrées *}}
|
{{* types d'entrées *}}
|
||||||
{{#foreach from=$config.input_nature key=key}}
|
{{#foreach from=$config.input_nature key=key}}
|
||||||
|
@ -50,7 +50,7 @@
|
||||||
|
|
||||||
{{:save
|
{{:save
|
||||||
key=$equipment.key
|
key=$equipment.key
|
||||||
validate_schema="../equipment.schema.json"
|
validate_schema="../../equipment.schema.json"
|
||||||
type="equipment"
|
type="equipment"
|
||||||
category=$equipment.category
|
category=$equipment.category
|
||||||
name=$equipment.name
|
name=$equipment.name
|
||||||
|
@ -64,7 +64,7 @@
|
||||||
{{:assign mvt_key=""|uuid}}
|
{{:assign mvt_key=""|uuid}}
|
||||||
{{:save
|
{{:save
|
||||||
key=$mvt_key
|
key=$mvt_key
|
||||||
validate_schema="./movement.schema.json"
|
validate_schema="../movement.schema.json"
|
||||||
type="movement"
|
type="movement"
|
||||||
direction="input"
|
direction="input"
|
||||||
operation=$_POST.operation
|
operation=$_POST.operation
|
||||||
|
@ -80,10 +80,10 @@
|
||||||
{{else}}
|
{{else}}
|
||||||
{{:assign prop=1}}
|
{{:assign prop=1}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{:redirect force="../equipment_history.html?key=%s&ok=1&msg=entrée&prop=%s"|args:$equipment.key:$prop}}
|
{{:redirect force="../../historique.html?key=%s&ok=1&msg=entrée&prop=%s"|args:$equipment.key:$prop}}
|
||||||
{{/form}}
|
{{/form}}
|
||||||
|
|
||||||
{{:admin_header title="Entrée de matériel" custom_css="./../style.css" current="module_equipment"}}
|
{{:admin_header title="Entrée de matériel" custom_css="./../../style.css" current="module_equipment"}}
|
||||||
{{:form_errors}}
|
{{:form_errors}}
|
||||||
|
|
||||||
{{* formulaire de saisie d'une entrée de matériel *}}
|
{{* formulaire de saisie d'une entrée de matériel *}}
|
|
@ -107,7 +107,7 @@
|
||||||
|
|
||||||
{{* Vérifier la cohérence des mouvements du matériel *}}
|
{{* Vérifier la cohérence des mouvements du matériel *}}
|
||||||
{{:include
|
{{:include
|
||||||
file="./_validate_modification.html"
|
file="./valider_modification.html"
|
||||||
keep="erreur, pb"
|
keep="erreur, pb"
|
||||||
movements=$movements_new
|
movements=$movements_new
|
||||||
}}
|
}}
|
||||||
|
@ -161,10 +161,10 @@
|
||||||
temp_key=$_GET.key
|
temp_key=$_GET.key
|
||||||
return=$mvt_key
|
return=$mvt_key
|
||||||
}}
|
}}
|
||||||
{{:redirect force="../equipment_history.html?ok=1&key=%s&prop=0&msg=retour"|args:$mvt_new.equipment}}
|
{{:redirect force="../historique.html?ok=1&key=%s&prop=0&msg=retour"|args:$mvt_new.equipment}}
|
||||||
{{/form}}
|
{{/form}}
|
||||||
|
|
||||||
{{:admin_header title="Retour de matériel" custom_css="../style.css" current="module_equipment"}}
|
{{:admin_header title="Retour de matériel" custom_css="./../../style.css" current="module_equipment"}}
|
||||||
{{:form_errors}}
|
{{:form_errors}}
|
||||||
|
|
||||||
{{* barre de navigation *}}
|
{{* barre de navigation *}}
|
|
@ -126,7 +126,7 @@
|
||||||
|
|
||||||
{{* Vérifier la cohérence des mouvements du matériel *}}
|
{{* Vérifier la cohérence des mouvements du matériel *}}
|
||||||
{{:include
|
{{:include
|
||||||
file="./_validate_modification.html"
|
file="./valider_modification.html"
|
||||||
keep="erreur"
|
keep="erreur"
|
||||||
movements=$movements_new
|
movements=$movements_new
|
||||||
}}
|
}}
|
||||||
|
@ -175,6 +175,25 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
{{if $equipment.stock == 0}}
|
||||||
|
{{* vérifier s'il y a au moins une entrée définitive *}}
|
||||||
|
{{:assign entree_def=false}}
|
||||||
|
{{#foreach from=$config.input_nature key=key}}
|
||||||
|
{{if $type == 'définitif'}}
|
||||||
|
{{:assign var="input_types." value=$key}}
|
||||||
|
{{/if}}
|
||||||
|
{{/foreach}}
|
||||||
|
{{#foreach from=$movements_new}}
|
||||||
|
{{if $operation|in:$input_types}}
|
||||||
|
{{:assign entree_def=true}}
|
||||||
|
{{:break}}
|
||||||
|
{{/if}}
|
||||||
|
{{/foreach}}
|
||||||
|
{{if ! $entree_def}}
|
||||||
|
{{:assign var="equipment.stock" value=null}}
|
||||||
|
{{/if}}
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
{{:save
|
{{:save
|
||||||
key=$equipment.key
|
key=$equipment.key
|
||||||
validate_schema="../equipment.schema.json"
|
validate_schema="../equipment.schema.json"
|
||||||
|
@ -207,7 +226,7 @@
|
||||||
user=$user_id
|
user=$user_id
|
||||||
storage=$_POST.storage
|
storage=$_POST.storage
|
||||||
}}
|
}}
|
||||||
{{:redirect force="../equipment_history.html?ok=1&key=%s&prop=%s&msg=modification"|args:$eqpmt_key:$prop}}
|
{{:redirect force="../historique.html?ok=1&key=%s&prop=%s&msg=modification"|args:$eqpmt_key:$prop}}
|
||||||
{{/form}}
|
{{/form}}
|
||||||
|
|
||||||
{{:admin_header title="Modifier un mouvement" current="module_equipment"}}
|
{{:admin_header title="Modifier un mouvement" current="module_equipment"}}
|
|
@ -107,7 +107,7 @@
|
||||||
|
|
||||||
{{* Vérifier la cohérence des mouvements du matériel *}}
|
{{* Vérifier la cohérence des mouvements du matériel *}}
|
||||||
{{:include
|
{{:include
|
||||||
file="./_validate_modification.html"
|
file="./valider_modification.html"
|
||||||
keep="erreur, pb"
|
keep="erreur, pb"
|
||||||
movements=$movements_new
|
movements=$movements_new
|
||||||
}}
|
}}
|
||||||
|
@ -162,13 +162,13 @@
|
||||||
return=$mvt_key
|
return=$mvt_key
|
||||||
}}
|
}}
|
||||||
{{if $_GET.user == null}}
|
{{if $_GET.user == null}}
|
||||||
{{:redirect force="../equipment_history.html?ok=1&key=%s&prop=1&msg=retour"|args:$mvt_new.equipment}}
|
{{:redirect force="../historique.html?ok=1&key=%s&prop=1&msg=retour"|args:$mvt_new.equipment}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{:redirect force="/admin/users/details.php?id=%s"|args:$_GET.user}}
|
{{:redirect force="/admin/users/details.php?id=%s"|args:$_GET.user}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/form}}
|
{{/form}}
|
||||||
|
|
||||||
{{:admin_header title="Retour de matériel" custom_css="../style.css" current="module_equipment"}}
|
{{:admin_header title="Retour de matériel" custom_css="./../../style.css" current="module_equipment"}}
|
||||||
{{:form_errors}}
|
{{:form_errors}}
|
||||||
|
|
||||||
{{* barre de navigation *}}
|
{{* barre de navigation *}}
|
|
@ -6,7 +6,7 @@
|
||||||
*}}
|
*}}
|
||||||
|
|
||||||
{{* 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"}}
|
||||||
|
|
||||||
{{* types de sorties *}}
|
{{* types de sorties *}}
|
||||||
{{#foreach from=$config.output_nature key=key}}
|
{{#foreach from=$config.output_nature key=key}}
|
||||||
|
@ -119,7 +119,7 @@
|
||||||
|
|
||||||
{{:save
|
{{:save
|
||||||
key=$equipment.key
|
key=$equipment.key
|
||||||
validate_schema="../equipment.schema.json"
|
validate_schema="../../equipment.schema.json"
|
||||||
type="equipment"
|
type="equipment"
|
||||||
category=$equipment.category
|
category=$equipment.category
|
||||||
name=$equipment.name
|
name=$equipment.name
|
||||||
|
@ -133,7 +133,7 @@
|
||||||
{{:assign mvt_key=""|uuid}}
|
{{:assign mvt_key=""|uuid}}
|
||||||
{{:save
|
{{:save
|
||||||
key=$mvt_key
|
key=$mvt_key
|
||||||
validate_schema="./movement.schema.json"
|
validate_schema="../movement.schema.json"
|
||||||
type="movement"
|
type="movement"
|
||||||
direction="output"
|
direction="output"
|
||||||
operation=$_POST.operation
|
operation=$_POST.operation
|
||||||
|
@ -143,13 +143,13 @@
|
||||||
comment=$_POST.remarques|trim
|
comment=$_POST.remarques|trim
|
||||||
user=$user.id
|
user=$user.id
|
||||||
}}
|
}}
|
||||||
{{:redirect force="../equipment_history.html?ok=1&key=%s&prop=1&msg=sortie"|args:$_GET.key}}
|
{{:redirect force="../../historique.html?ok=1&key=%s&prop=1&msg=sortie"|args:$_GET.key}}
|
||||||
{{/form}}
|
{{/form}}
|
||||||
|
|
||||||
{{:admin_header title="Sortie de matériel" custom_css="./../style.css" current="module_equipment"}}
|
{{:admin_header title="Sortie de matériel" custom_css="./../../style.css" current="module_equipment"}}
|
||||||
{{if ! $dialog}}
|
{{if ! $dialog}}
|
||||||
{{* barre de navigation *}}
|
{{* barre de navigation *}}
|
||||||
{{:include file="../_nav.html" current="sorties"}}
|
{{:include file="../../_nav.html" current="sorties"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#load key=$equipment.category assign="category"}}{{/load}}
|
{{#load key=$equipment.category assign="category"}}{{/load}}
|
|
@ -29,7 +29,7 @@
|
||||||
{{:assign link_key=$key}}
|
{{:assign link_key=$key}}
|
||||||
{{/load}}
|
{{/load}}
|
||||||
{{if $link_key != null}}
|
{{if $link_key != null}}
|
||||||
{{:redirect force="../equipment_history.html?key=%s&prop=%s&err=1&msg=suppression"|args:$mvt_suppr.equipment:$_GET.prop}}
|
{{:redirect force="../historique.html?key=%s&prop=%s&err=1&msg=suppression"|args:$mvt_suppr.equipment:$_GET.prop}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{:assign dispo=0}}
|
{{:assign dispo=0}}
|
||||||
|
@ -62,7 +62,7 @@
|
||||||
|
|
||||||
{{* problème ? *}}
|
{{* problème ? *}}
|
||||||
{{if $dispo < 0 || $nonprop < 0}}
|
{{if $dispo < 0 || $nonprop < 0}}
|
||||||
{{:redirect force="../equipment_history.html?key=%s&prop=%s&err=1&msg=suppression"|args:$mvt_suppr.equipment:$_GET.prop}}
|
{{:redirect force="../historique.html?key=%s&prop=%s&err=1&msg=suppression"|args:$mvt_suppr.equipment:$_GET.prop}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/load}}
|
{{/load}}
|
||||||
|
@ -83,7 +83,7 @@
|
||||||
{{:assign link_key=$key}}
|
{{:assign link_key=$key}}
|
||||||
{{/load}}
|
{{/load}}
|
||||||
{{if $link_key != null}}
|
{{if $link_key != null}}
|
||||||
{{:redirect force="../equipment_history.html?key=%s&prop=%s&err=1&msg=suppression"|args:$mvt_suppr.equipment:$_GET.prop}}
|
{{:redirect force="../historique.html?key=%s&prop=%s&err=1&msg=suppression"|args:$mvt_suppr.equipment:$_GET.prop}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{elseif $type_operation == 'retour'}}
|
{{elseif $type_operation == 'retour'}}
|
||||||
{{#load type="link" where="$$.return = :key" :key=$_GET.key}}
|
{{#load type="link" where="$$.return = :key" :key=$_GET.key}}
|
||||||
|
@ -148,7 +148,7 @@
|
||||||
out=$curr_eqpmt.out
|
out=$curr_eqpmt.out
|
||||||
notowned=$curr_eqpmt.notowned
|
notowned=$curr_eqpmt.notowned
|
||||||
}}
|
}}
|
||||||
{{:redirect force="../equipment_history.html?ok=1&key=%s&prop=%s&msg=suppression"|args:$mvt_suppr.equipment:$_GET.prop}}
|
{{:redirect force="../historique.html?ok=1&key=%s&prop=%s&msg=suppression"|args:$mvt_suppr.equipment:$_GET.prop}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{* supprimer le matériel *}}
|
{{* supprimer le matériel *}}
|
||||||
{{:delete key=$curr_eqpmt.key}}
|
{{:delete key=$curr_eqpmt.key}}
|
|
@ -80,7 +80,7 @@
|
||||||
{{if $direction == "output" && $type_mvt == "temporaire"}}
|
{{if $direction == "output" && $type_mvt == "temporaire"}}
|
||||||
{{:linkbutton
|
{{:linkbutton
|
||||||
label="Retour"
|
label="Retour"
|
||||||
href="%smovements/output_return.html?key=%s&prop=0&user=%s"|args:$module.url:$mvt_key:$user.id
|
href="%smouvements/output_return.html?key=%s&prop=0&user=%s"|args:$module.url:$mvt_key:$user.id
|
||||||
shape="history"
|
shape="history"
|
||||||
target="_dialog"}}
|
target="_dialog"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
{{/form}}
|
{{/form}}
|
||||||
|
|
||||||
|
|
||||||
{{:admin_header title="Lieux de stockage" custom_css="../style.css" current="module_equipment"}}
|
{{:admin_header title="Lieux de stockage" custom_css="./style.css" current="module_equipment"}}
|
||||||
{{:form_errors}}
|
{{:form_errors}}
|
||||||
|
|
||||||
{{#load key=$_GET.key limit="1" assign="store"}}{{/load}}
|
{{#load key=$_GET.key limit="1" assign="store"}}{{/load}}
|
||||||
|
|
|
@ -2,6 +2,13 @@
|
||||||
margin-top : 0.5em;
|
margin-top : 0.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
.informations legend {
|
||||||
|
font-weight: bold;
|
||||||
|
border-bottom : solid 1px;
|
||||||
|
margin-bottom : 0.5em;
|
||||||
|
}
|
||||||
|
*/
|
||||||
.informations dt::after {
|
.informations dt::after {
|
||||||
content: ' :';
|
content: ' :';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue