Compare commits
1 commit
8357b39d39
...
d7456a9549
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d7456a9549 |
7 changed files with 15 additions and 18 deletions
|
|
@ -89,8 +89,7 @@
|
|||
WHEN true THEN links.id_transaction
|
||||
WHEN false THEN links.id_related
|
||||
END as other_id,
|
||||
line.credit,
|
||||
MAX(trans2.date) as exit_date
|
||||
line.credit
|
||||
FROM acc_transactions AS trans
|
||||
INNER JOIN acc_transactions_links as links
|
||||
ON (trans.id = links.id_transaction OR trans.id = links.id_related)
|
||||
|
|
@ -105,7 +104,6 @@
|
|||
assign="credit_immo."
|
||||
}}
|
||||
{{:assign solde_immo="%d-%d"|math:$solde_immo:$credit}}
|
||||
{{:assign exit_date=$exit_date}}
|
||||
{{/select}}
|
||||
|
||||
{{if $solde_immo == 0}}
|
||||
|
|
@ -152,7 +150,7 @@
|
|||
<td class="num"><a href={{$trans_url}}>#{{$trans_id}}</a></td>
|
||||
<td>{{$trans_date|date_short}}</td>
|
||||
<td>{{$exit_date|date_short}}</td>
|
||||
<td>{{$trans_label}}{{if $line_label != null && $line_label != $trans_label}} — {{$line_label}}{{/if}}</td>
|
||||
<td>{{$trans_label}}{{if $line_label != null}} — {{$line_label}}{{/if}}</td>
|
||||
<td class="money">{{"%f"|math:$montant_immo|money_html:false|raw}}</td>
|
||||
<td><a href={{$compte_url}}>{{$account_code}}</a></td>
|
||||
<td>{{$account_label}}</td>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{{* -*- brindille -*- *}}
|
||||
|
||||
{{* Liste des immobilisations en cours d'amortissement ou amorties *}}
|
||||
{{* Liste des immobilisations en cours ou amorties *}}
|
||||
|
||||
<section class="immobilisation">
|
||||
|
||||
|
|
@ -100,7 +100,6 @@
|
|||
}}
|
||||
{{:assign montant_immo="%d-%d"|math:$montant_immo:$credit}}
|
||||
{{/select}}
|
||||
{{* Immobilisation soldée ? *}}
|
||||
{{if $montant_immo == 0}}
|
||||
{{:continue}}
|
||||
{{/if}}
|
||||
|
|
@ -108,7 +107,7 @@
|
|||
{{* voir s'il existe des écritures d'amortissement associées *}}
|
||||
{{:assign amort_lines=null}}
|
||||
{{#select
|
||||
l_amort.credit as amount,
|
||||
(l_amort.credit) as amount,
|
||||
CASE links.id_related = t_immo.id
|
||||
WHEN true THEN links.id_transaction
|
||||
WHEN false THEN links.id_related
|
||||
|
|
@ -125,7 +124,6 @@
|
|||
assign="amort_lines."
|
||||
}}
|
||||
{{/select}}
|
||||
|
||||
{{:assign amort_amount=0}}
|
||||
{{#foreach from=$amort_lines item="elem"}}
|
||||
{{* voir s'il existe un doc associé à l'écriture d'amortissement *}}
|
||||
|
|
@ -162,7 +160,7 @@
|
|||
<tr>
|
||||
<td class="num"><a href={{$trans_url}}>#{{$immo_trans_id}}</a></td>
|
||||
<td>{{$trans_date|date_short}}</td>
|
||||
<td>{{$trans_label}}{{if $line_label != null && $line_label != $trans_label}} — {{$line_label}}{{/if}}</td>
|
||||
<td>{{$trans_label}}{{if $line_label != null}} — {{$line_label}}{{/if}}</td>
|
||||
<td class="money">{{$montant_immo|money_html:false|raw}}</td>
|
||||
<td class="money">{{if $duration != null}}{{$duration}}{{/if}}</td>
|
||||
<td class="money">{{$amort_amount|money_html:false|raw}}</td>
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@
|
|||
<tr {{if $status == "ignored"}}class="ignored"{{/if}}>
|
||||
<td class="num"><a href={{$trans_url}}>#{{$trans_id}}</a></td>
|
||||
<td>{{$trans_date|date_short}}</td>
|
||||
<td>{{$trans_label}}{{if $line_label != null && $line_label != $trans_label}} — {{$line_label}}{{/if}}</td>
|
||||
<td>{{$trans_label}}{{if $line_label != null}} — {{$line_label}}{{/if}}</td>
|
||||
<td class="money">{{"%f"|math:$debit|money_html:false|raw}}</td>
|
||||
<td><a href={{$compte_url}}>{{$account_code}}</a></td>
|
||||
<td>{{$account_label}}</td>
|
||||
|
|
|
|||
|
|
@ -242,7 +242,7 @@
|
|||
<div class="informations">
|
||||
<dl class="describe">
|
||||
<dt>Immobilisation</dt>
|
||||
<dd><span class="num"><a href={{$trans_url}}>#{{$ligne_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>
|
||||
<dd><span class="num"><a href={{$trans_url}}>#{{$ligne_immo.trans_id}}</a></span> {{$ligne_immo.label}}{{if $ligne_immo.line_label != null}} — {{$ligne_immo.line_label}}{{/if}}</dd>
|
||||
<dt>Montant</dt>
|
||||
<dd class="money strong">{{"%f"|math:$ligne_immo.montant|money_currency_html:false|raw}}</dd>
|
||||
<dt>Début d'amortissement</dt>
|
||||
|
|
@ -292,9 +292,10 @@
|
|||
<td class="money">{{"%f"|math:$line.amort_amount|money_html:false|raw}}</td>
|
||||
<td class="money">{{"%f"|math:$solde|money_html:false|raw}}</td>
|
||||
<td>
|
||||
{{$line.trans_label}}
|
||||
{{if $line.amort_label != null && $line.amort_label != $line.trans_label}}
|
||||
— {{$line.amort_label}}
|
||||
{{if $line.amort_label == null}}
|
||||
{{$line.trans_label}}
|
||||
{{else}}
|
||||
{{$line.amort_label}}
|
||||
{{/if}}
|
||||
</td>
|
||||
<td><a href={{$compte_url}}>{{$line.account_code}}</a></td>
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@
|
|||
|
||||
{{if $autres_amortissements != null}}
|
||||
<section class="amortissement">
|
||||
<h3 class="ruler">Immobilisation « {{$ligne_immo.label}}{{if $ligne_immo.line_label != null && $ligne_immo.line_label != $ligne_immo.label}} — {{$ligne_immo.line_label}}{{/if}} »</h3>
|
||||
<h3 class="ruler">Immobilisation « {{$ligne_immo.label}}{{if $ligne_immo.line_label != null}} — {{$ligne_immo.line_label}}{{/if}} »</h3>
|
||||
<table class="list">
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
@ -144,7 +144,7 @@
|
|||
<td>{{$line.trans_date|date_short}}</td>
|
||||
<td class="money">{{"%f"|math:$line.amort_amount|money_html:false|raw}}</td>
|
||||
<td>{{$line.trans_label}}
|
||||
{{if $line.line_label != null && $line.line_label != $line.trans_label}} - {{$line.line_label}}{{/if}}
|
||||
{{if $line.line_label != null}} - {{$line.line_label}}{{/if}}
|
||||
</td>
|
||||
<td><a href={{$compte_url}}>{{$line.account_code}}</a></td>
|
||||
<td>{{$line.account_label}}</td>
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
{{/select}}
|
||||
{{:assign date_debut=$ligne_immo.date}}
|
||||
{{:assign var="amort_label" value="Amortissement %s"|args:$ligne_immo.label}}
|
||||
{{if $ligne_immo.line_label != null && $ligne_immo.line_label != $ligne_immo.label}}
|
||||
{{if $ligne_immo.line_label != null}}
|
||||
{{:assign amort_label=$amort_label|cat:" — "|cat:$ligne_immo.line_label}}
|
||||
{{/if}}
|
||||
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@
|
|||
{{/if}}
|
||||
|
||||
{{* écritures liées *}}
|
||||
{{:assign var="linked_transactions" value=$transactions|keys}}
|
||||
{{:assign var="linked_transactions" value=$_GET.trans|explode:","}}
|
||||
|
||||
{{* enregistrer l'écriture *}}
|
||||
{{:api
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue