amélioration vérification nom catégorie et matériel
This commit is contained in:
parent
42d85fb528
commit
72cd82d254
4 changed files with 12 additions and 21 deletions
|
|
@ -32,13 +32,10 @@
|
|||
{{:assign post_mat=$_POST.designation|trim|tolower|ucfirst}}
|
||||
|
||||
{{* vérifier l'existence d'un matériel de même nom *}}
|
||||
{{#load type="equipment"}}
|
||||
{{if $_POST.designation|trim|tolower == $designation|tolower}}
|
||||
{{:assign equipment_key=$key}}
|
||||
{{:assign var=nom_cat from="categories.%s"|args:$category}}
|
||||
{{:assign present=true}}
|
||||
{{:break}}
|
||||
{{/if}}
|
||||
{{#load type="equipment" where="$$.designation = :name COLLATE U_NOCASE" :name=$_POST.designation|trim limit=1}}}}
|
||||
{{:assign equipment_key=$key}}
|
||||
{{:assign var=nom_cat from="categories.%s"|args:$category}}
|
||||
{{:assign present=true}}
|
||||
{{/load}}
|
||||
{{:assign var=post_cat from="categories.%s"|args:$_POST.category}}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue