différentiation date d'acquisition et date mise en service

This commit is contained in:
Jean-Christophe Engel 2024-12-17 15:34:46 +01:00
parent 10f2128b1b
commit b17a14526e
7 changed files with 54 additions and 26 deletions

View file

@ -29,6 +29,7 @@
{{:error message="Pas d'info concernant l'immobilisation %s"|args:$_GET.immo_id}}
{{/load}}
{{:assign var="duree" from="info_immo.duration"|args:$_GET.immo_id}}
{{:assign date_debut=$info_immo.date|date_short}}
{{#select
line.id as immo_id,
@ -37,7 +38,6 @@
line.debit as montant,
trans.id as trans_id,
trans.label as label,
trans.date as date_achat,
y.id as year_id,
y.end_date as date_amort,
project.label as project_label
@ -49,7 +49,7 @@
:line_id = $_GET.immo_id|intval
assign=ligne_immo
}}
<h2>Amortissement de « {{$label}} » d'un montant de {{"%f"|math:$montant|money_currency}} en date du {{$date_achat|date_short}} sur {{$duree}} ans</h2>
<h2>Amortissement de « {{$label}} » d'un montant de {{"%f"|math:$montant|money_currency}} en date du {{$date_debut}} sur {{$duree}} ans</h2>
{{else}}
{{:error message="Immobilisation %s non trouvée"|args:$_GET.immo_id}}
{{/select}}
@ -97,9 +97,8 @@
{{:assign annuite="%f/%f"|math:$montant:$duree}}
{{* première annuité *}}
{{:assign date_achat=$ligne_immo.date_achat|date_short}}
{{:assign date_amort=$ligne_immo.date_amort|date_short}}
{{:include file="_calcul_dates.html" date_debut=$date_achat date_fin=$date_amort keep="nbjours"}}
{{:include file="_calcul_dates.html" date_debut=$date_debut date_fin=$date_amort keep="nbjours"}}
{{:assign annuite_1="%f/360*%d"|math:$annuite:$nbjours|intval}}
{{:assign annuite_courante=$annuite_1}}
@ -113,7 +112,7 @@
Amortissements attachés à « <a class="num"
href={{"%s/acc/transactions/details.php?id=%s"|args:$admin_url:$ligne_immo.trans_id}}>{{$ligne_immo.trans_id}}</a>
{{$ligne_immo.label}} »
({{"%f"|math:$ligne_immo.montant|money_currency}}, {{$ligne_immo.date_achat|date_short}})
({{"%f"|math:$ligne_immo.montant|money_currency}}, {{$date_debut}})
</h3>
<table class="list">
<thead>