Généralisation comptes immobilisation

This commit is contained in:
Jean-Christophe Engel 2024-12-18 11:06:41 +01:00
parent 92622fb9a0
commit 33ad15dbfc
4 changed files with 38 additions and 19 deletions

View file

@ -2,7 +2,7 @@
{{*
vérifier :
- que le compte débute par le préfixe corect
- que le compte débute par le préfixe correct
- est présent dans le PC indiqué
paramètres :
- account : tableau avec un identifiant de compte
@ -12,13 +12,14 @@
- account_ok
*}}
{{:assign account_code=$account|keys|key:0}}
{{:assign quote="'"}}
{{:assign condition=" AND ("}}
{{#foreach from=$prefix_array item="code"}}
{{:assign condition=$condition|cat:" code LIKE "|cat:$code|cat:" OR "}}
{{:assign condition=$condition|cat:" code LIKE "|cat:$quote|cat:$code|cat:"%"|cat:$quote|cat:" OR "}}
{{/foreach}}
{{:assign condition=$condition|cat:"0)"}}
{{:assign account_code=$account|keys|key:0}}
{{#sql
select="code"
tables="acc_accounts"