Ajout totaux dans les onglets Amortissables, Amorties et En cours
This commit is contained in:
parent
900b0f5a47
commit
3e9f215816
4 changed files with 119 additions and 4 deletions
|
|
@ -47,6 +47,7 @@
|
|||
{{:assign condition=$condition|cat:" AND "|cat:$filter_condition}}
|
||||
|
||||
{{:assign nb_immo=0}}
|
||||
{{:assign total_immo = 0}}
|
||||
{{#select
|
||||
trans.id as trans_id,
|
||||
trans.label as trans_label,
|
||||
|
|
@ -148,11 +149,14 @@
|
|||
{{if $type_immo == "amortized" && $amort_amount < $debit && $status != "amortized"}}{{:continue}}{{/if}}
|
||||
|
||||
{{:assign nb_immo="%d+1"|math:$nb_immo}}
|
||||
{{:assign total_immo="%d+%d"|math:$total_immo:$debit}}
|
||||
{{:assign var="montant" from="sommes_immo.%s"|args:$account_code}}
|
||||
{{:assign var="sommes_immo.%s"|args:$account_code value="%d+%d"|math:$montant:$debit}}
|
||||
<tr>
|
||||
<td class="num"><a href={{$trans_url}}>#{{$trans_id}}</a></td>
|
||||
<td>{{$trans_date|date_short}}</td>
|
||||
<td>{{$trans_label}}</td>
|
||||
<td class="money">{{"%f"|math:$debit|money}}</td>
|
||||
<td class="money">{{$debit|money}}</td>
|
||||
<td class="money">{{if $duration != null}}{{$duration}}{{/if}}</td>
|
||||
<td><a href={{$compte_url}}>{{$account_code}}</a></td>
|
||||
<td>{{$account_label}}</td>
|
||||
|
|
@ -184,5 +188,19 @@
|
|||
</table>
|
||||
{{if $nb_immo == 0}}
|
||||
<p class="block alert">Aucune immobilisation</p>
|
||||
{{else}}
|
||||
<aside class="describe totals">
|
||||
<h3 class="ruler">Totaux</h3>
|
||||
{{if $total_immo != 0}}
|
||||
<dl class="describe">
|
||||
{{#foreach from=$sommes_immo|ksort key="code" item="value"}}
|
||||
<dt>Total du compte {{$code}}</dt>
|
||||
<dd>{{$value|money}}
|
||||
{{/foreach}}
|
||||
<dt>Montant total des immobilisations</dt>
|
||||
<dd><span class="strong">{{$total_immo|money}}</span></dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
</aside>
|
||||
{{/if}}
|
||||
</section>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue