diff --git a/amortization.html b/amortization.html index 960bf77..94bfdfd 100644 --- a/amortization.html +++ b/amortization.html @@ -68,6 +68,7 @@ trans.date as amort_date, trans.label as trans_label, trans.id_year as amort_year, + acc.id as account_id, acc.code as account_code, acc.label as account_name, "vrai" as linked @@ -123,7 +124,7 @@ N° Date Montant - Solde + Solde Libellé N° compte Compte @@ -134,6 +135,7 @@ {{#foreach from=$linked_lines item="line"}} {{* données de l'écriture *}} {{:assign trans_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$line.amort_trans_id}} + {{:assign compte_url="%s/acc/accounts/journal.php?id=%s&year=%s"|args:$admin_url:$line.account_id:$line.amort_year}} {{:assign solde="%f-%d"|math:$solde:$line.amort_amount}} {{:assign date_amort=$line.amort_date}} {{:assign current_year=$line.amort_year}} @@ -149,7 +151,7 @@ {{$line.amort_label}} {{/if}} - {{$line.account_code}} + {{$line.account_code}} {{$line.account_name}} {{if $line.linked == null}} diff --git a/index.html b/index.html index 211c392..5b28ffd 100644 --- a/index.html +++ b/index.html @@ -39,14 +39,16 @@ *}} {{#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 + trans.id as trans_id, + trans.label as trans_label, + trans.date as trans_date, + line.id as immo_id, + account.id as account_id, + account.code as account_code, + account.label as account_label, + line.debit AS debit, + project.label as project_label, + trans.id_year as trans_id_year 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 @@ -57,6 +59,7 @@ ORDER BY trans.date DESC }} {{:assign trans_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$trans_id}} + {{:assign compte_url="%s/acc/accounts/journal.php?id=%s&year=%s"|args:$admin_url:$account_id:$trans_id_year}} {{#load type="immo" where="$$.line = :line_id" :line_id=$immo_id|intval}} {{:assign duration=$duration}} {{else}} @@ -69,7 +72,7 @@ {{$trans_label}} {{"%f"|math:$debit|money}} {{if $duration != null}}{{$duration}}{{/if}} - {{$account_code}} + {{$account_code}} {{$account_label}} {{$project_label}}