diff --git a/_inventory.html b/_inventory.html
index 213bcc9..ce8cffc 100644
--- a/_inventory.html
+++ b/_inventory.html
@@ -112,7 +112,7 @@
{{else}}
{{:assign prop="&prop=%s"|args:$selected_prop}}
{{/if}}
-
{{:link href="equipment_history.html?key=%s&prop=%s"|args:$key:$selected_prop" label=$name}} |
+ {{:link href="equipment_history.html?key=%s&prop=%s"|args:$key:$selected_prop label=$name}} |
{{$cat_name}} |
{{$stock}} |
{{$col4}} |
@@ -120,22 +120,8 @@
{{$out}} |
{{$col7}} |
-{{*
- {{if $col7 > 0}}
- {{:linkbutton
- label="Sortie"
- shape="minus"
- href="movements/output_equipment.html?key=%s"|args:$key
- target="_dialog"}}
- {{/if}}
- {{:linkbutton
- label="Entrée"
- shape="plus"
- href="movements/input_equipment.html?key=%s"|args:$key
- target="_dialog"}}
-*}}
{{:linkbutton
- label="Historique"
+ label="Mouvements"
href="equipment_history.html?key=%s&prop=1"|args:$key
shape="table"}}
{{:linkbutton
diff --git a/_nav.html b/_nav.html
index 10a41d0..c615e3d 100644
--- a/_nav.html
+++ b/_nav.html
@@ -3,13 +3,29 @@
diff --git a/archives.html b/archives.html
index efb1a22..5525aab 100644
--- a/archives.html
+++ b/archives.html
@@ -66,11 +66,11 @@
}}
|
- | {{$name}} |
+ {{:link href="equipment_history.html?key=%s&prop=1¤t=archives"|args:$key label=$name}} |
{{$col2}} |
{{:linkbutton
- label="Historique"
+ label="Mouvements"
href="equipment_history.html?key=%s&prop=1¤t=archives"|args:$key
shape="table"}}
{{:linkbutton
diff --git a/default.json b/default.json
index b9906b7..e46150c 100644
--- a/default.json
+++ b/default.json
@@ -26,7 +26,14 @@
{
"key" : "c9ba00d9-26ee-448b-9f02-73e479ec2980",
"label" : "Prêt",
- "type" : "temporaire"
+ "type" : "temporaire",
+ "fee" : "gratuit"
+ },
+ {
+ "key" : "5c6c20bf-53e9-49dc-bcd6-e3cac23a6786",
+ "label" : "Location",
+ "type" : "temporaire",
+ "fee" : "payant"
},
{
"key" : "fefefa51-1a85-46ca-ab78-b594b10390ff",
diff --git a/equipment_history.html b/equipment_history.html
index 83c0860..eda9501 100644
--- a/equipment_history.html
+++ b/equipment_history.html
@@ -31,25 +31,6 @@
{{else}}
{{:assign current="inventaire"}}
{{/if}}
-{{:include file="./_nav.html" current=$current subcurrent="historique" eqpmt=$equipment.name category=$category.name}}
-
-{{if $_GET.ok}}
- {{if $_GET.msg == "modification"}}
- Modification enregistrée
- {{elseif $_GET.msg == "copie"}}
- Mouvement copié
- {{elseif $_GET.msg == "retour"}}
- Retour enregistré
- {{elseif $_GET.msg == "suppression"}}
- Mouvement supprimé
- {{else}}
- Mouvement enregistré
- {{/if}}
-{{elseif $_GET.err}}
- {{if $_GET.msg == "suppression"}}
- Ce mouvement ne peut être supprimé
- {{/if}}
-{{/if}}
{{* récupérer la config des entrées/sorties *}}
{{:include file="./_get_config.html" keep="config"}}
@@ -248,6 +229,29 @@
{{:assign var="prop_options." value="1" label="Matériels propriété de l'association" href="?key=%s&prop=1"|args:$_GET.key}}
{{:assign var="prop_options." value="0" label="Matériels NON propriété de l'association" href="?key=%s&prop=0"|args:$_GET.key}}
+{{if $dispo_final > 0 && $selected_prop == null || $selected_prop}}
+ {{:assign sortie="sortie"}}
+{{/if}}
+{{:include file="./_nav.html" current=$current subcurrent="mouvements" eqpmt=$equipment.name category=$category.name sortie=$sortie key=$_GET.key}}
+
+{{if $_GET.ok}}
+ {{if $_GET.msg == "modification"}}
+ Modification enregistrée
+ {{elseif $_GET.msg == "copie"}}
+ Mouvement copié
+ {{elseif $_GET.msg == "retour"}}
+ Retour enregistré
+ {{elseif $_GET.msg == "suppression"}}
+ Mouvement supprimé
+ {{else}}
+ Mouvement enregistré
+ {{/if}}
+{{elseif $_GET.err}}
+ {{if $_GET.msg == "suppression"}}
+ Ce mouvement ne peut être supprimé
+ {{/if}}
+{{/if}}
+
-{{if $current != "archives"}}
-
-{{/if}}
-
{{* lister les mouvements du matériel passé en paramètre *}}
{{#list
type="movement"
@@ -275,6 +268,7 @@
where="%s"|args:$prop_condition
equipment=$equipment_key
order=1
+ desc=true
}}
{{:assign var="type_mvt" from="config.%s_nature.%s.type"|args:$direction:$operation}}
{{:assign var="op_label" from="config.%s_nature.%s.label"|args:$direction:$operation}}
@@ -352,10 +346,6 @@
|
{{/list}}
-{{if $dispo_final == 0 && $stock > 0 && $current != "archives"}}
- Il n'y a aucun matériel disponible, il n'est donc pas possible d'effectuer une sortie
-{{/if}}
-
{{:admin_footer}}
diff --git a/index.html b/index.html
index 740bf3b..d05fab9 100644
--- a/index.html
+++ b/index.html
@@ -14,6 +14,9 @@
{{else}}
{{#restrict block=true section="accounting" level="write"}}{{/restrict}}
+ {{#load type="category" count=true limit=1 assign="result"}}{{/load}}
+ {{:include file="_nav.html" current="inventaire" cat="%d"|args:$result.count subcurrent="stock"}}
+
{{if $_GET.ok}}
{{if $_GET.msg == "ajout" }}
Ajout effectué
@@ -28,9 +31,6 @@
Modification refusée
{{/if}}
- {{#load type="category" count=true limit=1 assign="result"}}{{/load}}
- {{:include file="_nav.html" current="inventaire" cat="%d"|args:$result.count subcurrent="stock"}}
-
{{if $result.count == 0}}
Il n'y a aucune catégorie : vous devez en ajouter.
{{else}}
diff --git a/loan_history.html b/loan_history.html
index a7ff7de..92c4ee1 100644
--- a/loan_history.html
+++ b/loan_history.html
@@ -99,10 +99,6 @@
}}
-
-
{{:assign premier=true}}
{{#select
users.nom AS nom,
diff --git a/loan_movements.html b/loan_movements.html
index 4a3f859..cf9fcda 100644
--- a/loan_movements.html
+++ b/loan_movements.html
@@ -104,10 +104,6 @@
}}
-
-
{{* lister les mouvements *}}
{{:assign premier=true}}
{{#select * FROM
diff --git a/member_loan.html b/member_loan.html
index 9f40061..28f7278 100644
--- a/member_loan.html
+++ b/member_loan.html
@@ -42,10 +42,6 @@
{{:assign out_keys=$out_keys|implode:","}}
{{:assign out_keys="("|cat:$out_keys|cat:")"}}
-
-
{{:assign premier=true}}
{{#select
nom, user, GROUP_CONCAT(mat_name, ", ") AS materiel, SUM(remain) AS quantite
@@ -90,12 +86,20 @@
{{$materiel}} |
{{else}}
- Aucun mouvement.
+ {{if $label == "prêt"}}
+ Aucun {{$label}} en cours.
+ {{elseif $label == "location"}}
+ Aucune {{$label}} en cours.
+ {{/if}}
{{/select}}
{{else}}
- Aucun mouvement.
+ {{if $label == "prêt"}}
+ Aucun {{$label}} en cours.
+ {{elseif $label == "location"}}
+ Aucune {{$label}} en cours.
+ {{/if}}
{{/if}}
{{:admin_footer}}
diff --git a/movements/add_new_equipment.html b/movements/add_new_equipment.html
index 30614d6..456cfdd 100644
--- a/movements/add_new_equipment.html
+++ b/movements/add_new_equipment.html
@@ -150,7 +150,7 @@