Masquer titre tableau si aucune immobilisation
This commit is contained in:
parent
0511f22c44
commit
f9df1210bc
1 changed files with 193 additions and 185 deletions
|
|
@ -2,8 +2,6 @@
|
|||
|
||||
{{* Liste des immobilisations en cours de constitution *}}
|
||||
|
||||
<section class="immobilisation">
|
||||
|
||||
<p class="block help">
|
||||
Cet onglet liste les immobilisations en cours de
|
||||
constitution ; vous pouvez les sélectionner pour créer une
|
||||
|
|
@ -62,23 +60,8 @@
|
|||
</fieldset>
|
||||
</form>
|
||||
|
||||
<table class="list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="check"></th>
|
||||
<th class="num">N°</th>
|
||||
<th>Date</th>
|
||||
<th>Libellé</th>
|
||||
<th class="nombre">Montant</th>
|
||||
<th>N° compte</th>
|
||||
<th>Compte</th>
|
||||
<th class="actions"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
{{* lister les immobilisations en cours de constitution *}}
|
||||
|
||||
{{:assign first_code=null}}
|
||||
{{:assign accounts_condition="("}}
|
||||
{{#foreach from=$module.config.unfinished item="elem"}}
|
||||
{{if $elem.code != null}}
|
||||
|
|
@ -86,6 +69,9 @@
|
|||
{{else}}
|
||||
{{:assign code=$elem}}
|
||||
{{/if}}
|
||||
{{if $first_code == null}}
|
||||
{{:assign first_code=$code}}
|
||||
{{/if}}
|
||||
{{:assign code=$code|cat:"%"|quote_sql}}
|
||||
{{:assign accounts_condition=$accounts_condition|cat:" account.code LIKE "|cat:$code|cat:" OR "}}
|
||||
{{/foreach}}
|
||||
|
|
@ -99,8 +85,7 @@
|
|||
{{/foreach}}
|
||||
{{:assign filter_condition=$filter_condition|cat:"0)"}}
|
||||
{{:assign condition=$condition|cat:" AND "|cat:$filter_condition}}
|
||||
{{:assign nb_immo=0}}
|
||||
{{:assign total_immo = 0}}
|
||||
|
||||
{{#select
|
||||
trans.id as trans_id,
|
||||
trans.label as trans_label,
|
||||
|
|
@ -119,6 +104,7 @@
|
|||
GROUP BY trans.id
|
||||
ORDER BY trans.date DESC;
|
||||
!condition=$condition
|
||||
assign="immo_line"
|
||||
}}
|
||||
{{* voir si l'écriture a été marquée ignorée *}}
|
||||
{{:assign ignore=false}}
|
||||
|
|
@ -153,9 +139,30 @@
|
|||
{{:continue}}
|
||||
{{/if}}
|
||||
|
||||
{{:assign var="immo_lines." value=$immo_line}}
|
||||
{{/select}}
|
||||
|
||||
{{if $immo_lines|count > 0}}
|
||||
<section class="immobilisation">
|
||||
<table class="list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="check"></th>
|
||||
<th class="num">N°</th>
|
||||
<th>Date</th>
|
||||
<th>Libellé</th>
|
||||
<th class="nombre">Montant</th>
|
||||
<th>N° compte</th>
|
||||
<th>Compte</th>
|
||||
<th class="actions"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
{{:assign total_immo = 0}}
|
||||
{{#foreach from=$immo_lines}}
|
||||
{{: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}}
|
||||
{{:assign nb_immo="%d+1"|math:$nb_immo}}
|
||||
{{:assign total_immo="%d+%d"|math:$total_immo:$debit}}
|
||||
{{:assign var="montant" from="sommes_immo.%s"|args:$account_code}}
|
||||
{{:assign var="sommes_immo.%s"|args:$account_code value="%d+%d"|math:$montant:$debit}}
|
||||
|
|
@ -177,7 +184,8 @@
|
|||
}}
|
||||
</td>
|
||||
</tr>
|
||||
{{/select}}
|
||||
{{/foreach}}
|
||||
|
||||
</tbody>
|
||||
<tfoot>
|
||||
{{if $total_immo != 0}}
|
||||
|
|
@ -206,10 +214,10 @@
|
|||
{{/if}}
|
||||
</tfoot>
|
||||
</table>
|
||||
{{if $nb_immo == 0}}
|
||||
<p class="block alert">Aucune écriture d'immobilisation trouvée dans la comptabilité (comptes N° xxx)</p>
|
||||
{{/if}}
|
||||
</section>
|
||||
{{else}}
|
||||
<p class="block alert">Aucune écriture d'immobilisation trouvée dans la comptabilité (compte {{$first_code}} et sous-comptes)</p>
|
||||
{{/if}}
|
||||
|
||||
<script type="text/javascript" src="scripts.js"></script>
|
||||
<script type="text/javascript" async="async">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue