{{* -*- 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}} {{if $_GET.msg|match:"immobilisation"}} {{:assign msg="Immobilisation enregistrée"}} {{elseif $_GET.msg|match:"durée"}} {{:assign msg="Durée enregistrée"}} {{/if}}

{{$msg}}

{{elseif $_GET.err}}

Échec enregistrement immobilisation

{{/if}} {{* lister les immobilisations *}}

Liste des immobilisations

{{* 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 immo_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" where="$$.line = :line_id" :line_id=$immo_id|intval}} {{*:debug info_immo=$info_immo*}} {{:assign duration=$duration}} {{else}} {{:assign duration=null}} {{/load}} {{*:debug duration=$duration*}} {{/select}}
Date Libellé Montant Durée N° compte Compte Projet
#{{$trans_id}} {{$trans_date|date_short}} {{$trans_label}} {{"%f"|math:$debit|money}} {{if $duration != null}}{{$duration}}{{/if}} {{$account_code}} {{$account_label}} {{$project_label}} {{if $duration == null}} {{:linkbutton label="Ajouter durée" href="add_duration.html?immo_id=%s"|args:$immo_id shape="help" target="_dialog" }} {{else}} {{:linkbutton label="Amortissements" href="amortization.html?immo_id=%s"|args:$immo_id shape="table" }} {{/if}}
Ajouter une immobilisation

{{:linkbutton label="Ajouter une immobilisation" shape="plus" href="add_asset.html" target="_dialog" }}

{{:admin_footer}}