Compare commits
No commits in common. "b5afcb8ea380ade86796300ab650b06c090b8ce7" and "64d57b8560861983ace646930a4a64b3ae5dfe8c" have entirely different histories.
b5afcb8ea3
...
64d57b8560
@ -9,19 +9,11 @@
|
|||||||
|
|
||||||
{{* Traiter l'envoi du formulaire *}}
|
{{* Traiter l'envoi du formulaire *}}
|
||||||
{{#form on="save"}}
|
{{#form on="save"}}
|
||||||
{{* Vérifier s'il existe déjà une catégorie avec le même nom *}}
|
|
||||||
{{#load type="category"}}
|
|
||||||
{{if $name|tolower == $_POST.name|trim|tolower && $key != $_GET.key}}
|
|
||||||
{{:error message="Modification impossible car ce nom de catégorie (« %s ») existe déjà !"|args:$name|trim}}
|
|
||||||
{{:break}}
|
|
||||||
{{/if}}
|
|
||||||
{{/load}}
|
|
||||||
|
|
||||||
{{:save
|
{{:save
|
||||||
key=$category.key
|
key=$category.key
|
||||||
validate_schema="./category.schema.json"
|
validate_schema="./category.schema.json"
|
||||||
type="category"
|
type="category"
|
||||||
name=$_POST.name|trim|tolower|ucfirst
|
name=$_POST.name|trim
|
||||||
}}
|
}}
|
||||||
{{:redirect force="./index.html?ok=1&msg=modification"}}
|
{{:redirect force="./index.html?ok=1&msg=modification"}}
|
||||||
{{/form}}
|
{{/form}}
|
||||||
|
@ -42,6 +42,7 @@
|
|||||||
|
|
||||||
{{#list
|
{{#list
|
||||||
select="
|
select="
|
||||||
|
$$.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' ;
|
||||||
@ -53,7 +54,7 @@
|
|||||||
type="movement"
|
type="movement"
|
||||||
group="$$.equipment"
|
group="$$.equipment"
|
||||||
direction="input"
|
direction="input"
|
||||||
order=1
|
order=2
|
||||||
}}
|
}}
|
||||||
|
|
||||||
{{:assign var=cat_key from="equipments.%s.category"|args:$equipment}}
|
{{:assign var=cat_key from="equipments.%s.category"|args:$equipment}}
|
||||||
@ -71,7 +72,8 @@
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{$col1}}</td>
|
<td>{{$date|date_short}}</td>
|
||||||
|
<td>{{$col2}}</td>
|
||||||
<td>{{$cat_name}}</td>
|
<td>{{$cat_name}}</td>
|
||||||
<td>{{$stock}}</td>
|
<td>{{$stock}}</td>
|
||||||
<td>{{if $exterieur == null}}0{{else}}{{$exterieur}}{{/if}}</td>
|
<td>{{if $exterieur == null}}0{{else}}{{$exterieur}}{{/if}}</td>
|
||||||
|
@ -42,6 +42,7 @@
|
|||||||
|
|
||||||
{{#list
|
{{#list
|
||||||
select="
|
select="
|
||||||
|
$$.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' ;
|
||||||
@ -51,7 +52,7 @@
|
|||||||
type="movement"
|
type="movement"
|
||||||
group="$$.equipment"
|
group="$$.equipment"
|
||||||
direction="input"
|
direction="input"
|
||||||
order=1
|
order=2
|
||||||
}}
|
}}
|
||||||
|
|
||||||
{{:assign var=cat_key from="equipments.%s.category"|args:$equipment}}
|
{{:assign var=cat_key from="equipments.%s.category"|args:$equipment}}
|
||||||
@ -66,7 +67,8 @@
|
|||||||
{{:continue}}
|
{{:continue}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{$col1}}</td>
|
<td>{{$date|date_short}}</td>
|
||||||
|
<td>{{$col2}}</td>
|
||||||
<td>{{$cat_name}}</td>
|
<td>{{$cat_name}}</td>
|
||||||
<td>{{$qte}}</td>
|
<td>{{$qte}}</td>
|
||||||
<td class="actions">
|
<td class="actions">
|
||||||
|
@ -32,12 +32,6 @@
|
|||||||
|
|
||||||
{{* Traiter l'envoi du formulaire *}}
|
{{* Traiter l'envoi du formulaire *}}
|
||||||
{{#form on="save"}}
|
{{#form on="save"}}
|
||||||
|
|
||||||
{{* vérifier la quantité saisie *}}
|
|
||||||
{{if $_POST.quantite <= 0}}
|
|
||||||
{{:error message="La quantité (%s) doit être strictement positive !!"|args:$_POST.quantite}}
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
{{* Enregistrer le mouvement *}}
|
{{* Enregistrer le mouvement *}}
|
||||||
{{:assign mvt_key=""|uuid}}
|
{{:assign mvt_key=""|uuid}}
|
||||||
{{:assign var="operation" from="input_labels.%d|args:$_POST.nature_operation}}
|
{{:assign var="operation" from="input_labels.%d|args:$_POST.nature_operation}}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
{{*
|
{{*
|
||||||
paramètres :
|
paramètres :
|
||||||
- key : clé du matériel qui revient
|
- key : clé du mouvement à modifier
|
||||||
- prop : = 1 si matériel propriété
|
- prop : = 1 si matériel propriété
|
||||||
*}}
|
*}}
|
||||||
|
|
||||||
@ -82,7 +82,7 @@
|
|||||||
{{* formulaire d'entrée de matériel *}}
|
{{* formulaire d'entrée de matériel *}}
|
||||||
<form method="post" action="">
|
<form method="post" action="">
|
||||||
<fieldset class="entree">
|
<fieldset class="entree">
|
||||||
<legend>Ajouter un retour de matériel</legend>
|
<legend>Ajouter une entrée pour un retour de matériel</legend>
|
||||||
<dl>
|
<dl>
|
||||||
{{:input type="select" name="type_operation" label="Type" required=true options=$input_labels}}
|
{{:input type="select" name="type_operation" label="Type" required=true options=$input_labels}}
|
||||||
{{:input type="date" name="date" label="Date" required=true default=$now|date_short}}
|
{{:input type="date" name="date" label="Date" required=true default=$now|date_short}}
|
||||||
|
Loading…
Reference in New Issue
Block a user