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_code=$account_code|cat:"%"|quote_sql}}
|
||||||
{{:assign account_condition=$account_condition|cat:" account.code LIKE "|cat:$account_code|cat:" OR "}}
|
{{:assign account_condition=$account_condition|cat:" account.code LIKE "|cat:$account_code|cat:" OR "}}
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
|
{{:assign account_array=$module.config.prefixes}}
|
||||||
{{#foreach from=$module.config.unfinished item="account_code"}}
|
{{#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 "}}
|
{{:assign account_condition=$account_condition|cat:" account.code LIKE "|cat:$account_code|cat:" OR "}}
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
{{:assign account_condition=$account_condition|cat:"0)"}}
|
{{:assign account_condition=$account_condition|cat:"0)"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{:assign date_immo=$info_immo.date_achat|or:$ligne_immo.date_achat}}
|
{{:assign date_immo=$info_immo.date_achat|or:$ligne_immo.date_achat}}
|
||||||
|
|
||||||
{{#select
|
{{#select
|
||||||
|
|
@ -69,7 +75,6 @@
|
||||||
INNER JOIN acc_years AS y ON y.id = trans.id_year
|
INNER JOIN acc_years AS y ON y.id = trans.id_year
|
||||||
WHERE !account_condition
|
WHERE !account_condition
|
||||||
AND credit > 0
|
AND credit > 0
|
||||||
AND trans.date > :date_immo
|
|
||||||
AND credit_line_id NOT IN (
|
AND credit_line_id NOT IN (
|
||||||
SELECT json_extract(link.document, '$.credit_line_id') AS credit_line_id FROM !table as link
|
SELECT json_extract(link.document, '$.credit_line_id') AS credit_line_id FROM !table as link
|
||||||
WHERE json_extract(link.document, '$.type') == "credit_link"
|
WHERE json_extract(link.document, '$.type') == "credit_link"
|
||||||
|
|
@ -79,7 +84,6 @@
|
||||||
ORDER BY trans.date, trans.label;
|
ORDER BY trans.date, trans.label;
|
||||||
!account_condition = $account_condition
|
!account_condition = $account_condition
|
||||||
!table = $module.table
|
!table = $module.table
|
||||||
:date_immo = $date_immo
|
|
||||||
assign="credit_line"
|
assign="credit_line"
|
||||||
}}
|
}}
|
||||||
{{if $credit_line.credit_amount < $solde}}
|
{{if $credit_line.credit_amount < $solde}}
|
||||||
|
|
@ -164,7 +168,9 @@
|
||||||
{{if $_GET.filter}}
|
{{if $_GET.filter}}
|
||||||
<p class="block alert">Aucune écriture au crédit du compte {{$ligne_immo.account_code}} et sous-comptes</p>
|
<p class="block alert">Aucune écriture au crédit du compte {{$ligne_immo.account_code}} et sous-comptes</p>
|
||||||
{{else}}
|
{{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}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</section>
|
</section>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
name="Amortissements"
|
name="Amortissements"
|
||||||
description="Immobilisations et amortissements\nversion 0.41.2"
|
description="Immobilisations et amortissements\nversion 0.41.3"
|
||||||
author="Jean-Christophe Engel"
|
author="Jean-Christophe Engel"
|
||||||
author_url="https://gitea.zaclys.com/lesanges"
|
author_url="https://gitea.zaclys.com/lesanges"
|
||||||
home_button=false
|
home_button=false
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue