Filtrer les libellés des écritures

This commit is contained in:
Jean-Christophe Engel 2025-11-19 11:27:59 +01:00
parent 262b25889b
commit 900b0f5a47
9 changed files with 171 additions and 11 deletions

View file

@ -23,6 +23,14 @@
{{:error message="Immobilisation %s non trouvée"|args:$_GET.immo_id}}
{{/select}}
{{:include file="_get_config.html" keep="module.config"}}
{{:assign filter_condition=" NOT ("}}
{{#foreach from=$module.config.filters item="filter"}}
{{:assign filter="%"|cat:$filter|cat:"%"|quote_sql}}
{{:assign filter_condition=$filter_condition|cat:" trans.label LIKE "|cat:$filter|cat:" OR "}}
{{/foreach}}
{{:assign filter_condition=$filter_condition|cat:"0)"}}
{{#select
line.id as l_id,
line.id_transaction as t_id,
@ -38,8 +46,9 @@
INNER JOIN acc_accounts AS account ON account.id = line.id_account
INNER JOIN acc_transactions AS trans ON trans.id = line.id_transaction
INNER JOIN acc_years AS y ON y.id = trans.id_year
WHERE account.code LIKE "28%" AND credit > 0 AND (NOT trans.status & 16)
WHERE account.code LIKE "28%" AND credit > 0 AND (NOT trans.status & 16) AND !filter_condition
ORDER BY trans.date, trans.label;
!filter_condition=$filter_condition
assign=autre_amort
}}
{{#select