From a0446a02ebf7ee6768c5a06f71367dda3b8c41e3 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Engel Date: Thu, 8 Jan 2026 18:21:42 +0100 Subject: [PATCH] Correction dysfonctionnement config unfinished --- _unfinished.html | 5 +++++ add_asset.html | 23 +++++++++++++++++++---- config.html | 5 +++++ transfer.html | 5 +++++ 4 files changed, 34 insertions(+), 4 deletions(-) diff --git a/_unfinished.html b/_unfinished.html index 500413c..5bd29f9 100644 --- a/_unfinished.html +++ b/_unfinished.html @@ -59,6 +59,11 @@ {{:assign accounts_condition="("}} {{#foreach from=$module.config.unfinished item="elem"}} + {{if $elem|has_key:"code"}} + {{:assign code=$elem.code}} + {{else}} + {{:assign code=$elem}} + {{/if}} {{:assign code=$elem.code|cat:"%"|quote_sql}} {{:assign accounts_condition=$accounts_condition|cat:" account.code LIKE "|cat:$code|cat:" OR "}} {{/foreach}} diff --git a/add_asset.html b/add_asset.html index 805311f..697020b 100644 --- a/add_asset.html +++ b/add_asset.html @@ -56,7 +56,12 @@ {{#foreach from=$module.config.prefixes item="code"}} {{:assign var="prefix_array." value=$code}} {{/foreach}} - {{#foreach from=$module.config.unfinished item="code"}} + {{#foreach from=$module.config.unfinished item="elem"}} + {{if $elem|has_key:"code"}} + {{:assign code=$elem.code}} + {{else}} + {{:assign code=$elem}} + {{/if}} {{:assign var="prefix_array." value=$code}} {{/foreach}} @@ -77,7 +82,12 @@ {{:assign credit_account=$credit_account|keys|value:0}} {{* déterminer si le compte d'immo est un compte d'immo en cours *}} - {{#foreach from=$module.config.unfinished item="code"}} + {{#foreach from=$module.config.unfinished item="elem"}} + {{if $elem|has_key:"code"}} + {{:assign code=$elem.code}} + {{else}} + {{:assign code=$elem}} + {{/if}} {{if $debit_account|strpos:$code === 0}} {{:assign status="unfinished"}} {{/if}} @@ -164,8 +174,13 @@ {{#foreach from=$module.config.prefixes item="code"}} {{:assign var="pattern_array." value="%s*"|args:$code}} {{/foreach}} -{{#foreach from=$module.config.unfinished item="code"}} - {{:assign var="pattern_array." value="%s*"|args:$code}} +{{#foreach from=$module.config.unfinished item="elem"}} + {{if $elem|has_key:"code"}} + {{:assign code=$elem.code}} + {{else}} + {{:assign code=$elem}} + {{/if}} +{{:assign var="pattern_array." value="%s*"|args:$code}} {{/foreach}} {{:assign var="patterns" value=$pattern_array|implode:"|"}} diff --git a/config.html b/config.html index 8cb3a61..00f0b4f 100644 --- a/config.html +++ b/config.html @@ -99,6 +99,11 @@ {{* libellés des comptes d'immobilisation en cours de constitution *}} {{:assign condition="("}} {{#foreach from=$module.config.unfinished item="elem"}} + {{if $elem|has_key:"code"}} + {{:assign code=$elem.code}} + {{else}} + {{:assign code=$elem}} + {{/if}} {{:assign code=$elem.code|quote_sql}} {{:assign condition=$condition|cat:" account.code = "|cat:$code|cat:" OR "}} {{/foreach}} diff --git a/transfer.html b/transfer.html index 71f123e..cba01e4 100644 --- a/transfer.html +++ b/transfer.html @@ -21,6 +21,11 @@ {{:include file="_get_config.html" keep="module.config.unfinished"}} {{:assign condition="("}} {{#foreach from=$module.config.unfinished item="elem"}} + {{if $elem|has_key:"code"}} + {{:assign code=$elem.code}} + {{else}} + {{:assign code=$elem}} + {{/if}} {{:assign code=$elem.code|cat:"%"|quote_sql}} {{:assign condition=$condition|cat:" account.code LIKE "|cat:$code|cat:" OR "}} {{/foreach}}