Ajout affichage montant avoir

This commit is contained in:
Jean-Christophe Engel 2026-05-09 10:51:45 +02:00
parent f34af9b3fd
commit f3ce9858ef
2 changed files with 23 additions and 8 deletions

View file

@ -59,8 +59,8 @@
}}
{{:assign total_credits="%d+%d"|math:$total_credits:$credit}}
{{/select}}
{{:assign var="ligne_immo.montant" value="%d-%d"|math:$ligne_immo.montant:$total_credits}}
{{:assign solde=$ligne_immo.montant}}
{{:assign montant_amortissable="%d-%d"|math:$ligne_immo.montant:$total_credits}}
{{:assign solde=$montant_amortissable}}
{{* lister les lignes des écritures d'amortissement liées à l'immobilisation *}}
{{#select
@ -105,10 +105,10 @@
{{/select}}
{{if $status == "amortized"}}
{{:assign amort_amount=$ligne_immo.montant}}
{{:assign amort_amount=$montant_amortissable}}
{{:assign valeur_residuelle=0}}
{{else}}
{{:assign valeur_residuelle=$ligne_immo.montant}}
{{:assign valeur_residuelle=$montant_amortissable}}
{{#foreach from=$linked_amort}}
{{:assign valeur_residuelle="%d-%d"|math:$valeur_residuelle:$amort_amount}}
{{/foreach}}
@ -239,8 +239,14 @@
<dl class="describe">
<dt>Immobilisation</dt>
<dd><span class="num"><a href="{{$trans_url}}">#{{$ligne_immo.immo_trans_id}}</a></span> {{$ligne_immo.label}}{{if $ligne_immo.line_label != null && $ligne_immo.line_label != $ligne_immo.label}} — {{$ligne_immo.line_label}}{{/if}}</dd>
<dt>Montant</dt>
<dt>Montant de l'immobilisation</dt>
<dd class="money strong">{{"%f"|math:$ligne_immo.montant|money_currency_html:false|raw}}</dd>
{{if $total_credits > 0}}
<dt>Montant des avoirs</dt>
<dd class="money">{{"%f"|math:$total_credits|money_currency_html:false|raw}}</dd>
<dt>Montant à amortir</dt>
<dd class="money strong">{{"%f"|math:$montant_amortissable|money_currency_html:false|raw}}</dd>
{{/if}}
<dt>Début d'amortissement</dt>
<dd>{{$date_debut|date_short}}</dd>
{{if $duree != null}}
@ -249,13 +255,13 @@
{{/if}}
{{if $valeur_residuelle > 0}}
<dt>Montant des amortissements</dt>
<dd>{{"%d-%d"|math:$ligne_immo.montant:$valeur_residuelle|money_currency_html:false|raw}}</dd>
<dd>{{"%d-%d"|math:$montant_amortissable:$valeur_residuelle|money_currency_html:false|raw}}</dd>
<dt>Valeur nette comptable</dt>
<dd>{{$valeur_residuelle|money_currency_html:false|raw}}</dd>
{{/if}}
{{if $duree != null && $valeur_residuelle > 0}}
<dt>Annuité estimée</dt>
<dd>{{"min(%d, %f/%d)"|math:$valeur_residuelle:$ligne_immo.montant:$duree|money_currency_html:false|raw}}</dd>
<dd>{{"min(%d, %f/%d)"|math:$valeur_residuelle:$montant_amortissable:$duree|money_currency_html:false|raw}}</dd>
{{/if}}
</dl>
</div>