Ajout affichage montant avoir
This commit is contained in:
parent
f34af9b3fd
commit
f3ce9858ef
2 changed files with 23 additions and 8 deletions
|
|
@ -27,11 +27,13 @@
|
|||
{{/select}}
|
||||
|
||||
{{* chercher les liaisons de l'écriture d'immobilisation *}}
|
||||
{{:assign total_credits=0}}
|
||||
{{#select
|
||||
CASE links.id_related = :immo_trans_id
|
||||
WHEN true THEN links.id_transaction
|
||||
WHEN false THEN links.id_related
|
||||
END as linked_id,
|
||||
line.credit,
|
||||
acc.code
|
||||
FROM acc_transactions_links as links
|
||||
INNER JOIN acc_transactions_lines AS line on line.id_transaction = linked_id
|
||||
|
|
@ -41,6 +43,7 @@
|
|||
;
|
||||
:immo_trans_id = $ligne_immo.immo_trans_id
|
||||
}}
|
||||
{{:assign total_credits="%d+%d"|math:$total_credits:$credit}}
|
||||
{{:assign var="linked_transactions.%d."|args:$code value=$linked_id}}
|
||||
{{/select}}
|
||||
{{:assign var="immo_transactions" from="linked_transactions.%d"|args:$ligne_immo.code}}
|
||||
|
|
@ -173,8 +176,14 @@
|
|||
<dl class="describe">
|
||||
<dt>Immobilisation</dt>
|
||||
<dd><span class="num"><a href="{{$trans_url}}">#{{$ligne_immo.immo_trans_id}}</a></span> {{$ligne_immo.label}}{{if $ligne_immo.line_label != null && $ligne_immo.line_label != $ligne_immo.label}} — {{$ligne_immo.line_label}}{{/if}}</dd>
|
||||
<dt>Montant</dt>
|
||||
<dt>Montant de l'immobilisation</dt>
|
||||
<dd class="money strong">{{"%f"|math:$ligne_immo.montant|money_currency_html:false|raw}}</dd>
|
||||
{{if $total_credits > 0}}
|
||||
<dt>Montant des avoirs</dt>
|
||||
<dd class="money">{{"%f"|math:$total_credits|money_currency_html:false|raw}}</dd>
|
||||
<dt>Montant à amortir</dt>
|
||||
<dd class="money">{{"%d-%d"|math:$ligne_immo.montant:$total_credits|money_currency_html:false|raw}}</dd>
|
||||
{{/if}}
|
||||
<dt>Date de l'écriture d'immobilisation</dt>
|
||||
<dd>{{$ligne_immo.date_achat|date_short}}</dd>
|
||||
</dl>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue