From 318bbce35385222bce7f71c6e4546c423f5ce584 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Engel Date: Tue, 26 Mar 2024 09:17:20 +0100 Subject: [PATCH] =?UTF-8?q?Simplification=20d=C3=A9termination=20num=C3=A9?= =?UTF-8?q?ro=20compte?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _get_codes.html | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/_get_codes.html b/_get_codes.html index 93c615b..a780b40 100644 --- a/_get_codes.html +++ b/_get_codes.html @@ -4,12 +4,7 @@ déterminer le numéro du compte passé en paramètre dans un tableau *}} -{{:assign key=$account|keys|key:0}} {{:assign label=$account|values|key:0}} - -{{:assign pos=$label|strpos:$key}} -{{if $pos == false}} - {{:assign pos=$label|strpos:" "}} - {{:assign account_code=$label|substr:0:$pos}} -{{/if}} +{{:assign pos=$label|strpos:" "}} +{{:assign account_code=$label|substr:0:$pos}} {{:assign var="account_code.%s"|args:$account_code value=$label}}