Amélioration conditions sélection lignes immo et amortissement
This commit is contained in:
parent
ac3b1e818d
commit
f1ca740464
3 changed files with 101 additions and 71 deletions
|
|
@ -65,14 +65,14 @@
|
|||
{{* lister les lignes des écritures d'amortissement liées à l'immobilisation *}}
|
||||
{{#select
|
||||
l_amort.credit as amort_amount,
|
||||
l_amort.label as amort_label,
|
||||
l_amort.label as amort_line_label,
|
||||
l_amort.id as amort_line_id,
|
||||
CASE WHEN links.id_related = t_immo.id
|
||||
THEN links.id_transaction
|
||||
ELSE links.id_related
|
||||
END as amort_trans_id,
|
||||
trans.date as amort_date,
|
||||
trans.label as trans_label,
|
||||
trans.label as amort_trans_label,
|
||||
trans.id_year as amort_year,
|
||||
account.id as account_id,
|
||||
account.code as account_code,
|
||||
|
|
@ -89,17 +89,14 @@
|
|||
:line_id = $_GET.immo_line_id|intval
|
||||
assign="amort_line"
|
||||
}}
|
||||
|
||||
{{* lister les lignes d'amortissement liées à la ligne d'immobilisation *}}
|
||||
{{#load type="link"
|
||||
where="$$.immo_line_id = :immo_line_id AND $$.amort_trans_id = :amort_trans_id"
|
||||
where="$$.immo_line_id = :immo_line_id AND $$.amort_trans_id = :amort_trans_id AND $$.amort_line_id = :amort_line_id"
|
||||
assign="line"
|
||||
:immo_line_id=$_GET.immo_line_id|intval
|
||||
:amort_trans_id=$amort_line.amort_trans_id
|
||||
:amort_line_id = $amort_line.amort_line_id
|
||||
}}
|
||||
{{if $line.amort_line_id == $amort_line.amort_line_id}}
|
||||
{{:assign var="linked_amort." value=$amort_line}}
|
||||
{{/if}}
|
||||
{{else}}
|
||||
{{:assign var="linked_amort." value=$amort_line}}
|
||||
{{/load}}
|
||||
{{if $date_debut == null}}
|
||||
|
|
@ -269,7 +266,7 @@
|
|||
<table class="list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>N°</th>
|
||||
<th class="num">N°</th>
|
||||
<th>Date</th>
|
||||
<th class="nombre">Montant</th>
|
||||
<th class="nombre">Valeur nette</th>
|
||||
|
|
@ -291,9 +288,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>
|
||||
{{$line.trans_label}}
|
||||
{{if $line.amort_label != null && $line.amort_label != $line.trans_label}}
|
||||
— {{$line.amort_label}}
|
||||
{{$line.amort_trans_label}}
|
||||
{{if $line.amort_line_label != null && $line.amort_line_label != $line.amort_trans_label}}
|
||||
— {{$line.amort_line_label}}
|
||||
{{/if}}
|
||||
</td>
|
||||
<td><a href={{$compte_url}}>{{$line.account_code}}</a></td>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue