From 4d136fd259ce7da903066ba0ccfdd39b20033ff2 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Engel Date: Mon, 29 Sep 2025 11:57:39 +0200 Subject: [PATCH] Ajout interdiction dupliquer retour mouvement temporaire --- movements/copy_movement.html | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/movements/copy_movement.html b/movements/copy_movement.html index 3b84449..f4d5d13 100644 --- a/movements/copy_movement.html +++ b/movements/copy_movement.html @@ -17,6 +17,11 @@ {{:include file="../_get_config.html" keep="config, directions"}} {{:assign var="type_mvt" from="config.%s_nature.%s.type"|args:$mvt_new.direction:$mvt_new.operation}} +{{* interdire de dupliquer un retour => utiliser le bouton « Retour » *}} +{{if $type_mvt == "retour"}} + {{:error message="Opération interdite !"}} +{{/if}} + {{if $mvt_new.direction == "input"}} {{if $type_mvt == "temporaire"}} {{:assign prop=0}} @@ -24,11 +29,7 @@ {{:assign prop=1}} {{/if}} {{else}} - {{if $type_mvt == "retour"}} - {{:assign prop=0}} - {{else}} - {{:assign prop=1}} - {{/if}} + {{:assign prop=1}} {{/if}} {{* infos pour affichage *}} @@ -46,7 +47,7 @@ {{if $mvt_new.direction == "input"}} {{* types d'entrées *}} {{#foreach from=$config.input_nature key=key}} - {{if $_GET.prop && $type != "temporaire" || + {{if $_GET.prop && $type == "définitif" || ! $_GET.prop && $type == "temporaire" }} {{:assign var="input_labels.%s"|args:$key value=$label}} @@ -55,13 +56,12 @@ {{else}} {{* types de sorties *}} {{#foreach from=$config.output_nature key=key}} - {{if $_GET.prop && $type != "retour" || - ! $_GET.prop && $type == "retour" - }} + {{if $_GET.prop && $type != "retour"}} {{:assign var="output_labels.%s"|args:$key value=$label}} {{/if}} {{/foreach}} {{/if}} + {{* -------------------- Traiter la saisie -------------------- *}}