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 true THEN links.id_transaction
|
||||||
WHEN false THEN links.id_related
|
WHEN false THEN links.id_related
|
||||||
END as other_id,
|
END as other_id,
|
||||||
line.credit
|
line.credit,
|
||||||
|
MAX(trans2.date) as exit_date
|
||||||
FROM acc_transactions AS trans
|
FROM acc_transactions AS trans
|
||||||
INNER JOIN acc_transactions_links as links
|
INNER JOIN acc_transactions_links as links
|
||||||
ON (trans.id = links.id_transaction OR trans.id = links.id_related)
|
ON (trans.id = links.id_transaction OR trans.id = links.id_related)
|
||||||
|
|
@ -104,6 +105,7 @@
|
||||||
assign="credit_immo."
|
assign="credit_immo."
|
||||||
}}
|
}}
|
||||||
{{:assign solde_immo="%d-%d"|math:$solde_immo:$credit}}
|
{{:assign solde_immo="%d-%d"|math:$solde_immo:$credit}}
|
||||||
|
{{:assign exit_date=$exit_date}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
|
|
||||||
{{if $solde_immo == 0}}
|
{{if $solde_immo == 0}}
|
||||||
|
|
@ -150,7 +152,7 @@
|
||||||
<td class="num"><a href={{$trans_url}}>#{{$trans_id}}</a></td>
|
<td class="num"><a href={{$trans_url}}>#{{$trans_id}}</a></td>
|
||||||
<td>{{$trans_date|date_short}}</td>
|
<td>{{$trans_date|date_short}}</td>
|
||||||
<td>{{$exit_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 class="money">{{"%f"|math:$montant_immo|money_html:false|raw}}</td>
|
||||||
<td><a href={{$compte_url}}>{{$account_code}}</a></td>
|
<td><a href={{$compte_url}}>{{$account_code}}</a></td>
|
||||||
<td>{{$account_label}}</td>
|
<td>{{$account_label}}</td>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{{* -*- brindille -*- *}}
|
{{* -*- brindille -*- *}}
|
||||||
|
|
||||||
{{* Liste des immobilisations en cours ou amorties *}}
|
{{* Liste des immobilisations en cours d'amortissement ou amorties *}}
|
||||||
|
|
||||||
<section class="immobilisation">
|
<section class="immobilisation">
|
||||||
|
|
||||||
|
|
@ -100,6 +100,7 @@
|
||||||
}}
|
}}
|
||||||
{{:assign montant_immo="%d-%d"|math:$montant_immo:$credit}}
|
{{:assign montant_immo="%d-%d"|math:$montant_immo:$credit}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
|
{{* Immobilisation soldée ? *}}
|
||||||
{{if $montant_immo == 0}}
|
{{if $montant_immo == 0}}
|
||||||
{{:continue}}
|
{{:continue}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
@ -107,7 +108,7 @@
|
||||||
{{* voir s'il existe des écritures d'amortissement associées *}}
|
{{* voir s'il existe des écritures d'amortissement associées *}}
|
||||||
{{:assign amort_lines=null}}
|
{{:assign amort_lines=null}}
|
||||||
{{#select
|
{{#select
|
||||||
(l_amort.credit) as amount,
|
l_amort.credit as amount,
|
||||||
CASE links.id_related = t_immo.id
|
CASE links.id_related = t_immo.id
|
||||||
WHEN true THEN links.id_transaction
|
WHEN true THEN links.id_transaction
|
||||||
WHEN false THEN links.id_related
|
WHEN false THEN links.id_related
|
||||||
|
|
@ -124,6 +125,7 @@
|
||||||
assign="amort_lines."
|
assign="amort_lines."
|
||||||
}}
|
}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
|
|
||||||
{{:assign amort_amount=0}}
|
{{:assign amort_amount=0}}
|
||||||
{{#foreach from=$amort_lines item="elem"}}
|
{{#foreach from=$amort_lines item="elem"}}
|
||||||
{{* voir s'il existe un doc associé à l'écriture d'amortissement *}}
|
{{* voir s'il existe un doc associé à l'écriture d'amortissement *}}
|
||||||
|
|
@ -160,7 +162,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td class="num"><a href={{$trans_url}}>#{{$immo_trans_id}}</a></td>
|
<td class="num"><a href={{$trans_url}}>#{{$immo_trans_id}}</a></td>
|
||||||
<td>{{$trans_date|date_short}}</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">{{$montant_immo|money_html:false|raw}}</td>
|
||||||
<td class="money">{{if $duration != null}}{{$duration}}{{/if}}</td>
|
<td class="money">{{if $duration != null}}{{$duration}}{{/if}}</td>
|
||||||
<td class="money">{{$amort_amount|money_html:false|raw}}</td>
|
<td class="money">{{$amort_amount|money_html:false|raw}}</td>
|
||||||
|
|
|
||||||
|
|
@ -153,7 +153,7 @@
|
||||||
<tr {{if $status == "ignored"}}class="ignored"{{/if}}>
|
<tr {{if $status == "ignored"}}class="ignored"{{/if}}>
|
||||||
<td class="num"><a href={{$trans_url}}>#{{$trans_id}}</a></td>
|
<td class="num"><a href={{$trans_url}}>#{{$trans_id}}</a></td>
|
||||||
<td>{{$trans_date|date_short}}</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 class="money">{{"%f"|math:$debit|money_html:false|raw}}</td>
|
||||||
<td><a href={{$compte_url}}>{{$account_code}}</a></td>
|
<td><a href={{$compte_url}}>{{$account_code}}</a></td>
|
||||||
<td>{{$account_label}}</td>
|
<td>{{$account_label}}</td>
|
||||||
|
|
|
||||||
|
|
@ -242,7 +242,7 @@
|
||||||
<div class="informations">
|
<div class="informations">
|
||||||
<dl class="describe">
|
<dl class="describe">
|
||||||
<dt>Immobilisation</dt>
|
<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>
|
<dt>Montant</dt>
|
||||||
<dd class="money strong">{{"%f"|math:$ligne_immo.montant|money_currency_html:false|raw}}</dd>
|
<dd class="money strong">{{"%f"|math:$ligne_immo.montant|money_currency_html:false|raw}}</dd>
|
||||||
<dt>Début d'amortissement</dt>
|
<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:$line.amort_amount|money_html:false|raw}}</td>
|
||||||
<td class="money">{{"%f"|math:$solde|money_html:false|raw}}</td>
|
<td class="money">{{"%f"|math:$solde|money_html:false|raw}}</td>
|
||||||
<td>
|
<td>
|
||||||
{{if $line.amort_label == null}}
|
|
||||||
{{$line.trans_label}}
|
{{$line.trans_label}}
|
||||||
{{else}}
|
{{if $line.amort_label != null && $line.amort_label != $line.trans_label}}
|
||||||
{{$line.amort_label}}
|
— {{$line.amort_label}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</td>
|
</td>
|
||||||
<td><a href={{$compte_url}}>{{$line.account_code}}</a></td>
|
<td><a href={{$compte_url}}>{{$line.account_code}}</a></td>
|
||||||
|
|
|
||||||
|
|
@ -122,7 +122,7 @@
|
||||||
|
|
||||||
{{if $autres_amortissements != null}}
|
{{if $autres_amortissements != null}}
|
||||||
<section class="amortissement">
|
<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">
|
<table class="list">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
@ -144,7 +144,7 @@
|
||||||
<td>{{$line.trans_date|date_short}}</td>
|
<td>{{$line.trans_date|date_short}}</td>
|
||||||
<td class="money">{{"%f"|math:$line.amort_amount|money_html:false|raw}}</td>
|
<td class="money">{{"%f"|math:$line.amort_amount|money_html:false|raw}}</td>
|
||||||
<td>{{$line.trans_label}}
|
<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>
|
||||||
<td><a href={{$compte_url}}>{{$line.account_code}}</a></td>
|
<td><a href={{$compte_url}}>{{$line.account_code}}</a></td>
|
||||||
<td>{{$line.account_label}}</td>
|
<td>{{$line.account_label}}</td>
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@
|
||||||
line.id_account as account_id,
|
line.id_account as account_id,
|
||||||
line.debit as montant,
|
line.debit as montant,
|
||||||
line.id_project as project_id,
|
line.id_project as project_id,
|
||||||
|
line.label as line_label,
|
||||||
trans.id as trans_id,
|
trans.id as trans_id,
|
||||||
trans.label,
|
trans.label,
|
||||||
trans.date,
|
trans.date,
|
||||||
|
|
@ -27,6 +28,9 @@
|
||||||
{{/select}}
|
{{/select}}
|
||||||
{{:assign date_debut=$ligne_immo.date}}
|
{{:assign date_debut=$ligne_immo.date}}
|
||||||
{{:assign var="amort_label" value="Amortissement %s"|args:$ligne_immo.label}}
|
{{: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}}
|
{{#load type="immo" where="$$.line = :line_id" :line_id=$_GET.immo_id|intval}}
|
||||||
{{:assign duree=$duration}}
|
{{:assign duree=$duration}}
|
||||||
|
|
@ -289,7 +293,7 @@
|
||||||
<dl>
|
<dl>
|
||||||
{{:input type="select" default=$selected_year name="id_year" label="Exercice" required=true default_empty="— Faire un choix —" options=$open_years}}
|
{{: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="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="money" name="montant" label="Montant" required=true default=$montant_amort}}
|
||||||
{{:input
|
{{:input
|
||||||
type="list"
|
type="list"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue