Correction erreur solde immo

This commit is contained in:
Jean-Christophe Engel 2026-05-06 13:09:11 +02:00
parent a1ce03a7b4
commit c07b77e942

View file

@ -63,15 +63,14 @@
{{:assign total_credits="%d+%d"|math:$total_credits:$amount}}
{{/if}}
{{/load}}
{{:assign var="ligne_immo.montant" value="%d-%d"|math:$ligne_immo.montant:$total_credits}}
{{:assign solde=$ligne_immo.montant}}
{{:assign solde="%d-%d"|math:$ligne_immo.montant:$total_credits}}
{{*:debug info_immo=$info_immo ligne_immo=$ligne_immo total_credits=$total_credits solde=$solde*}}
{{if $info_immo.status == "amortized"}}
{{:assign amort_amount=$ligne_immo.montant}}
{{:assign amort_amount=$solde}}
{{:assign valeur_residuelle=0}}
{{else}}
{{:assign valeur_residuelle=$ligne_immo.montant}}
{{:assign valeur_residuelle=$solde}}
{{/if}}
{{* lister les lignes des écritures d'amortissement liées à l'immobilisation *}}
@ -208,13 +207,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:$solde:$valeur_residuelle|money_currency_html:false|raw}}</dd>
<dt>Valeur nette comptable</dt>
<dd>{{$valeur_residuelle|money_currency_html:false|raw}}</dd>
{{/if}}
{{if $info_immo.duration != null && $valeur_residuelle > 0}}
<dt>Annuité estimée</dt>
<dd>{{"min(%d, %f/%d)"|math:$valeur_residuelle:$ligne_immo.montant:$info_immo.duration|money_currency_html:false|raw}}</dd>
<dd>{{"min(%d, %f/%d)"|math:$valeur_residuelle:solde:$info_immo.duration|money_currency_html:false|raw}}</dd>
{{/if}}
</dl>
</div>