Compare commits
No commits in common. "main" and "v0.40.3" have entirely different histories.
8 changed files with 204 additions and 203 deletions
381
_archives.html
381
_archives.html
|
|
@ -4,223 +4,226 @@
|
||||||
<p class="block help">
|
<p class="block help">
|
||||||
Cet onglet liste les immobilisations sorties du bilan car elles ne
|
Cet onglet liste les immobilisations sorties du bilan car elles ne
|
||||||
sont plus utilisées dans l'association (vétusté, fin de vie,
|
sont plus utilisées dans l'association (vétusté, fin de vie,
|
||||||
vente...).
|
vente, cession...).
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
{{:include file="_get_config.html" keep="module.config"}}
|
{{: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"}}
|
||||||
|
{{:assign code=$code|cat:"%"|quote_sql}}
|
||||||
|
{{:assign account_condition=$account_condition|cat:"account.code LIKE "|cat:$code|cat:" OR "}}
|
||||||
|
{{/foreach}}
|
||||||
|
{{:assign account_condition=$account_condition|cat:"0)"}}
|
||||||
|
|
||||||
{{* lister les immobilisations *}}
|
{{:assign filter_condition=" AND NOT ("}}
|
||||||
{{:assign account_condition="("}}
|
{{#foreach from=$module.config.filters item="filter"}}
|
||||||
{{#foreach from=$module.config.prefixes item="code"}}
|
{{:assign filter="%"|cat:$filter|cat:"%"|quote_sql}}
|
||||||
{{:assign code=$code|cat:"%"|quote_sql}}
|
{{:assign filter_condition=$filter_condition|cat:" trans_label LIKE "|cat:$filter|cat:" OR "}}
|
||||||
{{:assign account_condition=$account_condition|cat:"account.code LIKE "|cat:$code|cat:" OR "}}
|
{{/foreach}}
|
||||||
{{/foreach}}
|
{{:assign filter_condition=$filter_condition|cat:"0)"}}
|
||||||
{{:assign account_condition=$account_condition|cat:"0)"}}
|
{{:assign condition=$account_condition|cat:" AND debit > 0 AND NOT (trans.status & 16)"|cat:$filter_condition}}
|
||||||
{{:assign status_condition="($$.status = 'archived')"}}
|
|
||||||
|
|
||||||
{{:assign filter_condition=" ("}}
|
{{:assign nb_immo=0}}
|
||||||
{{#foreach from=$module.config.filters item="filter"}}
|
{{:assign total_cessions = 0}}
|
||||||
{{: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) 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
|
||||||
|
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
|
||||||
|
assign="immo_line"
|
||||||
|
}}
|
||||||
|
|
||||||
{{#select
|
{{* voir si l'immo est prise en charge *}}
|
||||||
trans.id as trans_id,
|
{{#load type="immo" where="$$.line = :line_id" :line_id=$immo_line_id assign="info_immo"}}
|
||||||
trans.label as trans_label,
|
{{:assign status=$status}}
|
||||||
trans.date as trans_date,
|
{{else}}
|
||||||
trans.id_year as trans_id_year,
|
{{:assign status=null}}
|
||||||
line.id as immo_line_id,
|
{{/load}}
|
||||||
line.label as line_label,
|
{{if $status != "archived"}}
|
||||||
line.debit AS debit,
|
{{:continue}}
|
||||||
account.id as account_id,
|
{{/if}}
|
||||||
account.code as account_code,
|
{{:assign var="immo_line.date_mes" value=$info_immo.date_mes|or:$trans_date}}
|
||||||
account.label as account_label,
|
{{:assign var="immo_line.montant_immo" value=$debit}}
|
||||||
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}}
|
{{* chercher le doc de sortie du bilan *}}
|
||||||
{{:assign var="immo_line.montant_immo" value=$doc_amount|or:$debit}}
|
{{:assign var="immo_line.exit_date" value=null}}
|
||||||
|
{{#load type="exit_link" where="$$.immo_doc_id = :immo_doc_id" :immo_doc_id=$info_immo.id}}
|
||||||
{{* chercher le doc de sortie du bilan *}}
|
{{:assign exit_line_id=$exit_line_id}}
|
||||||
{{: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
|
{{#select
|
||||||
trans.id as cession_id,
|
trans.date
|
||||||
trans.label,
|
|
||||||
line.id as line_id,
|
|
||||||
line.credit
|
|
||||||
FROM acc_transactions_lines AS line
|
FROM acc_transactions_lines AS line
|
||||||
INNER JOIN acc_transactions AS trans ON line.id_transaction = trans.id
|
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
|
WHERE line.id = :exit_line_id;
|
||||||
INNER JOIN !table AS immo_doc ON json_extract(cession_link.document, '$.immo_doc_id') = immo_doc.id
|
:exit_line_id=$exit_line_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="immo_line.exit_date" value=$date}}
|
||||||
{{:assign var="montant_cessions.%d"|args:$account_code value="%d+%d"|math:$montant:$credit}}
|
|
||||||
{{:assign total_cessions="%d+%d"|math:$total_cessions:$credit}}
|
|
||||||
{{/select}}
|
{{/select}}
|
||||||
{{:assign var="immo_lines." value=$immo_line}}
|
{{/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:$immo_line.montant_immo:$total_credits}}
|
||||||
|
|
||||||
|
{{if $solde_immo == 0}}
|
||||||
|
{{:assign status="archived"}}
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
{{if $status != "archived"}}
|
||||||
|
{{:continue}}
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
{{:assign nb_immo="%d+1"|math:$nb_immo}}
|
||||||
|
{{: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,
|
||||||
|
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}}
|
{{/select}}
|
||||||
|
{{:assign var="immo_lines." value=$immo_line}}
|
||||||
|
{{/select}}
|
||||||
|
|
||||||
|
{{if $immo_lines|count > 0}}
|
||||||
|
<section class="immobilisation">
|
||||||
|
<table class="list">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>N°</th>
|
||||||
|
<th>Mise en service</th>
|
||||||
|
<th>Date sortie</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 total_immo="%d+%d"|math:$total_immo:$montant_immo}}
|
||||||
|
|
||||||
{{if $immo_lines|count > 0}}
|
|
||||||
<section class="immobilisation">
|
|
||||||
<table class="list">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
<tr>
|
||||||
<th>N°</th>
|
<td class="num"><a href="{{$trans_url}}">#{{$trans_id}}</a></td>
|
||||||
<th>Mise en service</th>
|
<td>{{$date_mes|date_short}}</td>
|
||||||
<th>Date sortie</th>
|
<td>{{$exit_date|date_short}}</td>
|
||||||
<th>Libellé</th>
|
<td>{{$trans_label}}{{if $line_label != null && $line_label != $trans_label}} — {{$line_label}}{{/if}}</td>
|
||||||
<th class="nombre">Montant</th>
|
<td class="money">{{"%f"|math:$montant_immo|money_html:false|raw}}</td>
|
||||||
<th>N° compte</th>
|
<td><a href="{{$compte_url}}">{{$account_code}}</a></td>
|
||||||
<th>Compte</th>
|
<td>{{$account_label}}</td>
|
||||||
<th class="actions"></th>
|
<td class="actions">
|
||||||
|
{{:linkbutton label="Modifier" href="exit_step1.html?immo_doc_id=%s&from=exit"|args:$info_immo.id shape="edit"}}
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
{{/foreach}}
|
||||||
<tbody>
|
</tbody>
|
||||||
|
<tfoot>
|
||||||
{{:assign total_immo = 0}}
|
{{if $total_immo != 0}}
|
||||||
{{#foreach from=$immo_lines}}
|
<tr>
|
||||||
{{:assign trans_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$trans_id}}
|
<td colspan="9">
|
||||||
{{:assign compte_url="%s/acc/accounts/journal.php?id=%s&year=%s"|args:$admin_url:$account_id:$trans_id_year}}
|
</tr>
|
||||||
{{:assign total_immo="%d+%d"|math:$total_immo:$montant_immo}}
|
{{#foreach from=$sommes_immo|ksort key="code" item="value"}}
|
||||||
{{: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>
|
<tr>
|
||||||
<td class="num"><a href="{{$trans_url}}">#{{$trans_id}}</a></td>
|
<td></td>
|
||||||
<td>{{$date_mes|date_short}}</td>
|
<td></td>
|
||||||
<td>{{$exit_date|date_short}}</td>
|
<td></td>
|
||||||
<td>{{$label_immo}}</td>
|
<td>Total du compte {{$code}}</td>
|
||||||
<td class="money">{{"%f"|math:$montant_immo|money_html:false|raw}}</td>
|
<td class="money">{{$value|money_html:false|raw}}</td>
|
||||||
<td><a href="{{$compte_url}}">{{$account_code}}</a></td>
|
<td></td>
|
||||||
<td>{{$account_label}}</td>
|
<td></td>
|
||||||
<td class="actions">
|
<td class="actions"></td>
|
||||||
{{:linkbutton label="Modifier" href="exit_step1.html?immo_doc_id=%s&from=exit"|args:$immo_doc_id shape="edit"}}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
</tbody>
|
<tr>
|
||||||
<tfoot>
|
<td></td>
|
||||||
{{if $total_immo != 0}}
|
<td></td>
|
||||||
<tr>
|
<td></td>
|
||||||
<td colspan="9">
|
<td class="strong">Total des immobilisations</td>
|
||||||
</tr>
|
<td class="money strong">{{$total_immo|money_html:false|raw}}</td>
|
||||||
{{#foreach from=$sommes_immo|ksort key="code" item="value"}}
|
<td></td>
|
||||||
<tr>
|
<td></td>
|
||||||
<td></td>
|
<td class="actions"></td>
|
||||||
<td></td>
|
</tr>
|
||||||
<td></td>
|
{{/if}}
|
||||||
<td>Total du compte {{$code}}</td>
|
{{if $total_cessions != 0}}
|
||||||
<td class="money">{{$value|money_html:false|raw}}</td>
|
<tr>
|
||||||
<td></td>
|
<td colspan="9">
|
||||||
<td></td>
|
</tr>
|
||||||
<td class="actions"></td>
|
{{#foreach from=$montant_cessions|ksort key="code" item="value"}}
|
||||||
</tr>
|
|
||||||
{{/foreach}}
|
|
||||||
<tr>
|
<tr>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td class="strong">Total des immobilisations</td>
|
<td>Cessions du compte {{$code}}</td>
|
||||||
<td class="money strong">{{$total_immo|money_html:false|raw}}</td>
|
<td class="money">{{$value|money_html:false|raw}}</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td class="actions"></td>
|
<td class="actions"></td>
|
||||||
</tr>
|
</tr>
|
||||||
{{/if}}
|
{{/foreach}}
|
||||||
{{if $total_cessions != 0}}
|
<tr>
|
||||||
<tr>
|
<td></td>
|
||||||
<td colspan="9">
|
<td></td>
|
||||||
</tr>
|
<td></td>
|
||||||
{{#foreach from=$montant_cessions|ksort key="code" item="value"}}
|
<td class="strong">Total des cessions</td>
|
||||||
<tr>
|
<td class="money strong">{{$total_cessions|money_html:false|raw}}</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td class="actions"></td>
|
||||||
<td>Cessions du compte {{$code}}</td>
|
</tr>
|
||||||
<td class="money">{{$value|money_html:false|raw}}</td>
|
{{/if}}
|
||||||
<td></td>
|
</tfoot>
|
||||||
<td></td>
|
</table>
|
||||||
<td class="actions"></td>
|
</section>
|
||||||
</tr>
|
{{else}}
|
||||||
{{/foreach}}
|
|
||||||
<tr>
|
|
||||||
<td></td>
|
|
||||||
<td></td>
|
|
||||||
<td></td>
|
|
||||||
<td class="strong">Total des cessions</td>
|
|
||||||
<td class="money strong">{{$total_cessions|money_html:false|raw}}</td>
|
|
||||||
<td></td>
|
|
||||||
<td></td>
|
|
||||||
<td class="actions"></td>
|
|
||||||
</tr>
|
|
||||||
{{/if}}
|
|
||||||
</tfoot>
|
|
||||||
</table>
|
|
||||||
</section>
|
|
||||||
{{/if}}
|
|
||||||
{{/if}}
|
|
||||||
{{if $immo_lines|count == 0 || $module.table == null}}
|
|
||||||
<p class="block alert">Aucune immobilisation</p>
|
<p class="block alert">Aucune immobilisation</p>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
||||||
|
|
@ -9,4 +9,4 @@
|
||||||
|
|
||||||
{{:assign ts_debut=$date_debut|strtotime}}
|
{{:assign ts_debut=$date_debut|strtotime}}
|
||||||
{{:assign ts_fin=$date_fin|strtotime}}
|
{{:assign ts_fin=$date_fin|strtotime}}
|
||||||
{{:assign nbjours="round(1+abs(%d-%d)/(60*60*24), 0)"|math:$ts_fin:$ts_debut}}
|
{{:assign nbjours="1+abs(%d-%d)/(60*60*24)"|math:$ts_fin:$ts_debut}}
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
id_transaction
|
id_transaction
|
||||||
FROM acc_transactions_lines
|
FROM acc_transactions_lines
|
||||||
WHERE id = :line_id;
|
WHERE id = :line_id;
|
||||||
:line_id = $line_id
|
:line_id = $line_id|intval
|
||||||
}}
|
}}
|
||||||
{{:assign trans_id=$id_transaction}}
|
{{:assign trans_id=$id_transaction}}
|
||||||
{{else}}
|
{{else}}
|
||||||
|
|
|
||||||
|
|
@ -36,4 +36,4 @@
|
||||||
exit_line_id=$_GET.exit_line_id|intval
|
exit_line_id=$_GET.exit_line_id|intval
|
||||||
}}
|
}}
|
||||||
|
|
||||||
{{:redirect force="exit_step4.html?immo_doc_id=%s&from=exit&ok=1&msg=attach_exit"|args:$_GET.immo_doc_id}}
|
{{:redirect to="exit_step4.html?immo_doc_id=%s&from=exit&ok=1&msg=attach_exit"|args:$_GET.immo_doc_id}}
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
{{:include file="_nav.html" current=$type_immo}}
|
{{:include file="_nav.html" current=$type_immo}}
|
||||||
|
|
||||||
{{* Mise à niveau *}}
|
{{* Mise à niveau *}}
|
||||||
{{:assign module_version="0.40.4"}}
|
{{:assign module_version="0.40.3"}}
|
||||||
{{:include file="upgrade.html" module_version=$module_version}}
|
{{:include file="upgrade.html" module_version=$module_version}}
|
||||||
|
|
||||||
{{* supprimer les documents sans écriture associée *}}
|
{{* supprimer les documents sans écriture associée *}}
|
||||||
|
|
|
||||||
|
|
@ -120,6 +120,8 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{:form_errors}}
|
{{: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
|
modifier la date de mise en service, les écritures associées ou la durée d'amortissement
|
||||||
*}}
|
*}}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
name="Amortissements"
|
name="Amortissements"
|
||||||
description="Immobilisations et amortissements\nversion 0.40.4"
|
description="Immobilisations et amortissements\nversion 0.40.3"
|
||||||
author="Jean-Christophe Engel"
|
author="Jean-Christophe Engel"
|
||||||
author_url="https://gitea.zaclys.com/lesanges"
|
author_url="https://gitea.zaclys.com/lesanges"
|
||||||
home_button=false
|
home_button=false
|
||||||
|
|
|
||||||
|
|
@ -41,11 +41,6 @@
|
||||||
{{:assign amort_label=$line_label|or:$trans_label}}
|
{{:assign amort_label=$line_label|or:$trans_label}}
|
||||||
{{/foreach}}
|
{{/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}}
|
{{if $total_amort == 0}}
|
||||||
{{* 1er amortissement *}}
|
{{* 1er amortissement *}}
|
||||||
{{* déterminer le compte d'amortissement en fonction du compte d'immobilisation *}}
|
{{* déterminer le compte d'amortissement en fonction du compte d'immobilisation *}}
|
||||||
|
|
@ -60,10 +55,8 @@
|
||||||
{{:assign var=libelle value="Amortissement %s"|args:$ligne_immo.trans_label}}
|
{{:assign var=libelle value="Amortissement %s"|args:$ligne_immo.trans_label}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{* amortissements suivants *}}
|
{{* amortissements suivants *}}
|
||||||
{{if $date_debut != $first_date}}
|
{{:assign date_debut=$date_debut|strtotime}}
|
||||||
{{:assign date_debut=$date_debut|strtotime}}
|
{{:assign date_debut="%d+(60*60*24)"|math:$date_debut|date:"Y-m-d"}}
|
||||||
{{:assign date_debut="%d+(60*60*24)"|math:$date_debut|date:"Y-m-d"}}
|
|
||||||
{{/if}}
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{*
|
{{*
|
||||||
|
|
@ -251,6 +244,9 @@
|
||||||
{{:input type="text" name="designation" label="Libellé" required=true default=$amort_label size="50"}}
|
{{:input type="text" name="designation" label="Libellé" required=true default=$amort_label size="50"}}
|
||||||
{{if $total_amort == 0 || $nbjours < 365 || $nbjours > 366}}
|
{{if $total_amort == 0 || $nbjours < 365 || $nbjours > 366}}
|
||||||
{{:assign msg="Montant calculé au prorata du nombre de jours d'amortissement dans l'exercice"}}
|
{{:assign msg="Montant calculé au prorata du nombre de jours d'amortissement dans l'exercice"}}
|
||||||
|
{{if $nbjours != null}}
|
||||||
|
{{:assign msg=$msg|cat:" (%s)"|args:$nbjours}}
|
||||||
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{:input type="money" name="montant" label="Montant" required=true default=$montant_amort help=$msg}}
|
{{:input type="money" name="montant" label="Montant" required=true default=$montant_amort help=$msg}}
|
||||||
{{:input
|
{{:input
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue