From b923ad1b85358e43e790fa53b71450b68d358ffc Mon Sep 17 00:00:00 2001 From: Jean-Christophe Engel Date: Tue, 23 Jun 2026 10:19:17 +0200 Subject: [PATCH] Ajout montant cession manquant --- exit_step4.html | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/exit_step4.html b/exit_step4.html index f377496..7868913 100644 --- a/exit_step4.html +++ b/exit_step4.html @@ -44,6 +44,24 @@ {{* 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 une écriture de cession associée *}} +{{#load type="cession_link" + where="$$.immo_doc_id = :immo_doc_id" + :immo_doc_id = $_GET.immo_doc_id|intval + }} + {{if $amount == null || $amount == 0}} + {{#select credit + FROM acc_transactions_lines + WHERE id = :cession_line_id; + :cession_line_id = $cession_line_id + }} + {{:assign montant_cession=$credit}} + {{/select}} + {{else}} + {{:assign montant_cession=$amount}} + {{/if}} +{{/load}} + {{* chercher une écriture de sortie de bilan associée *}} {{#load type="exit_link" where="$$.immo_doc_id = :immo_doc_id" :immo_doc_id=$info_immo.id assign="exit_info"}} {{/load}} @@ -200,6 +218,10 @@
Valeur nette résiduelle
{{"%d-%d"|math:$solde:$total_amort|money_currency_html:false|raw}}
{{/if}} + {{if $montant_cession > 0}} +
Montant de la cession
+
{{$montant_cession|money_currency_html:false|raw}}
+ {{/if}}