92 lines
2.5 KiB
HTML
92 lines
2.5 KiB
HTML
{{* -*- brindille -*- *}}
|
|
{{:admin_header title="Gestion des amortissements" custom_css=$custom_css current="module_amortissement"}}
|
|
|
|
{{* barre de navigation *}}
|
|
{{:include file="_nav.html" current="index"}}
|
|
|
|
{{if $_GET.ok}}
|
|
<p class="block confirm">Immobilisation enregistrée</p>
|
|
{{elseif $_GET.err}}
|
|
<p class="block error">Enregistrement immobilisation refusée</p>
|
|
{{/if}}
|
|
|
|
{{* lister les immobilisations *}}
|
|
<section class="immobilisation">
|
|
<h2 class="ruler">Liste des immobilisations</h2>
|
|
|
|
<table class="list">
|
|
<thead>
|
|
<tr>
|
|
<th>N°</th>
|
|
<th>Date</th>
|
|
<th>Libellé</th>
|
|
<th>Montant</th>
|
|
<th>Durée</th>
|
|
<th>N° compte</th>
|
|
<th>Compte</th>
|
|
<th>Projet</th>
|
|
<th class="actions"></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{*
|
|
TODO améliorer cette requête : voir si assez général
|
|
*}}
|
|
|
|
{{#select
|
|
trans.id as trans_id,
|
|
trans.label as trans_label,
|
|
trans.date as trans_date,
|
|
line.id as line_id,
|
|
account.code as account_code,
|
|
account.label as account_label,
|
|
line.debit AS debit,
|
|
project.label as project_label
|
|
FROM acc_transactions AS trans
|
|
INNER JOIN acc_transactions_lines AS line ON line.id_transaction = trans.id
|
|
INNER JOIN acc_accounts AS account ON line.id_account = account.id
|
|
INNER JOIN acc_years AS years ON trans.id_year = years.id
|
|
LEFT JOIN acc_projects AS project ON line.id_project = project.id
|
|
WHERE
|
|
(account.code LIKE '21%' OR account.code LIKE '22%')
|
|
ORDER BY trans.date DESC
|
|
}}
|
|
{{:assign trans_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$trans_id}}
|
|
{{#load type="immo" assign="info_immo" where="$$.line = :line_id" :line_id=$line_id|intval}}{{/load}}
|
|
<tr>
|
|
<td class="num"><a href={{$trans_url}}>#{{$trans_id}}</a></td>
|
|
<td>{{$trans_date|date_short}}</td>
|
|
<td>{{$trans_label}}</td>
|
|
<td class="money">{{"%f"|math:$debit|money}}</td>
|
|
<td class="num">{{$info_immo.duration}}</td>
|
|
<td>{{$account_code}}</td>
|
|
<td>{{$account_label}}</td>
|
|
<td>{{$project_label}}</td>
|
|
<td class="actions">
|
|
{{:linkbutton
|
|
label="Amortissements"
|
|
href="amortization.html?line=%s"|args:$line_id
|
|
shape="table"
|
|
}}
|
|
</td>
|
|
</tr>
|
|
{{/select}}
|
|
</tbody>
|
|
</table>
|
|
</section>
|
|
|
|
<form method="post" action="">
|
|
<fieldset>
|
|
<legend>Ajouter une immobilisation</legend>
|
|
<p class="submit">
|
|
{{:linkbutton
|
|
label="Ajouter une immobilisation"
|
|
shape="plus"
|
|
href="add_asset.html"
|
|
}}
|
|
</p>
|
|
</fieldset>
|
|
</form>
|
|
|
|
{{:admin_footer}}
|