- #{{$t_id}} |
- {{$t_date|date_short}} |
- {{"%f"|math:$montant|money}} |
- {{if $l_label == null}}
- {{$t_label}}
+ | {{"%d+1"|math:$num}} |
+ {{$date_amort}} |
+ {{"%f"|math:$annuite_courante|money}} |
+ {{if $solde == 0}}0,00{{else}}{{"%f"|math:$solde|money}}{{/if}} |
+
+ {{if $libelle == null}}
+ {{:assign libelle="Amortissement "|cat:$ligne_immo.label}}
+ {{/if}}
+ {{$libelle}}
+ |
+
+ {{if $enregistrer == 1}}
+ {{:linkbutton
+ label="Enregistrer"
+ href="save_amort.html?amount=%d&account=%s&year=%s&trans_id=%d&immo_id=%s&project_id=%d&label=%s"|args:$annuite_courante:$ligne_immo.account_id:$current_year:$ligne_immo.trans_id:$_GET.immo_id:$project_id:$libelle
+ shape="right"
+ target="_dialog"
+ }}
+ {{else}}
+ {{:linkbutton label="Enregistrer" href="" shape="lock" class="disabled"}}
+ {{/if}}
+ |
+
+ {{:assign jour=$date_amort|date:"d"}}
+ {{:assign mois=$date_amort|date:"m"}}
+ {{:assign annee=$date_amort|date:"Y"}}
+ {{:assign annee="%d+1"|math:$annee}}
+ {{:assign date_amort="%s/%s/%s"|args:$jour:$mois:$annee|parse_date|date_short}}
+ {{:assign annuite_courante="min(%f,%f)"|math:$annuite:$solde}}
+ {{if $solde == 0}}{{:break}}{{/if}}
+ {{/foreach}}
+