Compare commits

..

No commits in common. "ec1922e5dda188592a88c577e4bf70a3423e3e83" and "00071437ef7178376b3ad00f29580520db54eace" have entirely different histories.

6 changed files with 16 additions and 23 deletions

View File

@ -7,9 +7,8 @@
résultat : open_years, selected_year, selected_chart résultat : open_years, selected_year, selected_chart
*}} *}}
{{*:debug check::date=$date*}}
{{:assign open_years=""}} {{:assign open_years=""}}
{{#years status=false}} {{#years closed=false}}
{{:assign open_years=$open_years|cat:"\n"|cat:" - "|cat:$label|cat:" : "}} {{:assign open_years=$open_years|cat:"\n"|cat:" - "|cat:$label|cat:" : "}}
{{:assign debut=$start_date|date_short}} {{:assign debut=$start_date|date_short}}
{{:assign fin=$end_date|date_short}} {{:assign fin=$end_date|date_short}}

View File

@ -1,7 +1,8 @@
<nav class="tabs"> <nav class="tabs">
<ul> <ul>
<li {{if $current == 'index'}} class="current"{{/if}}><a href="{{$module.url}}index.html">Immobilisations</a></li> <li {{if $current == 'index'}} class="current"{{/if}}><a href="{{$module.url}}index.html">Immobilisations</a></li>
{{if $current == 'amortization'}}<li class="current"><a>Amortissements</a></li>{{/if}} <li {{if $current == 'amortization'}} class="current"{{/if}}><a>Amortissements</a></li>
<li {{if $current == 'aide'}} class="current"{{/if}}><a href="{{$module.url}}aide.html">Aide</a></li> <li {{if $current == 'aide'}} class="current"{{/if}}><a href="{{$module.url}}aide.html">Aide</a></li>
</ul> </ul>
</nav> </nav>

View File

@ -1,7 +1,6 @@
{{* -*- brindille -*- *}} {{* -*- brindille -*- *}}
{{:admin_header title="Ajout immobilisation" current="module_amortissement"}} {{:admin_header title="Ajout immobilisation" current="module_amortissement"}}
{{* barre de navigation *}} {{* barre de navigation *}}
{{if ! $dialog}} {{if ! $dialog}}
{{:include file="_nav.html" current="index"}} {{:include file="_nav.html" current="index"}}
@ -9,7 +8,6 @@
{{* Traiter l'envoi du formulaire *}} {{* Traiter l'envoi du formulaire *}}
{{#form on="add"}} {{#form on="add"}}
{{*:debug add::POST=$_POST*}}
{{* vérifier que la date est située dans un exercice ouvert *}} {{* vérifier que la date est située dans un exercice ouvert *}}
{{:include {{:include

View File

@ -68,7 +68,6 @@
trans.date as amort_date, trans.date as amort_date,
trans.label as trans_label, trans.label as trans_label,
trans.id_year as amort_year, trans.id_year as amort_year,
acc.id as account_id,
acc.code as account_code, acc.code as account_code,
acc.label as account_name, acc.label as account_name,
"vrai" as linked "vrai" as linked
@ -124,7 +123,7 @@
<th></th> <th></th>
<th>Date</th> <th>Date</th>
<th class="nombre">Montant</th> <th class="nombre">Montant</th>
<th class="nombre">Solde</th> <th class="nombre"">Solde</th>
<th>Libellé</th> <th>Libellé</th>
<th>N° compte</th> <th>N° compte</th>
<th>Compte</th> <th>Compte</th>
@ -135,7 +134,6 @@
{{#foreach from=$linked_lines item="line"}} {{#foreach from=$linked_lines item="line"}}
{{* données de l'écriture *}} {{* données de l'écriture *}}
{{:assign trans_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$line.amort_trans_id}} {{: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 solde="%f-%d"|math:$solde:$line.amort_amount}}
{{:assign date_amort=$line.amort_date}} {{:assign date_amort=$line.amort_date}}
{{:assign current_year=$line.amort_year}} {{:assign current_year=$line.amort_year}}
@ -151,7 +149,7 @@
{{$line.amort_label}} {{$line.amort_label}}
{{/if}} {{/if}}
</td> </td>
<td><a href={{$compte_url}}>{{$line.account_code}}</a></td> <td>{{$line.account_code}}</td>
<td>{{$line.account_name}}</td> <td>{{$line.account_name}}</td>
<td> <td>
{{if $line.linked == null}} {{if $line.linked == null}}
@ -196,7 +194,7 @@
{{#foreach count="%d+1"|math:$nbamort key="num"}} {{#foreach count="%d+1"|math:$nbamort key="num"}}
{{:assign solde_prec=$solde}} {{:assign solde_prec=$solde}}
{{:assign solde="%f-%d"|math:$solde:$annuite_courante}} {{:assign solde="%f-%d"|math:$solde:$annuite_courante}}
{{#select id from acc_years where :amort_date >= start_date and :amort_date <= end_date and status == 0; :amort_date=$date_amort|parse_date}} {{#select id from acc_years where :amort_date >= start_date and :amort_date <= end_date and closed = 0; :amort_date=$date_amort|parse_date}}
{{:assign enregistrer=1}} {{:assign enregistrer=1}}
{{:assign current_year=$id}} {{:assign current_year=$id}}
{{else}} {{else}}

View File

@ -39,16 +39,14 @@
*}} *}}
{{#select {{#select
trans.id as trans_id, trans.id as trans_id,
trans.label as trans_label, trans.label as trans_label,
trans.date as trans_date, trans.date as trans_date,
line.id as immo_id, line.id as immo_id,
account.id as account_id, account.code as account_code,
account.code as account_code, account.label as account_label,
account.label as account_label, line.debit AS debit,
line.debit AS debit, project.label as project_label
project.label as project_label,
trans.id_year as trans_id_year
FROM acc_transactions AS trans FROM acc_transactions AS trans
INNER JOIN acc_transactions_lines AS line ON line.id_transaction = trans.id 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_accounts AS account ON line.id_account = account.id
@ -59,7 +57,6 @@
ORDER BY trans.date DESC ORDER BY trans.date DESC
}} }}
{{:assign trans_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$trans_id}} {{: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}} {{#load type="immo" where="$$.line = :line_id" :line_id=$immo_id|intval}}
{{:assign duration=$duration}} {{:assign duration=$duration}}
{{else}} {{else}}
@ -72,7 +69,7 @@
<td>{{$trans_label}}</td> <td>{{$trans_label}}</td>
<td class="money">{{"%f"|math:$debit|money}}</td> <td class="money">{{"%f"|math:$debit|money}}</td>
<td class="num">{{if $duration != null}}{{$duration}}{{/if}}</td> <td class="num">{{if $duration != null}}{{$duration}}{{/if}}</td>
<td><a href={{$compte_url}}>{{$account_code}}</a></td> <td>{{$account_code}}</td>
<td>{{$account_label}}</td> <td>{{$account_label}}</td>
<td>{{$project_label}}</td> <td>{{$project_label}}</td>
<td class="actions"> <td class="actions">

View File

@ -119,7 +119,7 @@
}} }}
{{/select}} {{/select}}
{{#years status=false}} {{#years closed=false}}
{{:assign var="open_years.%d"|args:$id value=$label}} {{:assign var="open_years.%d"|args:$id value=$label}}
{{/years}} {{/years}}