Amélioration affichage libellé et correction oubli
This commit is contained in:
parent
a66aeb69ba
commit
8295cfa09d
6 changed files with 21 additions and 14 deletions
|
|
@ -89,7 +89,8 @@
|
|||
WHEN true THEN links.id_transaction
|
||||
WHEN false THEN links.id_related
|
||||
END as other_id,
|
||||
line.credit
|
||||
line.credit,
|
||||
MAX(trans2.date) as exit_date
|
||||
FROM acc_transactions AS trans
|
||||
INNER JOIN acc_transactions_links as links
|
||||
ON (trans.id = links.id_transaction OR trans.id = links.id_related)
|
||||
|
|
@ -104,6 +105,7 @@
|
|||
assign="credit_immo."
|
||||
}}
|
||||
{{:assign solde_immo="%d-%d"|math:$solde_immo:$credit}}
|
||||
{{:assign exit_date=$exit_date}}
|
||||
{{/select}}
|
||||
|
||||
{{if $solde_immo == 0}}
|
||||
|
|
@ -150,7 +152,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}}{{/if}}</td>
|
||||
<td>{{$trans_label}}{{if $line_label != null && $line_label != $trans_label}} — {{$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 ou amorties *}}
|
||||
{{* Liste des immobilisations en cours d'amortissement ou amorties *}}
|
||||
|
||||
<section class="immobilisation">
|
||||
|
||||
|
|
@ -100,6 +100,7 @@
|
|||
}}
|
||||
{{:assign montant_immo="%d-%d"|math:$montant_immo:$credit}}
|
||||
{{/select}}
|
||||
{{* Immobilisation soldée ? *}}
|
||||
{{if $montant_immo == 0}}
|
||||
{{:continue}}
|
||||
{{/if}}
|
||||
|
|
@ -107,7 +108,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
|
||||
|
|
@ -124,6 +125,7 @@
|
|||
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 *}}
|
||||
|
|
@ -160,7 +162,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}}{{/if}}</td>
|
||||
<td>{{$trans_label}}{{if $line_label != null && $line_label != $trans_label}} — {{$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}}{{/if}}</td>
|
||||
<td>{{$trans_label}}{{if $line_label != null && $line_label != $trans_label}} — {{$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}}{{/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 != $ligne_immo.label}} — {{$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,10 +292,9 @@
|
|||
<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>
|
||||
{{if $line.amort_label == null}}
|
||||
{{$line.trans_label}}
|
||||
{{else}}
|
||||
{{$line.amort_label}}
|
||||
{{$line.trans_label}}
|
||||
{{if $line.amort_label != null && $line.amort_label != $line.trans_label}}
|
||||
— {{$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}}{{/if}} »</h3>
|
||||
<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>
|
||||
<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}}{{/if}}
|
||||
{{if $line.line_label != null && $line.line_label != $line.trans_label}} - {{$line.line_label}}{{/if}}
|
||||
</td>
|
||||
<td><a href={{$compte_url}}>{{$line.account_code}}</a></td>
|
||||
<td>{{$line.account_label}}</td>
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
line.id_account as account_id,
|
||||
line.debit as montant,
|
||||
line.id_project as project_id,
|
||||
line.label as line_label,
|
||||
trans.id as trans_id,
|
||||
trans.label,
|
||||
trans.date,
|
||||
|
|
@ -27,6 +28,9 @@
|
|||
{{/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}}
|
||||
{{:assign amort_label=$amort_label|cat:" — "|cat:$ligne_immo.line_label}}
|
||||
{{/if}}
|
||||
|
||||
{{#load type="immo" where="$$.line = :line_id" :line_id=$_GET.immo_id|intval}}
|
||||
{{:assign duree=$duration}}
|
||||
|
|
@ -289,7 +293,7 @@
|
|||
<dl>
|
||||
{{:input type="select" default=$selected_year name="id_year" label="Exercice" required=true default_empty="— Faire un choix —" options=$open_years}}
|
||||
{{:input type="date" name="date_amort" label="Date" required=true default=$date_amort|date_short}}
|
||||
{{:input type="text" name="designation" label="Libellé" required=true default=$amort_label}}
|
||||
{{:input type="text" name="designation" label="Libellé" required=true default=$amort_label size="50"}}
|
||||
{{:input type="money" name="montant" label="Montant" required=true default=$montant_amort}}
|
||||
{{:input
|
||||
type="list"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue