Compare commits
15 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
75cb25fbb9 | ||
|
|
4f1b0ffead | ||
|
|
3173b06cf1 | ||
|
|
d149a85018 | ||
|
|
c93b33f923 | ||
|
|
575d3708d8 | ||
|
|
155e06d7fc | ||
|
|
f9df1210bc | ||
|
|
0511f22c44 | ||
|
|
3bcd6bcdc8 | ||
|
|
ba3081cf00 | ||
|
|
0a9e0e577a | ||
|
|
8db7ef7d73 | ||
|
|
b505aa5f4a | ||
|
|
b021cccd4e |
225
_archives.html
|
|
@ -1,12 +1,16 @@
|
|||
{{* -*- brindille -*- *}}
|
||||
|
||||
{{* Liste des immobilisations sorties du bilan *}}
|
||||
<p class="help">
|
||||
Cette page liste les immobilisations sorties du bilan
|
||||
<p class="block help">
|
||||
Cet onglet liste les immobilisations sorties du bilan car elles ne
|
||||
sont plus utilisées dans l'association (vétusté, fin de vie,
|
||||
vente...).
|
||||
</p>
|
||||
|
||||
{{:include file="_get_config.html" keep="module.config"}}
|
||||
|
||||
{{if $module.table != null}}
|
||||
|
||||
{{* lister les immobilisations *}}
|
||||
{{:assign account_condition="("}}
|
||||
{{#foreach from=$module.config.prefixes item="code"}}
|
||||
|
|
@ -14,15 +18,110 @@
|
|||
{{:assign account_condition=$account_condition|cat:"account.code LIKE "|cat:$code|cat:" OR "}}
|
||||
{{/foreach}}
|
||||
{{:assign account_condition=$account_condition|cat:"0)"}}
|
||||
{{:assign status_condition="($$.status = 'archived')"}}
|
||||
|
||||
{{:assign filter_condition=" AND NOT ("}}
|
||||
{{:assign filter_condition=" ("}}
|
||||
{{#foreach from=$module.config.filters item="filter"}}
|
||||
{{:assign filter="%"|cat:$filter|cat:"%"|quote_sql}}
|
||||
{{:assign filter_condition=$filter_condition|cat:" trans_label LIKE "|cat:$filter|cat:" OR "}}
|
||||
{{/foreach}}
|
||||
{{:assign filter_condition=$filter_condition|cat:"0)"}}
|
||||
{{:assign condition=$account_condition|cat:" AND debit > 0 AND NOT (trans.status & 16)"|cat:$filter_condition}}
|
||||
{{:assign condition=$account_condition|cat:" AND debit > 0 AND NOT (trans.status & 16) AND NOT "|cat:$filter_condition|cat:" AND "|cat:$status_condition}}
|
||||
|
||||
{{:assign total_cessions = 0}}
|
||||
|
||||
{{#select
|
||||
trans.id as trans_id,
|
||||
trans.label as trans_label,
|
||||
trans.date as trans_date,
|
||||
trans.id_year as trans_id_year,
|
||||
line.id as immo_line_id,
|
||||
line.label as line_label,
|
||||
line.debit AS debit,
|
||||
account.id as account_id,
|
||||
account.code as account_code,
|
||||
account.label as account_label,
|
||||
info.id as immo_doc_id,
|
||||
$$.label as doc_label,
|
||||
$$.amount as doc_amount,
|
||||
$$.date_achat as doc_date_achat,
|
||||
$$.date_mes as doc_date_mes,
|
||||
$$.status as status
|
||||
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
|
||||
INNER JOIN !table AS info ON $$.line = line.id
|
||||
WHERE !condition
|
||||
ORDER BY trans.date DESC;
|
||||
!table=$module.table
|
||||
!condition=$condition
|
||||
assign="immo_line"
|
||||
}}
|
||||
|
||||
{{:assign var="immo_line.date_mes" value=$doc_date_mes|or:$doc_date_achat|or:$trans_date}}
|
||||
{{:assign var="immo_line.montant_immo" value=$doc_amount|or:$debit}}
|
||||
|
||||
{{* chercher le doc de sortie du bilan *}}
|
||||
{{:assign var="immo_line.exit_date" value=null}}
|
||||
{{#load type="exit_link" where="$$.immo_doc_id = :immo_doc_id" :immo_doc_id=$immo_doc_id}}
|
||||
{{:assign exit_line_id=$exit_line_id}}
|
||||
{{#select
|
||||
trans.date
|
||||
FROM acc_transactions_lines AS line
|
||||
INNER JOIN acc_transactions AS trans ON line.id_transaction = trans.id
|
||||
WHERE line.id = :exit_line_id;
|
||||
:exit_line_id=$exit_line_id
|
||||
}}
|
||||
{{:assign var="immo_line.exit_date" value=$date}}
|
||||
{{/select}}
|
||||
{{/load}}
|
||||
|
||||
{{* déduire le montant des écritures liées à l'immo courante au crédit du même compte *}}
|
||||
{{:assign credit_immo=null}}
|
||||
{{:assign total_credits=0}}
|
||||
{{#load
|
||||
type="credit_link"
|
||||
where="$$.immo_doc_id = :immo_doc_id" :immo_doc_id = $immo_doc_id
|
||||
}}
|
||||
{{if $amount == null}}
|
||||
{{#select credit FROM acc_transactions_lines WHERE id = :credit_line_id;
|
||||
:credit_line_id=$credit_line_id
|
||||
}}
|
||||
{{:assign total_credits="%d+%d"|math:$total_credits:$credit}}
|
||||
{{/select}}
|
||||
{{else}}
|
||||
{{:assign total_credits="%d+%d"|math:$total_credits:$amount}}
|
||||
{{/if}}
|
||||
{{/load}}
|
||||
{{:assign solde_immo="%d-%d"|math:$immo_line.montant_immo:$total_credits}}
|
||||
{{:assign var="montant" from="sommes_immo.%s"|args:$account_code}}
|
||||
{{:assign var="sommes_immo.%s"|args:$account_code value="%d+%d"|math:$montant:$immo_line.montant_immo}}
|
||||
|
||||
{{* voir s'il y a une écriture de cession associée à cette immo *}}
|
||||
{{#select
|
||||
trans.id as cession_id,
|
||||
trans.label,
|
||||
line.id as line_id,
|
||||
line.credit
|
||||
FROM acc_transactions_lines AS line
|
||||
INNER JOIN acc_transactions AS trans ON line.id_transaction = trans.id
|
||||
INNER JOIN !table AS cession_link ON json_extract(cession_link.document, '$.cession_line_id') = line.id
|
||||
INNER JOIN !table AS immo_doc ON json_extract(cession_link.document, '$.immo_doc_id') = immo_doc.id
|
||||
WHERE json_extract(immo_doc.document, '$.line') = :immo_line_id
|
||||
;
|
||||
!table=$module.table
|
||||
:immo_line_id = $immo_line.immo_line_id
|
||||
assign="cession_line"
|
||||
}}
|
||||
{{:assign var="montant" from="montant_cessions.%d"|args:$account_code}}
|
||||
{{:assign var="montant_cessions.%d"|args:$account_code value="%d+%d"|math:$montant:$credit}}
|
||||
{{:assign total_cessions="%d+%d"|math:$total_cessions:$credit}}
|
||||
{{/select}}
|
||||
{{:assign var="immo_lines." value=$immo_line}}
|
||||
{{/select}}
|
||||
|
||||
{{if $immo_lines|count > 0}}
|
||||
<section class="immobilisation">
|
||||
<table class="list">
|
||||
<thead>
|
||||
|
|
@ -39,124 +138,28 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
|
||||
{{:assign nb_immo=0}}
|
||||
{{:assign total_immo = 0}}
|
||||
{{:assign total_cessions = 0}}
|
||||
|
||||
{{#select
|
||||
trans.id as trans_id,
|
||||
trans.label as trans_label,
|
||||
trans.date as trans_date,
|
||||
trans.id_year as trans_id_year,
|
||||
line.id as immo_line_id,
|
||||
line.label as line_label,
|
||||
line.debit AS debit,
|
||||
account.id as account_id,
|
||||
account.code as account_code,
|
||||
account.label as account_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
|
||||
WHERE !condition
|
||||
ORDER BY trans.date DESC;
|
||||
!condition=$condition
|
||||
}}
|
||||
|
||||
{{* voir si l'immo est prise en charge *}}
|
||||
{{#load type="immo" where="$$.line = :line_id" :line_id=$immo_line_id assign="info_immo"}}
|
||||
{{:assign status=$status}}
|
||||
{{else}}
|
||||
{{:assign status=null}}
|
||||
{{/load}}
|
||||
{{if $status != "archived"}}
|
||||
{{:continue}}
|
||||
{{/if}}
|
||||
{{:assign date_mes=$info_immo.date_mes|or:$trans_date}}
|
||||
{{:assign montant_immo=$debit}}
|
||||
|
||||
{{* chercher le doc de sortie du bilan *}}
|
||||
{{:assign exit_date=null}}
|
||||
{{#load type="exit_link" where="$$.immo_doc_id = :immo_doc_id" :immo_doc_id=$info_immo.id}}
|
||||
{{:assign exit_line_id=$exit_line_id}}
|
||||
{{#select
|
||||
trans.date
|
||||
FROM acc_transactions_lines AS line
|
||||
INNER JOIN acc_transactions AS trans ON line.id_transaction = trans.id
|
||||
WHERE line.id = :exit_line_id;
|
||||
:exit_line_id=$exit_line_id
|
||||
}}
|
||||
{{:assign exit_date=$date}}
|
||||
{{/select}}
|
||||
{{/load}}
|
||||
|
||||
{{* déduire le montant des écritures liées à l'immo courante au crédit du même compte *}}
|
||||
{{:assign credit_immo=null}}
|
||||
{{:assign total_credits=0}}
|
||||
{{#load
|
||||
type="credit_link"
|
||||
where="$$.immo_doc_id = :immo_doc_id" :immo_doc_id = $info_immo.id
|
||||
}}
|
||||
{{if $amount == null}}
|
||||
{{#select credit FROM acc_transactions_lines WHERE id = :credit_line_id;
|
||||
:credit_line_id=$credit_line_id
|
||||
}}
|
||||
{{:assign total_credits="%d+%d"|math:$total_credits:$credit}}
|
||||
{{/select}}
|
||||
{{else}}
|
||||
{{:assign total_credits="%d+%d"|math:$total_credits:$amount}}
|
||||
{{/if}}
|
||||
{{/load}}
|
||||
{{:assign solde_immo="%d-%d"|math:$montant_immo:$total_credits}}
|
||||
|
||||
{{if $solde_immo == 0}}
|
||||
{{:assign status="archived"}}
|
||||
{{/if}}
|
||||
|
||||
{{if $status != "archived"}}
|
||||
{{:continue}}
|
||||
{{/if}}
|
||||
|
||||
{{#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:$montant_immo}}
|
||||
{{:assign var="montant" from="sommes_immo.%s"|args:$account_code}}
|
||||
{{:assign var="sommes_immo.%s"|args:$account_code value="%d+%d"|math:$montant:$montant_immo}}
|
||||
|
||||
{{* voir s'il y a une écriture de cession associée à cette immo *}}
|
||||
{{#select
|
||||
trans.id,
|
||||
line.debit
|
||||
FROM acc_transactions_links AS link
|
||||
INNER JOIN acc_transactions AS trans ON (CASE
|
||||
WHEN link.id_transaction = :trans_id THEN link.id_related
|
||||
WHEN link.id_related = :trans_id THEN link.id_transaction
|
||||
END) = trans.id
|
||||
INNER JOIN acc_transactions_lines AS line ON line.id_transaction = trans.id
|
||||
INNER JOIN acc_accounts AS acc ON line.id_account = acc.id
|
||||
WHERE (link.id_transaction = :trans_id OR link.id_related = :trans_id) AND acc.code = 462
|
||||
;
|
||||
:trans_id = $trans_id
|
||||
}}
|
||||
{{:assign var="montant" from="montant_cessions.%d"|args:$account_code}}
|
||||
{{:assign var="montant_cessions.%d"|args:$account_code value="%d+%d"|math:$montant:$debit}}
|
||||
{{:assign total_cessions="%d+%d"|math:$total_cessions:$debit}}
|
||||
{{/select}}
|
||||
|
||||
{{:assign label_immo=$doc_label|or:$trans_label}}
|
||||
{{if $label_immo|strpos:$line_label === false}}
|
||||
{{:assign label_immo=$label_immo|cat:" — "|cat:$line_label}}
|
||||
{{/if}}
|
||||
<tr>
|
||||
<td class="num"><a href="{{$trans_url}}">#{{$trans_id}}</a></td>
|
||||
<td>{{$date_mes|date_short}}</td>
|
||||
<td>{{$exit_date|date_short}}</td>
|
||||
<td>{{$trans_label}}{{if $line_label != null && $line_label != $trans_label}} — {{$line_label}}{{/if}}</td>
|
||||
<td>{{$label_immo}}</td>
|
||||
<td class="money">{{"%f"|math:$montant_immo|money_html:false|raw}}</td>
|
||||
<td><a href="{{$compte_url}}">{{$account_code}}</a></td>
|
||||
<td>{{$account_label}}</td>
|
||||
<td class="actions">
|
||||
{{:linkbutton label="Modifier" href="exit_step1.html?immo_doc_id=%s&from=exit"|args:$info_immo.id shape="edit"}}
|
||||
{{:linkbutton label="Modifier" href="exit_step1.html?immo_doc_id=%s&from=exit"|args:$immo_doc_id shape="edit"}}
|
||||
</td>
|
||||
</tr>
|
||||
{{/select}}
|
||||
{{/foreach}}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
{{if $total_immo != 0}}
|
||||
|
|
@ -215,7 +218,9 @@
|
|||
{{/if}}
|
||||
</tfoot>
|
||||
</table>
|
||||
{{if $nb_immo == 0}}
|
||||
</section>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{if $immo_lines|count == 0 || $module.table == null}}
|
||||
<p class="block alert">Aucune immobilisation</p>
|
||||
{{/if}}
|
||||
</section>
|
||||
|
|
|
|||
|
|
@ -9,4 +9,4 @@
|
|||
|
||||
{{:assign ts_debut=$date_debut|strtotime}}
|
||||
{{:assign ts_fin=$date_fin|strtotime}}
|
||||
{{:assign nbjours="1+abs(%d-%d)/(60*60*24)"|math:$ts_fin:$ts_debut}}
|
||||
{{:assign nbjours="round(1+abs(%d-%d)/(60*60*24), 0)"|math:$ts_fin:$ts_debut}}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
id_transaction
|
||||
FROM acc_transactions_lines
|
||||
WHERE id = :line_id;
|
||||
:line_id = $line_id|intval
|
||||
:line_id = $line_id
|
||||
}}
|
||||
{{:assign trans_id=$id_transaction}}
|
||||
{{else}}
|
||||
|
|
|
|||
|
|
@ -4,31 +4,18 @@
|
|||
|
||||
{{:include file="_get_config.html" keep="module.config"}}
|
||||
|
||||
<p class="help">
|
||||
<p class="block help">
|
||||
{{if $type_immo == "managed"}}
|
||||
Cette page liste les immobilisations en cours d'amortissement
|
||||
Cet onglet liste les immobilisations en cours d'amortissement.
|
||||
{{elseif $type_immo == "amortized"}}
|
||||
Cette page liste les immobilisations dont l'amortissement est terminé
|
||||
Cet onglet liste les
|
||||
immobilisations dont l'amortissement est terminé mais qui sont
|
||||
encore utilisées dans l'association, donc encore présentes au
|
||||
bilan.
|
||||
{{/if}}
|
||||
</p>
|
||||
|
||||
{{if $module.table != null}}
|
||||
<table class="list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="num">N°</th>
|
||||
<th>Date</th>
|
||||
<th>Libellé</th>
|
||||
<th class="nombre">Montant</th>
|
||||
<th class="nombre">Durée</th>
|
||||
<th class="nombre">Amortissements</th>
|
||||
<th class="nombre">Valeur nette</th>
|
||||
<th>N° compte</th>
|
||||
<th class="actions"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
{{* lister les immobilisations *}}
|
||||
{{:assign account_condition="("}}
|
||||
{{#foreach from=$module.config.prefixes item="code"}}
|
||||
|
|
@ -39,8 +26,6 @@
|
|||
{{:assign status_condition="($$.status = 'managed' OR $$.status = 'amortized')"}}
|
||||
{{:assign condition=$account_condition|cat:" AND line.debit > 0 AND "|cat:$status_condition}}
|
||||
|
||||
{{:assign nb_immo=0}}
|
||||
{{:assign total_immo = 0}}
|
||||
{{#select
|
||||
trans.id as immo_trans_id,
|
||||
trans.label as trans_label,
|
||||
|
|
@ -67,19 +52,9 @@
|
|||
ORDER BY COALESCE(doc_date_achat, trans_date) DESC;
|
||||
!table=$module.table
|
||||
!condition=$condition
|
||||
assign="immo_line"
|
||||
}}
|
||||
{{if $status != "managed" && $status != "amortized"}}
|
||||
{{:continue}}
|
||||
{{/if}}
|
||||
{{:assign trans_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$immo_trans_id}}
|
||||
{{:assign compte_url="%s/acc/accounts/journal.php?id=%s&year=%s"|args:$admin_url:$account_id:$trans_id_year}}
|
||||
{{:assign montant_immo=$doc_amount|or:$debit}}
|
||||
{{:assign immo_date = $doc_date_achat|or:$trans_date}}
|
||||
{{:assign label_immo=$doc_label|or:$trans_label}}
|
||||
{{if $label_immo|strpos:$line_label === false}}
|
||||
{{:assign label_immo=$label_immo|cat:" — "|cat:$line_label}}
|
||||
{{/if}}
|
||||
|
||||
{{* déduire le montant des écritures liées à l'immo courante au crédit du même compte *}}
|
||||
{{#load
|
||||
type="credit_link"
|
||||
|
|
@ -99,6 +74,8 @@
|
|||
{{if $montant_immo == 0}}
|
||||
{{* Immobilisation soldée *}}
|
||||
{{:continue}}
|
||||
{{else}}
|
||||
{{:assign var="immo_line.montant_immo" value=$montant_immo}}
|
||||
{{/if}}
|
||||
|
||||
{{* montant des amortissements liés à l'immobilisation *}}
|
||||
|
|
@ -108,11 +85,42 @@
|
|||
{{* classement par onglet *}}
|
||||
{{if $type_immo == "managed" && $amort_amount >= $montant_immo}}{{:continue}}{{/if}}
|
||||
{{if $type_immo == "amortized" && $amort_amount < $montant_immo}}{{:continue}}{{/if}}
|
||||
{{:assign var="immo_line.amort_amount" value=$amort_amount}}
|
||||
|
||||
{{:assign var="immo_lines." value=$immo_line}}
|
||||
{{/select}}
|
||||
|
||||
{{if $immo_lines|count > 0}}
|
||||
<table class="list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="num">N°</th>
|
||||
<th>Date</th>
|
||||
<th>Libellé</th>
|
||||
<th class="nombre">Montant</th>
|
||||
<th class="nombre">Durée</th>
|
||||
<th class="nombre">Amortissements</th>
|
||||
<th class="nombre">Valeur nette</th>
|
||||
<th>N° 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:$immo_trans_id}}
|
||||
{{:assign compte_url="%s/acc/accounts/journal.php?id=%s&year=%s"|args:$admin_url:$account_id:$trans_id_year}}
|
||||
{{:assign immo_date = $doc_date_achat|or:$trans_date}}
|
||||
{{:assign label_immo=$doc_label|or:$trans_label}}
|
||||
{{if $label_immo|strpos:$line_label === false}}
|
||||
{{:assign label_immo=$label_immo|cat:" — "|cat:$line_label}}
|
||||
{{/if}}
|
||||
|
||||
{{:assign nb_immo="%d+1"|math:$nb_immo}}
|
||||
{{:assign total_immo="%d+%d"|math:$total_immo:$montant_immo}}
|
||||
{{:assign var="montant" from="sommes_immo.%s"|args:$account_code}}
|
||||
{{:assign var="sommes_immo.%s"|args:$account_code value="%d+%d"|math:$montant:$montant_immo}}
|
||||
|
||||
<tr>
|
||||
<td class="num"><a href="{{$trans_url}}">#{{$immo_trans_id}}</a></td>
|
||||
<td>{{$immo_date|date_short}}</td>
|
||||
|
|
@ -129,7 +137,9 @@
|
|||
}}
|
||||
</td>
|
||||
</tr>
|
||||
{{/select}}
|
||||
|
||||
{{/foreach}}
|
||||
|
||||
</tbody>
|
||||
<tfoot>
|
||||
{{if $total_immo != 0}}
|
||||
|
|
@ -164,6 +174,7 @@
|
|||
</tfoot>
|
||||
</table>
|
||||
{{/if}}
|
||||
{{if $nb_immo == 0 || $module.table == null}}
|
||||
{{/if}}
|
||||
{{if $immo_lines|count == 0 || $module.table == null}}
|
||||
<p class="block alert">Aucune immobilisation</p>
|
||||
{{/if}}
|
||||
|
|
|
|||
|
|
@ -3,10 +3,11 @@
|
|||
{{* Liste des immobilisations non gérées ou non entièrement affectées *}}
|
||||
|
||||
{{:include file="_get_config.html" keep="module.config"}}
|
||||
<p class="help">
|
||||
Cette page liste les immobilisations pas encore prises en charge
|
||||
par le module ou les écritures de la balance d'ouverture initiale
|
||||
dont le montant n'est pas encore totalement affecté
|
||||
<p class="block help">
|
||||
Cet onglet liste les immobilisations créées en dehors du module et
|
||||
pas encore prises en charge par le module ou les écritures de la
|
||||
balance d'ouverture initiale dont le montant n'est pas encore
|
||||
totalement affecté
|
||||
</p>
|
||||
|
||||
{{:assign saved_hides=$module.config.hides}}
|
||||
|
|
@ -32,7 +33,7 @@
|
|||
{{if $module.table != null}}
|
||||
{{:assign columns="$$.status as status, SUM($$.amount) as amount,"}}
|
||||
{{:assign table_join="LEFT JOIN !table AS info ON $$.line = line.id"}}
|
||||
{{:assign doc_condition="($$.status IS NULL OR $$.status == 'managed' OR $$.status == 'ignored')"}}
|
||||
{{:assign doc_condition="($$.status IS NULL OR $$.status == 'managed' OR $$.status == 'ignored' OR $$.status == 'amortized')"}}
|
||||
{{else}}
|
||||
{{:assign columns=""}}
|
||||
{{:assign table_join=""}}
|
||||
|
|
@ -49,24 +50,9 @@
|
|||
{{:assign account_condition=$account_condition|cat:" account.code LIKE "|cat:$code|cat:" OR "}}
|
||||
{{/foreach}}
|
||||
{{:assign account_condition=$account_condition|cat:"0)"}}
|
||||
{{:assign condition=$account_condition|cat:" AND debit > 0 AND NOT (trans.status & 16) AND "|cat:$doc_condition}}
|
||||
|
||||
{{if $unhide == null}}
|
||||
{{:assign filter_condition="NOT ("}}
|
||||
{{#foreach from=$module.config.filters item="filter"}}
|
||||
{{:assign filter="%"|cat:$filter|cat:"%"|quote_sql}}
|
||||
{{:assign filter_condition=$filter_condition|cat:" trans_label LIKE "|cat:$filter|cat:" OR "}}
|
||||
{{/foreach}}
|
||||
{{:assign filter_condition=$filter_condition|cat:"0)"}}
|
||||
{{else}}
|
||||
{{:assign filter_condition="1"}}
|
||||
{{/if}}
|
||||
|
||||
{{:assign condition=$account_condition|cat:" AND debit > 0 AND NOT (trans.status & 16) AND "|cat:$filter_condition|cat:" AND "|cat:$doc_condition}}
|
||||
|
||||
{{:assign nb_managed=0}}
|
||||
{{:assign nb_ignored=0}}
|
||||
{{:assign nb_null=0}}
|
||||
{{:assign nb_other=0}}
|
||||
{{#select
|
||||
trans.id as immo_trans_id,
|
||||
trans.label as trans_label,
|
||||
|
|
@ -93,33 +79,41 @@
|
|||
!condition=$condition
|
||||
assign="immo_line"
|
||||
}}
|
||||
{{*
|
||||
parmi les immos gérées, ne conserver que celles dont le montant dans le doc est non nul
|
||||
et inférieur au montant de l'écriture d'immo
|
||||
*}}
|
||||
{{if $immo_line.status == 'managed'}}
|
||||
{{if $immo_line.amount == null || $immo_line.amount == 0 || $immo_line.amount == $immo_line.debit}}
|
||||
{{:continue}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{if $status == null}}
|
||||
{{:assign nb_null="%d+1"|math:$nb_null}}
|
||||
{{elseif $status == 'managed'}}
|
||||
{{:assign nb_managed="%d+1"|math:$nb_managed}}
|
||||
{{elseif $status == 'ignored'}}
|
||||
|
||||
{{if $immo_line.status == 'ignored'}}
|
||||
{{:assign nb_ignored="%d+1"|math:$nb_ignored}}
|
||||
{{else}}
|
||||
{{:assign nb_other="%d+1"|math:$nb_other}}
|
||||
{{/if}}
|
||||
|
||||
{{if $unhide == null && $immo_line.status == "ignored"}}
|
||||
{{:continue}}
|
||||
{{/if}}
|
||||
|
||||
{{* vérifier si le libellé aurait pu être filtré *}}
|
||||
{{#foreach from=$module.config.filters item="filter"}}
|
||||
{{if $trans_label|strpos:$filter !== false}}
|
||||
{{:assign var="immo_line.status" value="ignored"}}
|
||||
{{:assign nb_ignored="%d+1"|math:$nb_ignored}}
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
|
||||
{{if $unhide == null && $immo_line.status == "ignored"}}
|
||||
{{:continue}}
|
||||
{{/if}}
|
||||
{{:assign var="immo_lines." value=$immo_line}}
|
||||
{{/select}}
|
||||
|
||||
{{if $nb_ignored > 0}}
|
||||
<form method="post" action="">
|
||||
<fieldset>
|
||||
{{:input type="checkbox" value=1 name="unhide" checked="%s"|args:$checked label="Afficher les écritures ignorées" }}
|
||||
</fieldset>
|
||||
</form>
|
||||
{{/if}}
|
||||
|
||||
{{if $immo_lines|count > 0}}
|
||||
<table class="list">
|
||||
|
|
@ -139,22 +133,6 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
{{#foreach from=$immo_lines item="line"}}
|
||||
|
||||
{{if $unhide == null}}
|
||||
{{if $status == "ignored"}}
|
||||
{{:continue}}
|
||||
{{/if}}
|
||||
{{else}}
|
||||
{{* vérifier si le libellé aurait pu être filtré *}}
|
||||
{{#foreach from=$module.config.filters item="filter"}}
|
||||
{{if $trans_label|strpos:$filter !== false}}
|
||||
{{:assign status="ignored"}}
|
||||
{{else}}
|
||||
{{:assign status=""}}
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
|
||||
{{:assign trans_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$line.immo_trans_id}}
|
||||
{{:assign compte_url="%s/acc/accounts/journal.php?id=%s&year=%s"|args:$admin_url:$line.account_id:$line.trans_id_year}}
|
||||
{{:assign reste="%d-%d"|math:$line.debit:$line.amount}}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
<li {{if $current == "managed"}}class="current"{{/if}}><a href="index.html?type_immo=managed">Amortissables</a></li>
|
||||
<li {{if $current == "amortized"}}class="current"{{/if}}><a href="index.html?type_immo=amortized">Amorties</a></li>
|
||||
<li {{if $current == "archived"}}class="current"{{/if}}><a href="index.html?type_immo=archived">Sorties du bilan</a></li>
|
||||
<li {{if $current == "unfinished"}}class="current"{{/if}}><a href="index.html?type_immo=unfinished">En cours</a></li>
|
||||
<li {{if $current == "unfinished"}}class="current"{{/if}}><a href="index.html?type_immo=unfinished">En cours de constitution</a></li>
|
||||
<li {{if $current == "other"}}class="current"{{/if}}><a href="index.html?type_immo=other">À classer</a></li>
|
||||
<li {{if $current == "config"}} class="current"{{/if}}><a href="config.html">Configuration</a></li>
|
||||
<li {{if $current == "aide"}} class="current"{{/if}}><a href="aide.html">Aide</a></li>
|
||||
|
|
|
|||
141
_unfinished.html
|
|
@ -2,10 +2,11 @@
|
|||
|
||||
{{* Liste des immobilisations en cours de constitution *}}
|
||||
|
||||
<section class="immobilisation">
|
||||
|
||||
<p class="help">
|
||||
Cette page liste les immobilisations en cours de constitution, donc non amortissables
|
||||
<p class="block help">
|
||||
Cet onglet liste les immobilisations en cours de
|
||||
constitution ; vous pouvez les sélectionner pour créer une
|
||||
immobilisation amortissable (exemple : achat de matériaux pour
|
||||
la construction d'un bâtiment destiné à être amorti)
|
||||
</p>
|
||||
|
||||
{{:include file="_get_config.html" keep="module.config"}}
|
||||
|
|
@ -28,54 +29,8 @@
|
|||
{{:assign checked="checked"}}
|
||||
{{/if}}
|
||||
|
||||
<form method="post" action="">
|
||||
<fieldset class="shortFormLeft">
|
||||
<legend>Transférer une ou plusieurs lignes vers une immobilisation amortissable</legend>
|
||||
<p class="help">
|
||||
Cocher les lignes concernées
|
||||
</p>
|
||||
<div class="shortFormRight informations" id="total_amount">
|
||||
<legend>Montants sélectionnés</legend>
|
||||
<table class="montant">
|
||||
<tbody>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
<div>
|
||||
<p class="submit">
|
||||
{{:linkbutton
|
||||
label="Transférer"
|
||||
href="transfer.html?trans="
|
||||
shape="right"
|
||||
id="transfer"
|
||||
}}
|
||||
</p>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
{{:input type="checkbox" value=1 name="unhide" checked="%s"|args:$checked label="Afficher toutes les écritures" }}
|
||||
</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}}
|
||||
|
|
@ -83,6 +38,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}}
|
||||
|
|
@ -96,8 +54,8 @@
|
|||
{{/foreach}}
|
||||
{{:assign filter_condition=$filter_condition|cat:"0)"}}
|
||||
{{:assign condition=$condition|cat:" AND "|cat:$filter_condition}}
|
||||
{{:assign nb_immo=0}}
|
||||
{{:assign total_immo = 0}}
|
||||
|
||||
{{:assign nb_ignored=0}}
|
||||
{{#select
|
||||
trans.id as trans_id,
|
||||
trans.label as trans_label,
|
||||
|
|
@ -116,13 +74,17 @@
|
|||
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}}
|
||||
{{:assign var="immo_line.ignore" value=false}}
|
||||
{{#load type="immo" assign="info_immo" where="$$.line = :line_id AND $$.status = 'ignored'" :line_id=$immo_line_id|intval}}
|
||||
{{:assign ignore=true}}
|
||||
{{:assign var="immo_line.ignore" value=true}}
|
||||
{{/load}}
|
||||
{{if $ignore && $unhide == null}}
|
||||
{{if $immo_line.ignore}}
|
||||
{{:assign nb_ignored="%d + 1"|math:$nb_ignored}}
|
||||
{{/if}}
|
||||
{{if $immo_line.ignore && $unhide == null}}
|
||||
{{:continue}}
|
||||
{{/if}}
|
||||
|
||||
|
|
@ -150,9 +112,65 @@
|
|||
{{:continue}}
|
||||
{{/if}}
|
||||
|
||||
{{:assign var="immo_lines." value=$immo_line}}
|
||||
{{/select}}
|
||||
|
||||
<form method="post" action="">
|
||||
{{if $immo_lines|count > 0}}
|
||||
<fieldset class="shortFormLeft">
|
||||
<legend>Transférer une ou plusieurs lignes vers une immobilisation amortissable</legend>
|
||||
<p class="help">
|
||||
Cocher les lignes concernées
|
||||
</p>
|
||||
<div class="shortFormRight informations" id="total_amount">
|
||||
<legend>Montants sélectionnés</legend>
|
||||
<table class="montant">
|
||||
<tbody>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
<div>
|
||||
<p class="submit">
|
||||
{{:linkbutton
|
||||
label="Transférer"
|
||||
href="transfer.html?trans="
|
||||
shape="right"
|
||||
id="transfer"
|
||||
}}
|
||||
</p>
|
||||
</div>
|
||||
</fieldset>
|
||||
{{/if}}
|
||||
{{if $nb_ignored !== 0}}
|
||||
<fieldset>
|
||||
{{:input type="checkbox" value=1 name="unhide" checked="%s"|args:$checked label="Afficher les écritures ignorées" }}
|
||||
</fieldset>
|
||||
{{/if}}
|
||||
</form>
|
||||
|
||||
{{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}}
|
||||
|
|
@ -174,7 +192,8 @@
|
|||
}}
|
||||
</td>
|
||||
</tr>
|
||||
{{/select}}
|
||||
{{/foreach}}
|
||||
|
||||
</tbody>
|
||||
<tfoot>
|
||||
{{if $total_immo != 0}}
|
||||
|
|
@ -203,10 +222,10 @@
|
|||
{{/if}}
|
||||
</tfoot>
|
||||
</table>
|
||||
{{if $nb_immo == 0}}
|
||||
<p class="block alert">Aucune immobilisation</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">
|
||||
|
|
|
|||
|
|
@ -139,25 +139,28 @@
|
|||
<dt>Montant à amortir</dt>
|
||||
<dd class="money strong">{{"%f"|math:$solde|money_currency_html:false|raw}}</dd>
|
||||
{{/if}}
|
||||
{{if $valeur_residuelle > 0}}
|
||||
<dt>Montant des amortissements</dt>
|
||||
<dd>{{$total_amort|money_currency_html:false|raw}}</dd>
|
||||
<dt>Valeur nette résiduelle</dt>
|
||||
<dd>{{$valeur_residuelle|money_currency_html:false|raw}}</dd>
|
||||
{{/if}}
|
||||
{{if $info_immo.duration != null && $valeur_residuelle > 0}}
|
||||
{{:assign annuite="%f/%d"|math:$solde:$info_immo.duration}}
|
||||
<dt>Annuité estimée</dt>
|
||||
<dd>{{"min(%d, %f/%d)"|math:$valeur_residuelle:$solde:$info_immo.duration|money_currency_html:false|raw}}</dd>
|
||||
<dd>{{"min(%d, %d)"|math:$valeur_residuelle:$annuite|money_currency_html:false|raw}}
|
||||
{{if $annuite <= $valeur_residuelle}}
|
||||
<span class="help"> pour un exercice de 365 jours</span>
|
||||
{{/if}}
|
||||
</dd>
|
||||
{{/if}}
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
{{if $valeur_residuelle > 0 || $linked_immos != null}}
|
||||
{{if ! $created_amort || $linked_immos != null}}
|
||||
<h3 class="ruler">Avoirs</h3>
|
||||
<nav class="actions">
|
||||
{{if $total_amort == 0 || ! $created_amort}}
|
||||
{{:linkbutton label="Attacher une écriture d'avoir" href="link_immo.html?immo_doc_id=%s&filter=true"|args:$_GET.immo_doc_id shape="link" target="_dialog"}}
|
||||
{{/if}}
|
||||
{{if ! $created_amort}}
|
||||
<nav class="actions">
|
||||
{{:linkbutton label="Attacher une écriture d'avoir" href="link_immo.html?immo_doc_id=%s&filter=true"|args:$_GET.immo_doc_id shape="link" target="_dialog"}}
|
||||
</nav>
|
||||
{{/if}}
|
||||
|
||||
|
|
@ -263,7 +266,14 @@
|
|||
{{/if}}
|
||||
|
||||
{{if $linked_amort == null}}
|
||||
<p class="block alert">Aucun amortissement enregistré pour cette immobilisation ; utilisez le bouton « Enregistrer un amortissement » pour enregistrer un nouvel amortissement</p>
|
||||
<p class="block alert">Aucun amortissement enregistré pour cette
|
||||
immobilisation ; en fin d'exercice vous pouvez enregistrer un
|
||||
nouvel amortissement à l'aide du bouton « Enregistrer un
|
||||
amortissement »</p>
|
||||
{{elseif $_GET.type_immo == "managed"}}
|
||||
<p class="block alert">En fin d'exercice vous pouvez enregistrer
|
||||
un nouvel amortissement à l'aide du bouton « Enregistrer un
|
||||
amortissement »</p>
|
||||
{{/if}}
|
||||
|
||||
{{:form_errors}}
|
||||
|
|
|
|||
|
|
@ -36,4 +36,4 @@
|
|||
exit_line_id=$_GET.exit_line_id|intval
|
||||
}}
|
||||
|
||||
{{:redirect to="exit_step4.html?immo_doc_id=%s&from=exit&ok=1&msg=attach_exit"|args:$_GET.immo_doc_id}}
|
||||
{{:redirect force="exit_step4.html?immo_doc_id=%s&from=exit&ok=1&msg=attach_exit"|args:$_GET.immo_doc_id}}
|
||||
|
|
|
|||
128
doc/aide.html
|
|
@ -213,13 +213,8 @@ premier exercice créé dans Paheko ; on n’a donc pas à s’en
|
|||
<p>L’exemple ci-dessous montre un extrait de la balance d’ouverture du
|
||||
premier exercice créé dans Paheko et reprend une partie du bilan du
|
||||
dernier exercice d’une comptabilité antérieure à Paheko.</p>
|
||||
<figure>
|
||||
<img src="./doc/exemple_balance-initiale.png"
|
||||
title="Exemple de balance d'ouverture"
|
||||
alt="Extrait de balance d’ouverture initiale dans Paheko" />
|
||||
<figcaption aria-hidden="true">Extrait de balance d’ouverture initiale
|
||||
dans Paheko</figcaption>
|
||||
</figure>
|
||||
<p><img src="./doc/exemple_balance-initiale.png"
|
||||
title="Exemple de balance d'ouverture" /></p>
|
||||
<ul>
|
||||
<li>la ligne du compte <strong>2181</strong> correspond à deux
|
||||
immobilisations de valeurs respectives <strong>5 500€</strong> et
|
||||
|
|
@ -238,13 +233,8 @@ amortissements des trois immobilisations du compte
|
|||
</ul>
|
||||
<p>Dans l’onglet <em>À classer</em> on trouve les immobilisations de la
|
||||
balance d’ouverture :</p>
|
||||
<figure>
|
||||
<img src="./doc/exemple_immobilisations_a_classer-1.png"
|
||||
title="Immobilisations de la balance initiale à incorporer dans Paheko"
|
||||
alt="Immobilisations de la balance initiale à incorporer dans Paheko" />
|
||||
<figcaption aria-hidden="true">Immobilisations de la balance initiale à
|
||||
incorporer dans Paheko</figcaption>
|
||||
</figure>
|
||||
<p><img src="./doc/exemple_immobilisations_a_classer-1.png"
|
||||
title="Immobilisations de la balance initiale à incorporer dans Paheko" /></p>
|
||||
<ul>
|
||||
<li>la colonne <em>Date</em> donne la date de la balance
|
||||
d’ouverture</li>
|
||||
|
|
@ -259,13 +249,10 @@ attribué</li>
|
|||
2181, cliquer le bouton <em>Paramètres</em>, puis cocher le choix
|
||||
« Immobilisation à amortir ».</p>
|
||||
<p>Les paramètres sont pré-remplis à partir des données de l’écriture de
|
||||
la balance d’ouverture et seront donc à modifier en fonction des données
|
||||
la balance d’ouverture et sont donc à modifier en fonction des données
|
||||
de l’immobilisation concernée.</p>
|
||||
<figure>
|
||||
<img src="./doc/exemple_parametres_immobilisation-1.png"
|
||||
title="Paramètres a renseigner" alt="Paramètres a renseigner" />
|
||||
<figcaption aria-hidden="true">Paramètres a renseigner</figcaption>
|
||||
</figure>
|
||||
<p><img src="./doc/exemple_parametres_immobilisation-1.png"
|
||||
title="Paramètres a renseigner" /></p>
|
||||
<ul>
|
||||
<li>Date d’acquisition de l’immobilisation</li>
|
||||
<li>Libellé de l’immobilisation</li>
|
||||
|
|
@ -282,31 +269,16 @@ immobilisation</a>.</li>
|
|||
</ul>
|
||||
<p>Après validation, cette immobilisation se retrouve classée dans les
|
||||
immobilisations amortissables :</p>
|
||||
<figure>
|
||||
<img src="./doc/exemple_immobilisations_amortissables-1.png"
|
||||
title="Immobilisations amortissables]"
|
||||
alt="Immobilisations amortissables" />
|
||||
<figcaption aria-hidden="true">Immobilisations
|
||||
amortissables</figcaption>
|
||||
</figure>
|
||||
<p><img src="./doc/exemple_immobilisations_amortissables-1.png"
|
||||
title="Immobilisations amortissables]" /></p>
|
||||
<p>et dans l’onglet <em>À classer</em> on trouve le montant affecté à la
|
||||
première immobilisation.</p>
|
||||
<figure>
|
||||
<img src="./doc/exemple_immobilisations_a_classer-2.png"
|
||||
title="Immobilisations à incorporer dans Paheko"
|
||||
alt="Immobilisations à incorporer dans Paheko" />
|
||||
<figcaption aria-hidden="true">Immobilisations à incorporer dans
|
||||
Paheko</figcaption>
|
||||
</figure>
|
||||
<p><img src="./doc/exemple_immobilisations_a_classer-2.png"
|
||||
title="Immobilisations à incorporer dans Paheko" /></p>
|
||||
<p>On fait de même pour la deuxième immobilisation du compte 2181 puis
|
||||
pour les trois immobilisations du compte 2185 et on obtient :</p>
|
||||
<figure>
|
||||
<img src="./doc/exemple_immobilisations_amortissables-2.png"
|
||||
title="Immobilisations amortissables"
|
||||
alt="Immobilisations amortissables" />
|
||||
<figcaption aria-hidden="true">Immobilisations
|
||||
amortissables</figcaption>
|
||||
</figure>
|
||||
<p><img src="./doc/exemple_immobilisations_amortissables-2.png"
|
||||
title="Immobilisations amortissables" /></p>
|
||||
<p>et l’onglet <em>À classer</em> est vide.</p>
|
||||
<p>Si des amortissements ont été enregistrés pour une ou plusieurs
|
||||
immobilisations avant la mise en service du module, on pourra les
|
||||
|
|
@ -349,58 +321,45 @@ amortissements</em> de ce compte à la date de fin du dernier exercice de
|
|||
la comptabilité antérieure à Paheko ; ce montant devra donc <em>être
|
||||
réparti entre les différentes immobilisations concernées</em>.</p>
|
||||
<p><strong>Exemple :</strong> le montant qui figure dans la balance
|
||||
d’ouverture pour le compte 28185 est de 7058,06€ réparti ainsi :</p>
|
||||
d’ouverture pour le compte 28185 est de 10627,25€ réparti ainsi :</p>
|
||||
<ul>
|
||||
<li>montant des amortissements du Saxophone : 1016,43€</li>
|
||||
<li>montant des amortissements du Saxophone : 3500,00€</li>
|
||||
<li>montant des amortissements du Piano numérique : 4102,39€</li>
|
||||
<li>montant des amortissements de la Batterie : 1939,24€</li>
|
||||
<li>montant des amortissements de la Batterie : 3024,86€</li>
|
||||
</ul>
|
||||
<p>Voici la page des détails du Saxophone avant l’attachement des
|
||||
amortissements de la balance d’ouverture :</p>
|
||||
<figure>
|
||||
<img src="./doc/exemple_amortissement-saxo.png"
|
||||
title="Page de détails du saxophone"
|
||||
alt="Page de détails du saxophone" />
|
||||
<figcaption aria-hidden="true">Page de détails du saxophone</figcaption>
|
||||
</figure>
|
||||
<p><img src="./doc/exemple_amortissement-saxo.png"
|
||||
title="Page de détails du saxophone" /></p>
|
||||
<p>Cliquer le bouton <em>Attacher un amortissement</em> ; la liste des
|
||||
amortissements du compte 28185 s’affiche :</p>
|
||||
<figure>
|
||||
<img src="./doc/exemple_amortissements_a_repartir.png"
|
||||
title="Amortissements du compte 28185"
|
||||
alt="Amortissements du compte 28185" />
|
||||
<figcaption aria-hidden="true">Amortissements du compte
|
||||
28185</figcaption>
|
||||
</figure>
|
||||
<p><img src="./doc/exemple_amortissements_a_repartir.png"
|
||||
title="Amortissements du compte 28185" /></p>
|
||||
<p>Sur la page qui s’ouvre quand on clique <em>Attacher</em>, il faut
|
||||
modifier le montant affiché (7058,06) en indiquant le montant des
|
||||
amortissements de l’immobilisation (1016,43).</p>
|
||||
<figure>
|
||||
<img src="./doc/exemple_saisie-amortissement-saxo.png"
|
||||
title="Saisie du montant de l'amortissement"
|
||||
alt="Saisie du montant de l’amortissement" />
|
||||
<figcaption aria-hidden="true">Saisie du montant de
|
||||
l’amortissement</figcaption>
|
||||
</figure>
|
||||
modifier le montant affiché (10627,25) en indiquant le montant des
|
||||
amortissements de l’immobilisation (3500).</p>
|
||||
<p><img src="./doc/exemple_saisie-amortissement-saxo-1.png" alt="Montant de l'amortissement à modifier" style="border: 1px solid grey;">
|
||||
<img src="./doc/exemple_saisie-amortissement-saxo-2.png" alt="Montant de l'amortissement à modifier" style="border: 1px solid grey;"></p>
|
||||
<p>De retour sur la page des amortissements, on constate la présence de
|
||||
l’écriture d’amortissement qu’on vient d’attacher ; on peut détacher une
|
||||
écriture si on s’est trompé.</p>
|
||||
<figure>
|
||||
<img src="./doc/exemple_amortissement-saxo-2.png"
|
||||
title="Page de détails du saxophone"
|
||||
alt="Page de détails du saxophone" />
|
||||
<figcaption aria-hidden="true">Page de détails du saxophone</figcaption>
|
||||
</figure>
|
||||
<p>On peut aussi remarquer que l’immobilisation est totalement amortie
|
||||
et est classée dans l’onglet des immobilisations amorties ; on constate
|
||||
que sa valeur nette est bien égale à 0.</p>
|
||||
<p><img src="./doc/exemple_amortissement-saxo-2.png"
|
||||
title="Page de détails du saxophone" /></p>
|
||||
<p>On peut faire de même pour les amortissements des autres
|
||||
immobilisations du compte 2185 (Batterie et Piano) puis pour celles du
|
||||
compte 2181 et l’on obtient :</p>
|
||||
<figure>
|
||||
<img src="./doc/exemple_immobilisations_amortissables-3.png"
|
||||
title="Immobilisations et amortissements après incorporation"
|
||||
alt="Immobilisations et amortissements après incorporation" />
|
||||
<figcaption aria-hidden="true">Immobilisations et amortissements après
|
||||
incorporation</figcaption>
|
||||
</figure>
|
||||
compte 2181.</p>
|
||||
<p><strong>Exemple du piano :</strong></p>
|
||||
<p><img src="./doc/exemple_amortissement-piano.png"
|
||||
title="Page de détails du piano" /></p>
|
||||
<p>Pour finir on obtient :</p>
|
||||
<p><img src="./doc/exemple_immobilisations_amortissables-3.png"
|
||||
title="Immobilisations et amortissements après incorporation" /></p>
|
||||
<p>et :</p>
|
||||
<p><img src="./doc/exemple_immobilisations_amortissables-4.png"
|
||||
title="Immobilisation totalement amortie" /></p>
|
||||
<p>Les immobilisations et amortissements de la balance d’ouverture
|
||||
initiale ont été incorporés en totalité dans le module.</p>
|
||||
<p>Par la suite, pour créer de nouveaux amortissements, il suffit de
|
||||
|
|
@ -446,13 +405,8 @@ pas amortissables, mais sont destinées à être groupées pour former une
|
|||
nouvelle immobilisation qui pourra être amortie.</p>
|
||||
<p>Pour ce faire, cocher les lignes à grouper puis cliquer
|
||||
<em>Transférer</em>.</p>
|
||||
<figure>
|
||||
<img src="./doc/exemple_immobilisations_en-cours-1.png"
|
||||
title="Immobilisations en cours de constitutions"
|
||||
alt="Immobilisations en cours de constitutions" />
|
||||
<figcaption aria-hidden="true">Immobilisations en cours de
|
||||
constitutions</figcaption>
|
||||
</figure>
|
||||
<p><img src="./doc/exemple_immobilisations_en-cours-1.png"
|
||||
title="Immobilisations en cours de constitutions" /></p>
|
||||
<p>Sur la page qui s’ouvre, saisir les données de la nouvelle
|
||||
immobilisation :</p>
|
||||
<ul>
|
||||
|
|
|
|||
BIN
doc/exemple_amortissement-piano.png
Normal file
|
After Width: | Height: | Size: 69 KiB |
|
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 77 KiB |
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 75 KiB |
BIN
doc/exemple_immobilisations_amortissables-4.png
Normal file
|
After Width: | Height: | Size: 42 KiB |
BIN
doc/exemple_saisie-amortissement-saxo-1.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
doc/exemple_saisie-amortissement-saxo-2.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 30 KiB |
|
|
@ -21,7 +21,7 @@
|
|||
{{:include file="_nav.html" current=$type_immo}}
|
||||
|
||||
{{* Mise à niveau *}}
|
||||
{{:assign module_version="0.40.1"}}
|
||||
{{:assign module_version="0.40.4"}}
|
||||
{{:include file="upgrade.html" module_version=$module_version}}
|
||||
|
||||
{{* supprimer les documents sans écriture associée *}}
|
||||
|
|
|
|||
|
|
@ -120,8 +120,6 @@
|
|||
{{/if}}
|
||||
{{:form_errors}}
|
||||
|
||||
{{:assign choix_defaut=$_GET.type_immo}}
|
||||
|
||||
{{*
|
||||
modifier la date de mise en service, les écritures associées ou la durée d'amortissement
|
||||
*}}
|
||||
|
|
@ -167,3 +165,11 @@
|
|||
</form>
|
||||
|
||||
{{:admin_footer}}
|
||||
|
||||
<script type="text/javascript">
|
||||
(function () {
|
||||
document.getElementById('f_date_achat').addEventListener("change", (e) => {
|
||||
document.getElementById('f_date_mes').value = document.getElementById('f_date_achat').value;
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
name="Amortissements"
|
||||
description="Immobilisations et amortissements\nversion 0.40.1"
|
||||
description="Immobilisations et amortissements\nversion 0.40.4"
|
||||
author="Jean-Christophe Engel"
|
||||
author_url="https://gitea.zaclys.com/lesanges"
|
||||
home_button=false
|
||||
|
|
|
|||
|
|
@ -41,6 +41,11 @@
|
|||
{{:assign amort_label=$line_label|or:$trans_label}}
|
||||
{{/foreach}}
|
||||
|
||||
{{* date de début du 1er exercice dans paheko *}}
|
||||
{{#years order="start_date" limit=1}}
|
||||
{{:assign first_date=$start_date}}
|
||||
{{/years}}
|
||||
|
||||
{{if $total_amort == 0}}
|
||||
{{* 1er amortissement *}}
|
||||
{{* déterminer le compte d'amortissement en fonction du compte d'immobilisation *}}
|
||||
|
|
@ -55,9 +60,11 @@
|
|||
{{:assign var=libelle value="Amortissement %s"|args:$ligne_immo.trans_label}}
|
||||
{{else}}
|
||||
{{* amortissements suivants *}}
|
||||
{{if $date_debut != $first_date}}
|
||||
{{:assign date_debut=$date_debut|strtotime}}
|
||||
{{:assign date_debut="%d+(60*60*24)"|math:$date_debut|date:"Y-m-d"}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
{{*
|
||||
lister les exercices qui englobent la date de mise en service de l'immo
|
||||
|
|
@ -219,13 +226,13 @@
|
|||
|
||||
{{if $years|count == 1}}
|
||||
{{:assign var=selected_year value=$years.0.id}}
|
||||
{{/if}}
|
||||
{{:assign var=date_amort value=$years.0.end_date}}
|
||||
{{:include file="_calcul_dates.html" date_debut=$date_debut date_fin=$date_amort keep="nbjours"}}
|
||||
|
||||
{{* montant de l'amortissement *}}
|
||||
{{:assign montant_amort="%f/%f/365*%d"|math:$ligne_immo.amount:$info_immo.duration:$nbjours|intval}}
|
||||
{{:assign montant_amort="min(%f, %d-%d)"|math:$montant_amort:$ligne_immo.amount:$total_amort}}
|
||||
{{/if}}
|
||||
|
||||
{{:assign var="debit_account.6811" value="6811 — Dot. aux amortissements des immobilisations"}}
|
||||
{{:assign var="credit_account.%s"|args:$code_amort value="%s — "|args:$code_amort|cat:$amort_account_label}}
|
||||
|
||||
|
|
@ -242,7 +249,10 @@
|
|||
{{:input type="select" default=$selected_year name="id_year" label="Exercice" required=true default_empty="— Faire un choix —" options=$open_years}}
|
||||
{{:input type="date" name="date_amort" label="Date" required=true default=$date_amort|date_short}}
|
||||
{{:input type="text" name="designation" label="Libellé" required=true default=$amort_label size="50"}}
|
||||
{{:input type="money" name="montant" label="Montant" required=true default=$montant_amort}}
|
||||
{{if $total_amort == 0 || $nbjours < 365 || $nbjours > 366}}
|
||||
{{:assign msg="Montant calculé au prorata du nombre de jours d'amortissement dans l'exercice"}}
|
||||
{{/if}}
|
||||
{{:input type="money" name="montant" label="Montant" required=true default=$montant_amort help=$msg}}
|
||||
{{:input
|
||||
type="list"
|
||||
name="debit_account"
|
||||
|
|
|
|||
|
|
@ -38,5 +38,4 @@
|
|||
{{:include file="_compare_version.tpl" nv1=$module_version nv2=$module.config.version keep="comp"}}
|
||||
{{if $comp > 0}}
|
||||
{{:save key="config" version=$module_version}}
|
||||
<p class="block alert">Nouvelle version enregistrée : {{$module_version}}</p>
|
||||
{{/if}}
|
||||
|
|
|
|||