Simplification et amélioration présentation

This commit is contained in:
Jean-Christophe Engel 2026-06-05 14:10:03 +02:00
parent 023a2b81bd
commit b3aeb9b09c
7 changed files with 63 additions and 78 deletions

View file

@ -27,11 +27,11 @@
{{* lister les amortissements liés à l'immobilisation *}}
{{:include file="./_get_amort_lines.html" immo_doc_id=$_GET.immo_doc_id keep="linked_amort, total_amort"}}
{{* chercher des écritures au crédit du compte de l'immo sans doc associé *}}
{{*
- line.credit < ligne_immo.amount => peut-être un avoir
- line.credit = ligne_immo.amount - avoirs => écriture de sortie du bilan
*}}
chercher des écritures au crédit du compte de l'immo sans doc associé
- line.credit < ligne_immo.amount => peut-être un avoir
- line.credit = ligne_immo.amount - avoirs => écriture de sortie du bilan
*}}
{{#select
trans.id as trans_id,
trans.label as trans_label,
@ -51,8 +51,12 @@
acc.code = :acc_code
AND line.credit > 0
AND credit_line_id NOT IN (
SELECT json_extract(link.document, '$.credit_line_id') AS line_id FROM !table as link
WHERE json_extract(link.document, '$.type') == "credit_link")
SELECT json_extract(credit_link.document, '$.credit_line_id') AS line_id FROM !table as credit_link
WHERE json_extract(credit_link.document, '$.type') == "credit_link"
UNION
SELECT json_extract(exit_link.document, '$.exit_line_id') AS line_id FROM !table as exit_link
WHERE json_extract(exit_link.document, '$.type') == "exit_link"
)
;
:acc_code=$ligne_immo.account_code
!table =$module.table
@ -60,8 +64,6 @@
}}
{{if $credit_line.amount < $solde}}
{{:assign var="credit_lines." value=$credit_line}}
{{elseif $credit_line.amount == $solde}}
{{:assign var="exit_lines." value=$credit_line}}
{{/if}}
{{/select}}