Correction erreur calcul montant + réorganisation affichage
This commit is contained in:
parent
b91c1087ae
commit
061a27d40d
@ -172,10 +172,11 @@
|
|||||||
</section>
|
</section>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
{{if $solde > 0}}
|
||||||
{{:assign project_id=$ligne_immo.project_id}}
|
{{:assign project_id=$ligne_immo.project_id}}
|
||||||
{{:assign project_label=$ligne_immo.project_label}}
|
{{:assign project_label=$ligne_immo.project_label}}
|
||||||
{{:assign nbamort="%d-%d"|math:$duree:$nbamort}}
|
{{:assign nbamort="%d-%d"|math:$duree:$nbamort}}
|
||||||
|
{{:assign annuite_courante="min(%f,%f)"|math:$annuite:$solde}}
|
||||||
<section class="amortissement">
|
<section class="amortissement">
|
||||||
<h3 class="ruler">Amortissements à enregistrer</h3>
|
<h3 class="ruler">Amortissements à enregistrer</h3>
|
||||||
<table class="list">
|
<table class="list">
|
||||||
@ -233,23 +234,9 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</section>
|
</section>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
<section class="amortissement">
|
{{* Autres amortissements non rattachés *}}
|
||||||
<h3 class="ruler">Autres amortissements non rattachés</h3>
|
|
||||||
<table class="list">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>N°</th>
|
|
||||||
<th>Date</th>
|
|
||||||
<th class="nombre">Montant</th>
|
|
||||||
<th>Libellé</th>
|
|
||||||
<th>N° compte</th>
|
|
||||||
<th>Compte</th>
|
|
||||||
<th class="actions"></th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
|
|
||||||
{{#select
|
{{#select
|
||||||
li.id as l_id,
|
li.id as l_id,
|
||||||
li.id_transaction as t_id,
|
li.id_transaction as t_id,
|
||||||
@ -266,7 +253,8 @@
|
|||||||
inner join acc_transactions as trans on trans.id = li.id_transaction
|
inner join acc_transactions as trans on trans.id = li.id_transaction
|
||||||
inner join acc_years as y on y.id = trans.id_year
|
inner join acc_years as y on y.id = trans.id_year
|
||||||
where acc.code like "28%"
|
where acc.code like "28%"
|
||||||
order by trans.date, trans.label
|
order by trans.date, trans.label;
|
||||||
|
assign=autre_amort
|
||||||
}}
|
}}
|
||||||
{{:assign linked="false"}}
|
{{:assign linked="false"}}
|
||||||
{{#select
|
{{#select
|
||||||
@ -274,37 +262,58 @@
|
|||||||
id_related
|
id_related
|
||||||
from acc_transactions_links
|
from acc_transactions_links
|
||||||
where id_transaction = :id_amort or id_related = :id_amort;
|
where id_transaction = :id_amort or id_related = :id_amort;
|
||||||
:id_amort=$t_id}}
|
:id_amort=$t_id
|
||||||
{{:assign linked="true"}}
|
}}
|
||||||
|
{{:assign var=autre_amort.linked value="true"}}
|
||||||
|
{{else}}
|
||||||
|
{{:assign var="autres_amortissements." value=$autre_amort}}
|
||||||
|
{{/select}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
|
|
||||||
{{if $linked != "true"}}
|
{{if $autres_amortissements != null}}
|
||||||
{{:assign trans_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$t_id}}
|
<section class="amortissement">
|
||||||
|
<h3 class="ruler">Autres amortissements non rattachés</h3>
|
||||||
|
<table class="list">
|
||||||
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="num"><a href={{$trans_url}}>#{{$t_id}}</a></td>
|
<th>N°</th>
|
||||||
<td>{{$t_date|date_short}}</td>
|
<th>Date</th>
|
||||||
<td class="money">{{"%f"|math:$montant|money}}</td>
|
<th class="nombre">Montant</th>
|
||||||
<td>{{if $l_label == null}}
|
<th>Libellé</th>
|
||||||
{{$t_label}}
|
<th>N° compte</th>
|
||||||
|
<th>Compte</th>
|
||||||
|
<th class="actions"></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
|
||||||
|
{{#foreach from=$autres_amortissements item="line"}}
|
||||||
|
{{:assign trans_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$line.t_id}}
|
||||||
|
<tr>
|
||||||
|
<td class="num"><a href={{$trans_url}}>#{{$line.t_id}}</a></td>
|
||||||
|
<td>{{$line.t_date|date_short}}</td>
|
||||||
|
<td class="money">{{"%f"|math:$line.montant|money}}</td>
|
||||||
|
<td>{{if $line.l_label == null}}
|
||||||
|
{{$line.t_label}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{$l_label}}
|
{{$line.l_label}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</td>
|
</td>
|
||||||
<td>{{$a_code}}</td>
|
<td>{{$line.a_code}}</td>
|
||||||
<td>{{$a_label}}</td>
|
<td>{{$line.a_label}}</td>
|
||||||
<td>
|
<td>
|
||||||
{{if $linked != "true"}}
|
{{if $linked != "true"}}
|
||||||
{{:linkbutton label="Attacher" href="attach_amort.html?amort_id=%d&immo_id=%d"|args:$l_id:$ligne_immo.immo_id shape="plus"}}
|
{{:linkbutton label="Attacher" href="attach_amort.html?amort_id=%d&immo_id=%d"|args:$line.l_id:$ligne_immo.immo_id shape="plus"}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{:linkbutton label="Attacher" href="" shape="lock" class="disabled"}}
|
{{:linkbutton label="Attacher" href="" shape="lock" class="disabled"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{/if}}
|
{{/foreach}}
|
||||||
{{/select}}
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</section>
|
</section>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
{{:form_errors}}
|
{{:form_errors}}
|
||||||
{{:admin_footer}}
|
{{:admin_footer}}
|
||||||
|
Loading…
Reference in New Issue
Block a user