Correction erreur, simplification recherche, amélioration message
This commit is contained in:
parent
371d9dd0e3
commit
f735245273
2 changed files with 12 additions and 6 deletions
|
|
@ -42,13 +42,19 @@
|
|||
{{:assign account_code=$account_code|cat:"%"|quote_sql}}
|
||||
{{:assign account_condition=$account_condition|cat:" account.code LIKE "|cat:$account_code|cat:" OR "}}
|
||||
{{/foreach}}
|
||||
{{:assign account_array=$module.config.prefixes}}
|
||||
{{#foreach from=$module.config.unfinished item="account_code"}}
|
||||
{{:assign account_code=$account_code|cat:"%"|quote_sql}}
|
||||
{{if $account_code.code != null}}
|
||||
{{:assign var="account_array." value=$account_code.code}}
|
||||
{{:assign account_code=$account_code.code|cat:"%"|quote_sql}}
|
||||
{{else}}
|
||||
{{:assign var="account_array." value=$account_code}}
|
||||
{{:assign account_code=$account_code|cat:"%"|quote_sql}}
|
||||
{{/if}}
|
||||
{{:assign account_condition=$account_condition|cat:" account.code LIKE "|cat:$account_code|cat:" OR "}}
|
||||
{{/foreach}}
|
||||
{{:assign account_condition=$account_condition|cat:"0)"}}
|
||||
{{/if}}
|
||||
|
||||
{{:assign date_immo=$info_immo.date_achat|or:$ligne_immo.date_achat}}
|
||||
|
||||
{{#select
|
||||
|
|
@ -69,7 +75,6 @@
|
|||
INNER JOIN acc_years AS y ON y.id = trans.id_year
|
||||
WHERE !account_condition
|
||||
AND credit > 0
|
||||
AND trans.date > :date_immo
|
||||
AND credit_line_id NOT IN (
|
||||
SELECT json_extract(link.document, '$.credit_line_id') AS credit_line_id FROM !table as link
|
||||
WHERE json_extract(link.document, '$.type') == "credit_link"
|
||||
|
|
@ -79,7 +84,6 @@
|
|||
ORDER BY trans.date, trans.label;
|
||||
!account_condition = $account_condition
|
||||
!table = $module.table
|
||||
:date_immo = $date_immo
|
||||
assign="credit_line"
|
||||
}}
|
||||
{{if $credit_line.credit_amount < $solde}}
|
||||
|
|
@ -164,7 +168,9 @@
|
|||
{{if $_GET.filter}}
|
||||
<p class="block alert">Aucune écriture au crédit du compte {{$ligne_immo.account_code}} et sous-comptes</p>
|
||||
{{else}}
|
||||
<p class="block alert">Aucune écriture au crédit du compte {{$ligne_immo.account_code|substr:0:2}} et sous-comptes</p>
|
||||
{{:assign account_array=$account_array|sort}}
|
||||
{{:assign account_list=$account_array|implode:","}}
|
||||
<p class="block alert">Aucune écriture au crédit des comptes {{$account_list}} et sous-comptes</p>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</section>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue