Compare commits
No commits in common. "9e620c3efb752ad6e754d2eabc0b46214cb668fc" and "8a4ecc50c2fd189abfd7911899a68d7c244f2d9e" have entirely different histories.
9e620c3efb
...
8a4ecc50c2
|
|
@ -1,34 +0,0 @@
|
||||||
{{* -*- brindille -*- *}}
|
|
||||||
|
|
||||||
{{*
|
|
||||||
Comparer deux numéros de version n1.n2[.n3]
|
|
||||||
@param nv1
|
|
||||||
@param nv2
|
|
||||||
@result comp : -1 si nv1 < nv2, 0 si nv1 = nv2, 1 si nv1 > nv2
|
|
||||||
*}}
|
|
||||||
|
|
||||||
{{:assign nv1=$nv1|cat:"."}}
|
|
||||||
{{:assign nv2=$nv2|cat:"."}}
|
|
||||||
{{:assign var="tv1" value=$nv1|explode:"."}}
|
|
||||||
{{:assign var="tv2" value=$nv2|explode:"."}}
|
|
||||||
|
|
||||||
{{:assign comp=0}}
|
|
||||||
{{:assign i=0}}
|
|
||||||
{{#foreach from=$tv1 item="e1"}}
|
|
||||||
{{:assign var="e2" from="tv2.%d"|args:$i}}
|
|
||||||
{{if $e1 < $e2}}
|
|
||||||
{{:assign comp=-1}}
|
|
||||||
{{:break}}
|
|
||||||
{{elseif $e1 > $e2}}
|
|
||||||
{{:assign comp=1}}
|
|
||||||
{{:break}}
|
|
||||||
{{/if}}
|
|
||||||
{{:assign i="%d+1"|math:$i}}
|
|
||||||
{{/foreach}}
|
|
||||||
{{*
|
|
||||||
cas où le premier tableau a moins d'éléments que le 2ème
|
|
||||||
et où les éléments présents dans les deux tableaux sont identiques
|
|
||||||
*}}
|
|
||||||
{{if $comp == 0 && $tv1|count < $tv2|count}}
|
|
||||||
{{:assign comp = -1}}
|
|
||||||
{{/if}}
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
{{*
|
{{*
|
||||||
lister les amortissement non rattachés à une immo
|
lister les amortissement non rattachés à une immo
|
||||||
@param condition
|
@param filter_condition
|
||||||
*}}
|
*}}
|
||||||
{{#select
|
{{#select
|
||||||
line.id as line_id,
|
line.id as line_id,
|
||||||
|
|
@ -18,9 +18,9 @@
|
||||||
FROM acc_transactions_lines AS line
|
FROM acc_transactions_lines AS line
|
||||||
INNER JOIN acc_accounts AS account ON account.id = line.id_account
|
INNER JOIN acc_accounts AS account ON account.id = line.id_account
|
||||||
INNER JOIN acc_transactions AS trans ON trans.id = line.id_transaction
|
INNER JOIN acc_transactions AS trans ON trans.id = line.id_transaction
|
||||||
WHERE credit > 0 AND (NOT trans.status & 16) AND !condition
|
WHERE credit > 0 AND (NOT trans.status & 16) AND !filter_condition
|
||||||
ORDER BY trans.date, trans.label;
|
ORDER BY trans.date, trans.label;
|
||||||
!condition=$condition
|
!filter_condition=$filter_condition
|
||||||
assign="amort_line"
|
assign="amort_line"
|
||||||
}}
|
}}
|
||||||
{{* voir s'il existe des lignes d'immo liées à cette ligne d'amortissement *}}
|
{{* voir s'il existe des lignes d'immo liées à cette ligne d'amortissement *}}
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@
|
||||||
{{:assign montant_immo=$doc_amount|or:$debit}}
|
{{:assign montant_immo=$doc_amount|or:$debit}}
|
||||||
{{:assign immo_date = $doc_date_achat|or:$trans_date}}
|
{{:assign immo_date = $doc_date_achat|or:$trans_date}}
|
||||||
{{:assign label_immo=$doc_label|or:$trans_label}}
|
{{:assign label_immo=$doc_label|or:$trans_label}}
|
||||||
{{if $label_immo|strpos:$line_label === false}}
|
{{if $line_label != null && $line_label != $label_immo}}
|
||||||
{{:assign label_immo=$label_immo|cat:" — "|cat:$line_label}}
|
{{:assign label_immo=$label_immo|cat:" — "|cat:$line_label}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -149,8 +149,6 @@
|
||||||
{{#foreach from=$module.config.filters item="filter"}}
|
{{#foreach from=$module.config.filters item="filter"}}
|
||||||
{{if $trans_label|strpos:$filter !== false}}
|
{{if $trans_label|strpos:$filter !== false}}
|
||||||
{{:assign status="ignored"}}
|
{{:assign status="ignored"}}
|
||||||
{{else}}
|
|
||||||
{{:assign status=""}}
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@
|
||||||
<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</a></li>
|
||||||
<li {{if $current == "other"}}class="current"{{/if}}><a href="index.html?type_immo=other">À classer</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 == "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>
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
{{if $subcurrent != null}}
|
{{if $subcurrent != null}}
|
||||||
|
|
|
||||||
|
|
@ -1,99 +0,0 @@
|
||||||
{{* -*- brindille -*- *}}
|
|
||||||
|
|
||||||
{{*
|
|
||||||
Mettre à niveau vers v0.31
|
|
||||||
- créer un doc de liaison pour chaque amortissement lié à une immobilisation
|
|
||||||
mais uniquement pour les immo déjà gérées, sinon l'upgrade
|
|
||||||
vers 0.33 ne fonctionnera pas car on pourrait se retrouver avec
|
|
||||||
des liaisons immo <-> amort sans doc associé à l'immo donc la
|
|
||||||
transformation de link vers amort_link ne pourra se faire
|
|
||||||
|
|
||||||
- id ligne d'immobilisation
|
|
||||||
- id ligne d'amortissement
|
|
||||||
- id écriture d'amortissement
|
|
||||||
*}}
|
|
||||||
|
|
||||||
{{* lister les immobilisations *}}
|
|
||||||
{{:include file="_get_config.html" keep="module.config"}}
|
|
||||||
|
|
||||||
{{: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)"}}
|
|
||||||
|
|
||||||
{{:assign filter_condition=" AND 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)"}}
|
|
||||||
|
|
||||||
{{:assign condition=$account_condition|cat:" AND debit > 0 AND NOT (trans.status & 16)"|cat:$filter_condition}}
|
|
||||||
|
|
||||||
{{#select
|
|
||||||
line.id as immo_line_id
|
|
||||||
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|intval}}
|
|
||||||
{{:assign status=$status}}
|
|
||||||
{{else}}
|
|
||||||
{{:assign status="unknown"}}
|
|
||||||
{{/load}}
|
|
||||||
|
|
||||||
{{* ne pas faire la liaison si pas de doc *}}
|
|
||||||
{{if $status == "ignored" || $status == "unknown"}}
|
|
||||||
{{:continue}}
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
{{* lister les écritures d'amortissement liées *}}
|
|
||||||
{{:assign amort_lines=null}}
|
|
||||||
{{#select
|
|
||||||
CASE links.id_related = t_immo.id
|
|
||||||
WHEN true THEN links.id_transaction
|
|
||||||
WHEN false THEN links.id_related
|
|
||||||
END as amort_trans_id,
|
|
||||||
l_amort.id AS amort_line_id
|
|
||||||
FROM acc_transactions_lines as l_immo
|
|
||||||
INNER JOIN acc_transactions as t_immo on t_immo.id = l_immo.id_transaction
|
|
||||||
INNER JOIN acc_transactions_links as links
|
|
||||||
ON (t_immo.id = links.id_transaction OR t_immo.id = links.id_related)
|
|
||||||
INNER JOIN acc_transactions_lines as l_amort on amort_trans_id = l_amort.id_transaction
|
|
||||||
INNER JOIN acc_accounts AS account ON l_amort.id_account = account.id
|
|
||||||
WHERE l_immo.id = :line_id AND l_amort.credit <> 0 AND account.code LIKE '28%';
|
|
||||||
:line_id = $immo_line_id|intval
|
|
||||||
assign="amort_lines."
|
|
||||||
}}
|
|
||||||
{{/select}}
|
|
||||||
|
|
||||||
{{#foreach from=$amort_lines item="line"}}
|
|
||||||
{{* chercher un doc associé *}}
|
|
||||||
{{#load type="link"
|
|
||||||
where="$$.immo_line_id = :immo_line_id
|
|
||||||
AND $$.amort_line_id = :amort_line_id
|
|
||||||
AND $$.amort_trans_id = :amort_trans_id"
|
|
||||||
:immo_line_id = $immo_line_id
|
|
||||||
:amort_line_id = $line.amort_line_id
|
|
||||||
:amort_trans_id = $line.amort_trans_id
|
|
||||||
assign="link"
|
|
||||||
}}
|
|
||||||
{{else}}
|
|
||||||
{{* pas de doc => le créer *}}
|
|
||||||
{{:save
|
|
||||||
key=""|uuid
|
|
||||||
type="link"
|
|
||||||
immo_line_id=$immo_line_id
|
|
||||||
amort_line_id=$line.amort_line_id
|
|
||||||
amort_trans_id=$line.amort_trans_id
|
|
||||||
}}
|
|
||||||
{{/load}}
|
|
||||||
{{/foreach}}
|
|
||||||
{{/select}}
|
|
||||||
|
|
@ -1,64 +0,0 @@
|
||||||
{{* -*- brindille -*- *}}
|
|
||||||
|
|
||||||
{{*
|
|
||||||
Mettre à niveau vers v0.33, pour gérer les écritures du bilan d'ouverture
|
|
||||||
où le montant d'une ligne d'immo ou d'une ligne d'amort peut être
|
|
||||||
réparti entre plusieurs immo et plusieurs amort
|
|
||||||
|
|
||||||
- modifier le doc d'immo
|
|
||||||
- date => date_mes (date mise en service)
|
|
||||||
|
|
||||||
- modifier le doc de liaison d'amortissement
|
|
||||||
- id ligne d'immobilisation => id doc immobilisation
|
|
||||||
- id ligne d'amortissement
|
|
||||||
- id écriture d'amortissement
|
|
||||||
- ajouter montant amortissement
|
|
||||||
*}}
|
|
||||||
|
|
||||||
{{* doc immo *}}
|
|
||||||
{{#load type="immo" assign="elem"}}
|
|
||||||
{{if $elem.date != null}}
|
|
||||||
{{:assign var="elem.date_mes" value=$elem.date}}
|
|
||||||
{{:assign var="docs." value=$elem}}
|
|
||||||
{{:delete id=$elem.id}}
|
|
||||||
{{/if}}
|
|
||||||
{{/load}}
|
|
||||||
|
|
||||||
{{* créer les nouveaux documents *}}
|
|
||||||
{{#foreach from=$docs item="doc"}}
|
|
||||||
{{:save
|
|
||||||
key=""|uuid
|
|
||||||
type=$doc.type
|
|
||||||
line=$doc.line
|
|
||||||
duration=$doc.duration
|
|
||||||
label=$doc.label
|
|
||||||
amount=$doc.amount
|
|
||||||
date_achat=$doc.date_achat
|
|
||||||
date_mes=$doc.date_mes
|
|
||||||
status=$doc.status
|
|
||||||
}}
|
|
||||||
{{/foreach}}
|
|
||||||
|
|
||||||
{{* lister les liaisons actuelles ligne amort => ligne immo *}}
|
|
||||||
{{#load type="link" assign="link"}}
|
|
||||||
{{#load type="immo" where="$$.line = :immo_line_id" :immo_line_id=$link.immo_line_id assign="immo"}}
|
|
||||||
{{:assign link_doc=null}}
|
|
||||||
{{:assign var="link_doc.immo_doc_id" value=$immo.id}}
|
|
||||||
{{:assign var="link_doc.amort_line_id" value=$link.amort_line_id}}
|
|
||||||
{{:assign var="link_docs." value=$link_doc}}
|
|
||||||
{{else}}
|
|
||||||
{{* liaison orpheline : ignorer *}}
|
|
||||||
{{/load}}
|
|
||||||
{{:delete id=$link.id}}
|
|
||||||
{{/load}}
|
|
||||||
|
|
||||||
{{* créer les nouvelles liaisons *}}
|
|
||||||
{{#foreach from=$link_docs item="link"}}
|
|
||||||
{{:save
|
|
||||||
key=""|uuid
|
|
||||||
type="amort_link"
|
|
||||||
immo_doc_id=$link.immo_doc_id
|
|
||||||
amort_line_id=$link.amort_line_id
|
|
||||||
amount=null
|
|
||||||
}}
|
|
||||||
{{/foreach}}
|
|
||||||
|
|
@ -161,7 +161,7 @@
|
||||||
{{:admin_header title="Ajout immobilisation" current="module_amortization"}}
|
{{:admin_header title="Ajout immobilisation" current="module_amortization"}}
|
||||||
{{* barre de navigation *}}
|
{{* barre de navigation *}}
|
||||||
{{if ! $dialog}}
|
{{if ! $dialog}}
|
||||||
{{:linkbutton href="index.html" label="Retour" shape="left"}}
|
{{:include file="_nav.html" current="managed" subcurrent="add_asset"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{:form_errors}}
|
{{:form_errors}}
|
||||||
|
|
@ -224,7 +224,7 @@
|
||||||
<dl>
|
<dl>
|
||||||
<div id="div_amort">
|
<div id="div_amort">
|
||||||
{{:input type="number" name="duree" label="Durée d'amortissement" required=true min=0 default=1 suffix="année(s)"}}
|
{{:input type="number" name="duree" label="Durée d'amortissement" required=true min=0 default=1 suffix="année(s)"}}
|
||||||
{{:input type="date" name="date_mes" label="Date de mise en service" default=$now|date_short help="C'est la date de première utilisation ; à modifier si différente de la date d'acquisition"}}
|
{{:input type="date" name="date_mes" label="Date de mise en service" help="C'est la date de première utilisation ; à renseigner uniquement si différente de la date d'acquisition"}}
|
||||||
</div>
|
</div>
|
||||||
</dl>
|
</dl>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
@ -245,8 +245,5 @@ function changeYear(evt, f_accounts = ['credit_account', 'debit_account'], f_yea
|
||||||
|
|
||||||
(function () {
|
(function () {
|
||||||
document.getElementById('f_id_year').onchange = changeYear;
|
document.getElementById('f_id_year').onchange = changeYear;
|
||||||
document.getElementById('f_date_achat').addEventListener("change", (e) => {
|
|
||||||
document.getElementById('f_date_mes').value = document.getElementById('f_date_achat').value;
|
|
||||||
});
|
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -200,9 +200,9 @@
|
||||||
<legend>Classement</legend>
|
<legend>Classement</legend>
|
||||||
<dl id="classement_immo">
|
<dl id="classement_immo">
|
||||||
<dt><label>Faites un choix</label> <b>(obligatoire)</b></dt>
|
<dt><label>Faites un choix</label> <b>(obligatoire)</b></dt>
|
||||||
{{:input type="radio-btn" name="classify" value="managed" label="Immobilisation à amortir" default=$choix_defaut}}
|
{{:input type="radio-btn" name="classify" value="managed" label="Immobilisation à amortir" help="L'immobilisation sera classée parmi les immobilisations amortissables" default=$choix_defaut}}
|
||||||
{{if $ligne_immo.date_achat > $first_date}}
|
{{if $ligne_immo.date_achat > $first_date}}
|
||||||
{{:input type="radio-btn" name="classify" value="archived" label="Immobilisation sortie du bilan" default=$choix_defaut}}
|
{{:input type="radio-btn" name="classify" value="archived" label="Immobilisation sortie du bilan" help="L'immobilisation sera classée parmi les immobilisations sorties du bilan" default=$choix_defaut}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{:input type="radio-btn" name="classify" value="ignored" label="Immobilisation à ignorer" help="L'écriture n'apparaitra plus dans la liste des immobilisations" default=$choix_defaut}}
|
{{:input type="radio-btn" name="classify" value="ignored" label="Immobilisation à ignorer" help="L'écriture n'apparaitra plus dans la liste des immobilisations" default=$choix_defaut}}
|
||||||
</dl>
|
</dl>
|
||||||
|
|
@ -211,11 +211,11 @@
|
||||||
<fieldset class="masquable">
|
<fieldset class="masquable">
|
||||||
<legend>Informations</legend>
|
<legend>Informations</legend>
|
||||||
<dl>
|
<dl>
|
||||||
{{:input type="date" name="date_achat" label="Date d'acquisition" default=$date_achat_defaut help="à modifier si nécessaire"}}
|
|
||||||
{{:input type="text" name="libelle" label="Libellé" default=$immo_label help="à modifier si nécessaire"}}
|
|
||||||
{{:input type="money" name="montant" label="Montant de l'immobilisation" required=true default=$reste help="à modifier si différent du montant de l'écriture d'immobilisation"}}
|
|
||||||
{{:input type="number" name="duree" label="Durée d'amortissement" required=true min=1 suffix="année(s)"}}
|
{{:input type="number" name="duree" label="Durée d'amortissement" required=true min=1 suffix="année(s)"}}
|
||||||
|
{{:input type="money" name="montant" label="Montant de l'immobilisation" required=true default=$reste help="à modifier si différent du montant de l'écriture d'immobilisation"}}
|
||||||
|
{{:input type="date" name="date_achat" label="Date d'acquisition" default=$date_achat_defaut help="à modifier si nécessaire"}}
|
||||||
{{:input type="date" name="date_mes" label="Date de mise en service" default=$date_mes_defaut help="à modifier si différente de la date d'acquisition"}}
|
{{:input type="date" name="date_mes" label="Date de mise en service" default=$date_mes_defaut help="à modifier si différente de la date d'acquisition"}}
|
||||||
|
{{:input type="text" name="libelle" label="Libellé" default=$immo_label help="à modifier si nécessaire"}}
|
||||||
</dl>
|
</dl>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
|
|
@ -236,6 +236,7 @@ function toggleInputs(event) {
|
||||||
const managed = classement_immo.querySelector('input[type=radio][value=managed]');
|
const managed = classement_immo.querySelector('input[type=radio][value=managed]');
|
||||||
if (managed.checked) {
|
if (managed.checked) {
|
||||||
g.toggle('.masquable', true);
|
g.toggle('.masquable', true);
|
||||||
|
document.getElementById('f_duree').focus();
|
||||||
} else {
|
} else {
|
||||||
g.toggle('.masquable', false);
|
g.toggle('.masquable', false);
|
||||||
}
|
}
|
||||||
|
|
@ -247,9 +248,6 @@ toggleInputs();
|
||||||
radios.forEach(radio => {
|
radios.forEach(radio => {
|
||||||
radio.addEventListener("change", toggleInputs);
|
radio.addEventListener("change", toggleInputs);
|
||||||
});
|
});
|
||||||
document.getElementById('f_date_achat').addEventListener("change", (e) => {
|
|
||||||
document.getElementById('f_date_mes').value = document.getElementById('f_date_achat').value;
|
|
||||||
});
|
|
||||||
})();
|
})();
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
12
aide.html
|
|
@ -1,12 +0,0 @@
|
||||||
{{* -*- brindille -*- *}}
|
|
||||||
|
|
||||||
{{:admin_header title="Aide" custom_css="./style_aide.css" current="module_amortization"}}
|
|
||||||
|
|
||||||
{{* barre de navigation *}}
|
|
||||||
{{:include file="_nav.html" current="aide"}}
|
|
||||||
|
|
||||||
<section class="page">
|
|
||||||
<article>
|
|
||||||
{{:include file="doc/aide.html"}}
|
|
||||||
</article>
|
|
||||||
</section>
|
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
{{:assign trans_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$ligne_immo.trans_id}}
|
{{:assign trans_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$ligne_immo.trans_id}}
|
||||||
{{:assign date_debut=$info_immo.date_mes|or:$info_immo.date_achat|or:$ligne_immo.date_achat}}
|
{{:assign date_debut=$info_immo.date_mes|or:$info_immo.date_achat|or:$ligne_immo.date_achat}}
|
||||||
{{:assign label_immo=$info_immo.label|or:$ligne_immo.trans_label}}
|
{{:assign label_immo=$info_immo.label|or:$ligne_immo.trans_label}}
|
||||||
{{if $label_immo|strpos:$ligne_immo.line_label === false}}
|
{{if $ligne_immo.line_label != null && $ligne_immo.line_label != $label_immo}}
|
||||||
{{:assign label_immo=$label_immo|cat:" — "|cat:$ligne_immo.line_label}}
|
{{:assign label_immo=$label_immo|cat:" — "|cat:$ligne_immo.line_label}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{if $info_immo.amount != null}}
|
{{if $info_immo.amount != null}}
|
||||||
|
|
@ -39,11 +39,7 @@
|
||||||
{{* lister les amortissements non attachés à une immo *}}
|
{{* lister les amortissements non attachés à une immo *}}
|
||||||
{{:assign account_filter="28%"|quote_sql}}
|
{{:assign account_filter="28%"|quote_sql}}
|
||||||
{{:assign filter_condition="account.code LIKE "|cat:$account_filter}}
|
{{:assign filter_condition="account.code LIKE "|cat:$account_filter}}
|
||||||
|
{{:include file="./_get_free_amort.html" filter_condition=$filter_condition keep="free_amort_lines"}}
|
||||||
{{:assign date_amort=$date_debut|quote_sql}}
|
|
||||||
{{:assign date_condition="trans.date >= "|cat:$date_amort}}
|
|
||||||
{{:assign condition=$date_condition|cat:" AND "|cat:$filter_condition}}
|
|
||||||
{{:include file="./_get_free_amort.html" condition=$condition keep="free_amort_lines"}}
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{:admin_header title="Détails de l'immobilisation" custom_css="./style.css" current="module_amortization"}}
|
{{:admin_header title="Détails de l'immobilisation" custom_css="./style.css" current="module_amortization"}}
|
||||||
|
|
@ -178,8 +174,8 @@
|
||||||
<td>{{$line.date|date_short}}</td>
|
<td>{{$line.date|date_short}}</td>
|
||||||
<td>{{$line.label}}</td>
|
<td>{{$line.label}}</td>
|
||||||
<td class="money">{{"%f"|math:$line.amount|money_currency_html:false|raw}}</td>
|
<td class="money">{{"%f"|math:$line.amount|money_currency_html:false|raw}}</td>
|
||||||
<td class="actions">
|
<td>
|
||||||
{{if ! $created_amort}}
|
{{if $total_amort == 0}}
|
||||||
{{:linkbutton label="Détacher" href="detach_credit.html?immo_doc_id=%s&credit_line_id=%s"|args:$_GET.immo_doc_id:$line.credit_line_id shape="minus"}}
|
{{:linkbutton label="Détacher" href="detach_credit.html?immo_doc_id=%s&credit_line_id=%s"|args:$_GET.immo_doc_id:$line.credit_line_id shape="minus"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -243,7 +239,7 @@
|
||||||
<td class="money">{{"%f"|math:$solde|money_html:false|raw}}</td>
|
<td class="money">{{"%f"|math:$solde|money_html:false|raw}}</td>
|
||||||
<td><a href="{{$compte_url}}">{{$line.account_code}}</a></td>
|
<td><a href="{{$compte_url}}">{{$line.account_code}}</a></td>
|
||||||
<td>{{$line.account_label}}</td>
|
<td>{{$line.account_label}}</td>
|
||||||
<td class="actions">
|
<td>
|
||||||
{{if ! $created_amort}}
|
{{if ! $created_amort}}
|
||||||
{{:linkbutton label="Détacher" href="detach_amort.html?immo_doc_id=%s&amort_line_id=%s"|args:$_GET.immo_doc_id:$line.line_id shape="minus"}}
|
{{:linkbutton label="Détacher" href="detach_amort.html?immo_doc_id=%s&amort_line_id=%s"|args:$_GET.immo_doc_id:$line.line_id shape="minus"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{:assign label_immo=$info_immo.label|or:$ligne_immo.trans_label}}
|
{{:assign label_immo=$info_immo.label|or:$ligne_immo.trans_label}}
|
||||||
{{if $label_immo|strpos:$ligne_immo.line_label === false}}
|
{{if $ligne_immo.line_label != null && $ligne_immo.line_label != $label_immo}}
|
||||||
{{:assign label_immo=$label_immo|cat:" — "|cat:$ligne_immo.line_label}}
|
{{:assign label_immo=$label_immo|cat:" — "|cat:$ligne_immo.line_label}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{:assign montant_immo=$info_immo.amount|or:$ligne_immo.amount}}
|
{{:assign montant_immo=$info_immo.amount|or:$ligne_immo.amount}}
|
||||||
|
|
|
||||||
|
|
@ -14,22 +14,13 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{:assign label_immo=$info_immo.label|or:$ligne_immo.trans_label}}
|
{{:assign label_immo=$info_immo.label|or:$ligne_immo.trans_label}}
|
||||||
{{if $label_immo|strpos:$ligne_immo.line_label === false }}
|
{{if $ligne_immo.line_label != null && $ligne_immo.line_label != $label_immo}}
|
||||||
{{:assign label_immo=$label_immo|cat:" — "|cat:$ligne_immo.line_label}}
|
{{:assign label_immo=$label_immo|cat:" — "|cat:$ligne_immo.line_label}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{if $info_immo.amount != null}}
|
|
||||||
{{:assign var="ligne_immo.amount" value=$info_immo.amount}}
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
{{* déduire le montant des écritures liées à l'immo courante au crédit du même compte *}}
|
{{* déduire le montant des écritures liées à l'immo courante au crédit du même compte *}}
|
||||||
{{:include file="_get_credit_lines.html" immo_doc_id=$_GET.immo_doc_id keep="total_credits"}}
|
{{:include file="_get_credit_lines.html" immo_doc_id=$_GET.immo_doc_id keep="total_credits"}}
|
||||||
{{:assign valeur_residuelle="%d-%d"|math:$ligne_immo.amount:$total_credits}}
|
{{:assign solde_immo="%d-%d"|math:$ligne_immo.amount:$total_credits}}
|
||||||
|
|
||||||
{{* lister les amortissements liés à l'immobilisation *}}
|
|
||||||
{{:include file="./_get_amort_lines.html" immo_doc_id=$_GET.immo_doc_id keep="linked_amort, total_amort, created_amort"}}
|
|
||||||
{{:assign valeur_residuelle="%d-%d"|math:$valeur_residuelle:$total_amort}}
|
|
||||||
|
|
||||||
|
|
||||||
{{* chercher l'écriture au crédit du compte d'immobilisation *}}
|
{{* chercher l'écriture au crédit du compte d'immobilisation *}}
|
||||||
{{#select
|
{{#select
|
||||||
|
|
@ -71,14 +62,11 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{:assign montant_credit=$_POST.montant|money_int}}
|
{{:assign montant_credit=$_POST.montant|money_int}}
|
||||||
|
{{* vérifier que le montant saisi est inférieur au solde de l'écriture d'immobilisation *}}
|
||||||
|
{{if $montant_credit > $solde_immo}}
|
||||||
|
{{:assign solde_nb="%f"|math:$solde_immo|money_currency:false}}
|
||||||
|
{{:error message="Le montant de l'avoir ne peut être supérieur au montant de l'immobilisation (%s)"|args:$solde_nb}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{* vérifier que le montant saisi est inférieur à la valeur nette de l'écriture d'immobilisation *}}
|
|
||||||
{{if $montant_credit > $valeur_residuelle}}
|
|
||||||
{{:assign solde_nb="%f"|math:$valeur_residuelle|money_currency:false}}
|
|
||||||
{{:error message="Le montant de l'avoir ne peut être supérieur à la valeur nette de l'immobilisation (%s)"|args:$solde_nb}}
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
{{* vérifier que le montant saisi est inférieur au reste de l'écriture de crédit *}}
|
{{* vérifier que le montant saisi est inférieur au reste de l'écriture de crédit *}}
|
||||||
{{if $montant_credit > $reste}}
|
{{if $montant_credit > $reste}}
|
||||||
{{:assign reste_nb="%f"|math:$reste|money_currency:false}}
|
{{:assign reste_nb="%f"|math:$reste|money_currency:false}}
|
||||||
|
|
@ -89,28 +77,38 @@
|
||||||
{{else}}
|
{{else}}
|
||||||
{{:assign saved_credit=$montant_credit}}
|
{{:assign saved_credit=$montant_credit}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
{{* Lier l'écriture de crédit à l'écriture d'immobilisation *}}
|
{{* Lier l'écriture de crédit à l'écriture d'immobilisation *}}
|
||||||
{{:include file="_common_attach.html" immo_doc_id=$_GET.immo_doc_id trans_id=$credit_line.trans_id}}
|
{{:include file="_common_attach.html" immo_doc_id=$_GET.immo_doc_id trans_id=$credit_line.trans_id}}
|
||||||
|
|
||||||
{{*
|
{{*
|
||||||
TODO ? vérifier le succès avant d'enregistrer le doc ?
|
TODO ? vérifier le succès avant d'enregistrer le doc ?
|
||||||
*}}
|
*}}
|
||||||
|
|
||||||
{{* enregistrer la liaison des lignes d'immo *}}
|
{{* enregistrer la liaison des lignes d'immo *}}
|
||||||
{{:save
|
{{:save
|
||||||
key=""|uuid
|
key=""|uuid
|
||||||
type="credit_link"
|
type="credit_link"
|
||||||
immo_doc_id=$_GET.immo_doc_id|intval
|
immo_doc_id=$_GET.immo_doc_id|intval
|
||||||
credit_line_id=$_GET.credit_line_id|intval
|
credit_line_id=$_GET.credit_line_id|intval
|
||||||
amount=$saved_credit
|
amount=$saved_credit
|
||||||
}}
|
}}
|
||||||
|
|
||||||
{{if $_GET.from == "exit"}}
|
{{*
|
||||||
|
{{if $montant_credit == $solde_immo}}
|
||||||
|
{{:save
|
||||||
|
id=$_GET.immo_doc_id
|
||||||
|
status="archived"
|
||||||
|
}}
|
||||||
|
{{/if}}
|
||||||
|
*}}
|
||||||
|
|
||||||
|
{{if $_GET.from == "exit"}}
|
||||||
{{:redirect force="exit_step1.html?immo_doc_id=%s&ok=1&msg=attach_avoir"|args:$_GET.immo_doc_id}}
|
{{:redirect force="exit_step1.html?immo_doc_id=%s&ok=1&msg=attach_avoir"|args:$_GET.immo_doc_id}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{:redirect force="amortization.html?immo_doc_id=%s&ok=1&msg=attach_avoir"|args:$_GET.immo_doc_id}}
|
{{:redirect force="amortization.html?immo_doc_id=%s&ok=1&msg=attach_avoir"|args:$_GET.immo_doc_id}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/form}}
|
{{/form}}
|
||||||
|
|
||||||
{{:admin_header title="Écritures au crédit du compte d'immobilisation" custom_css="./style.css" current="module_amortization"}}
|
{{:admin_header title="Écritures au crédit du compte d'immobilisation" custom_css="./style.css" current="module_amortization"}}
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
*}}
|
*}}
|
||||||
|
|
||||||
{{:assign label_immo=$info_immo.label|or:$ligne_immo.trans_label}}
|
{{:assign label_immo=$info_immo.label|or:$ligne_immo.trans_label}}
|
||||||
{{if $label_immo|strpos:$ligne_immo.line_label === false}}
|
{{if $ligne_immo.line_label != null && $ligne_immo.line_label != $label_immo}}
|
||||||
{{:assign label_immo=$label_immo|cat:" — "|cat:$ligne_immo.line_label}}
|
{{:assign label_immo=$label_immo|cat:" — "|cat:$ligne_immo.line_label}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{:assign label_immo=$info_immo.label|or:$ligne_immo.trans_label}}
|
{{:assign label_immo=$info_immo.label|or:$ligne_immo.trans_label}}
|
||||||
{{if $label_immo|strpos:$ligne_immo.line_label === false}}
|
{{if $ligne_immo.line_label != null && $ligne_immo.line_label != $label_immo}}
|
||||||
{{:assign label_immo=$label_immo|cat:" — "|cat:$ligne_immo.line_label}}
|
{{:assign label_immo=$label_immo|cat:" — "|cat:$ligne_immo.line_label}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -129,7 +129,6 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<form method="post" action="">
|
<form method="post" action="">
|
||||||
|
|
||||||
<h3>Comptes d'immobilisation amortissables</h3>
|
<h3>Comptes d'immobilisation amortissables</h3>
|
||||||
<p class="help">
|
<p class="help">
|
||||||
Les immobilisations amortissables sont cherchées dans les comptes sélectionnés et leurs sous-comptes.
|
Les immobilisations amortissables sont cherchées dans les comptes sélectionnés et leurs sous-comptes.
|
||||||
|
|
@ -139,7 +138,7 @@
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Compte</th>
|
<th>Compte</th>
|
||||||
<th class="actions"></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
@ -185,7 +184,7 @@
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Compte</th>
|
<th>Compte</th>
|
||||||
<th class="actions"></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
|
||||||
472
doc/aide.html
|
|
@ -1,472 +0,0 @@
|
||||||
<header>
|
|
||||||
<h1 id="module-immobilisations-et-amortissements-pour-paheko">Module
|
|
||||||
immobilisations et amortissements pour Paheko</h1>
|
|
||||||
</header>
|
|
||||||
<h2 id="préambule">Préambule</h2>
|
|
||||||
<p>Ce module permet de :</p>
|
|
||||||
<ul>
|
|
||||||
<li><a href="#créer-nouvelle_immobilisation">créer des
|
|
||||||
immobilisations</a></li>
|
|
||||||
<li><a href="#enregistrer-nouvel-amortissement">enregistrer</a> les
|
|
||||||
écritures d’amortissement en fin d’exercice, calculés selon la méthode
|
|
||||||
linéaire.</li>
|
|
||||||
<li><a href="#sortir-immobilisation-bilan">sortir les immobilisations du
|
|
||||||
bilan</a> à la fin de leur période d’utilisation.</li>
|
|
||||||
</ul>
|
|
||||||
<p>Il permet aussi de <a
|
|
||||||
href="#transformer-immobilisations-en-cours">transformer des
|
|
||||||
immobilisations</a> en cours de constitution en immobilisations
|
|
||||||
amortissables.</p>
|
|
||||||
<p>Les <a href="#immo-créées-hors-module">immobilisations créées avant
|
|
||||||
la mise en service du module</a> sont détectées par le module mais il
|
|
||||||
faut renseigner leurs paramètres (au minimum, la durée d’amortissement)
|
|
||||||
pour que le module puisse les gérer.</p>
|
|
||||||
<p>Les amortissements créés avant la mise en service du module sont
|
|
||||||
détectées par le module mais il faut les <a
|
|
||||||
href="#attacher-amortissement">attacher manuellement</a> aux
|
|
||||||
immobilisations correspondantes.</p>
|
|
||||||
<h2 id="créer-nouvelle_immobilisation">Créer une nouvelle
|
|
||||||
immobilisation</h2>
|
|
||||||
<p>Cliquer le bouton <em>Ajouter une immobilisation</em> qui est présent
|
|
||||||
sur plusieurs onglets ; dans la fenêtre de saisie qui s’affiche il
|
|
||||||
suffit de saisir les données de l’immobilisation puis de cliquer
|
|
||||||
<em>Ajouter</em> :</p>
|
|
||||||
<ul>
|
|
||||||
<li>Exercice : sélectionner l’exercice dans lequel enregistrer
|
|
||||||
l’écriture</li>
|
|
||||||
<li>Date d’acquisition : doit être située dans l’exercice
|
|
||||||
sélectionné</li>
|
|
||||||
<li>Libellé</li>
|
|
||||||
<li>Montant</li>
|
|
||||||
<li>Compte de décaissement : compte bancaire, de caisse ou fournisseurs
|
|
||||||
d’immobilisations (404) dans le cas où l’immobilisation est réglée
|
|
||||||
ultérieurement</li>
|
|
||||||
<li>Compte d’immobilisation</li>
|
|
||||||
<li>Projet</li>
|
|
||||||
<li>Durée d’amortissement en années</li>
|
|
||||||
<li><em>Date de mise en service</em> : c’est cette date qui est prise en
|
|
||||||
compte dans le calcul des amortissements. Il s’agit de la date à partir
|
|
||||||
de laquelle l’immobilisation peut commencer à être utilisée ; à modifier
|
|
||||||
uniquement si différente de la date d’acquisition.</li>
|
|
||||||
</ul>
|
|
||||||
<p>Après création, l’immobilisation est classée dans l’onglet
|
|
||||||
<em>Amortissables</em>.</p>
|
|
||||||
<h3 id="ristourne-avoir">Ristourne sur immobilisation</h3>
|
|
||||||
<p>Lorsqu’on acquiert une immobilisation, il se peut que par la suite on
|
|
||||||
obtienne une ristourne sous forme d’avoir ; cet avoir est enregistré
|
|
||||||
dans Paheko par une écriture dont le montant est au crédit du compte
|
|
||||||
d’immobilisation ; il est important d’attacher cette écriture d’avoir à
|
|
||||||
l’écriture d’immobilisation. En effet, le montant amortissable est égal
|
|
||||||
au montant d’acquisition de l’immobilisation moins la somme des
|
|
||||||
avoirs.</p>
|
|
||||||
<p>Tant qu’on n’a pas créé d’amortissement pour une immobilisation, il
|
|
||||||
est possible d’attacher une écriture d’avoir à l’écriture
|
|
||||||
d’immobilisation.</p>
|
|
||||||
<p>Pour cela, cliquer le bouton <em>Détails</em> en face de
|
|
||||||
l’immobilisation concernée puis <em>Attacher une écriture d’avoir</em> ;
|
|
||||||
s’il existe des écritures au crédit du compte de l’immobilisation, on
|
|
||||||
pourra en sélectionner une pour l’associer à l’écriture
|
|
||||||
d’immobilisation ; son montant sera ensuite déduit du montant de
|
|
||||||
l’immobilisaiton pour calculer le montant des amortissements.</p>
|
|
||||||
<p>Si l’avoir a été reçu après la création du premier amortissement, il
|
|
||||||
suffit de supprimer l’écriture d’amortissement et de procéder comme
|
|
||||||
ci-dessus pour attacher l’avoir ; il faudra ensuite recréer
|
|
||||||
l’amortissement.</p>
|
|
||||||
<h2 id="enregistrer-nouvel-amortissement">Enregistrer un nouvel
|
|
||||||
amortissement</h2>
|
|
||||||
<p>Une écriture d’amortissement se fait à la date de clôture de
|
|
||||||
l’exercice. Les amortissements sont calculés selon la méthode linéaire :
|
|
||||||
montant à amortir divisé par durée d’amortissement en années.</p>
|
|
||||||
<p>À partir de l’onglet <em>Amortissables</em>, cliquer le bouton
|
|
||||||
<em>Détails</em> en face de l’immobilisation choisie.<br />
|
|
||||||
Avant d’enregistrer un nouvel amortissement, il peut être utile de
|
|
||||||
vérifier avec le bouton <em>Attacher un amortissement</em> s’il existe
|
|
||||||
des écritures d’amortissement qui n’ont pas encore été attachées à
|
|
||||||
l’immobilisation (cas des immobilisations et amortissements créés en
|
|
||||||
dehors du module) ; voir ci-dessous la rubrique <a
|
|
||||||
href="#attacher-amortissement">Attacher un amortissement à une
|
|
||||||
immobilisation</a>.</p>
|
|
||||||
<p>Cliquer le bouton <em>Enregistrer un amortissement</em> ; dans la
|
|
||||||
fenêtre de saisie, les informations sont calculées et pré-remplies par
|
|
||||||
le modules ; en général, il n’est pas nécessaire de les modifier :</p>
|
|
||||||
<ul>
|
|
||||||
<li>Exercice : c’est l’exercice dans lequel enregistrer l’écriture</li>
|
|
||||||
<li>Date de l’écriture : doit être située dans l’exercice
|
|
||||||
sélectionné</li>
|
|
||||||
<li>Libellé</li>
|
|
||||||
<li>Montant : calculé par le module ; il peut être modifié si
|
|
||||||
nécessaire, par exemple pour l’arrondir</li>
|
|
||||||
<li>Compte de débit : par défaut c’est le compte <em>6811 : Dotation aux
|
|
||||||
amortissements des immobilisations</em></li>
|
|
||||||
<li>Compte d’amortissement : par défaut c’est le compte qui correspond
|
|
||||||
au compte de l’immobilisation, obtenu en intercalant le chiffre 8 après
|
|
||||||
le premier chiffre du compte d’immobilisation.</li>
|
|
||||||
</ul>
|
|
||||||
<p>Après enregistrement, le nouvel amortissement apparaît dans la liste
|
|
||||||
des amortissements de l’immobilisation.</p>
|
|
||||||
<p>Lorsqu’une immobilisation est totalement amortie, elle est classée
|
|
||||||
dans l’onglet <em>Amorties</em>.</p>
|
|
||||||
<h2 id="immo-créées-hors-module">Incorporer une écriture
|
|
||||||
d’immobilisation créée hors du module</h2>
|
|
||||||
<p>Les immobilisations créées <em>avant</em> la mise en service du
|
|
||||||
module sont regroupées dans l’onglet <em>À classer</em>. On distingue
|
|
||||||
deux cas :</p>
|
|
||||||
<ul>
|
|
||||||
<li>immobilisation créée <a href="#immo-créée-dans-paheko">dans
|
|
||||||
Paheko</a></li>
|
|
||||||
<li>immobilisation créée dans une <a
|
|
||||||
href="#immo-créée-hors-paheko">comptabilité antérieure à Paheko</a></li>
|
|
||||||
</ul>
|
|
||||||
<h3 id="immo-créée-dans-paheko">Immobilisations créées dans Paheko</h3>
|
|
||||||
<p>Cliquer le bouton <em>Paramètres</em> en face de l’immobilisation à
|
|
||||||
prendre en charge et choisir comment sera considérée
|
|
||||||
l’immobilisation :</p>
|
|
||||||
<ul>
|
|
||||||
<li><a href="#immo-à-amortir">Immobilisation à amortir</a></li>
|
|
||||||
<li><a href="#immo-sortie-bilan">Immobilisation sortie du bilan</a></li>
|
|
||||||
<li>Immobilisation à ignorer</li>
|
|
||||||
</ul>
|
|
||||||
<h4 id="immo-à-amortir">Immobilisation à amortir</h4>
|
|
||||||
<p>Le seul paramètre obligatoire est la durée d’amortissement en
|
|
||||||
années ; les autres paramètres sont pré-remplis à partir de l’écriture
|
|
||||||
d’immobilisation ; dans la majorité des cas, il n’est pas nécessaire de
|
|
||||||
les modifier.</p>
|
|
||||||
<ul>
|
|
||||||
<li>Date d’acquisition : (facultatif) à renseigner uniquement si elle
|
|
||||||
diffère de la date de l’écriture d’immobilisation</li>
|
|
||||||
<li>Libellé : (facultatif) à renseigner uniquement s’il diffère du
|
|
||||||
libellé de l’écriture d’immobilisation</li>
|
|
||||||
<li>Montant de l’immobilisation : (obligatoire) pré-rempli avec le
|
|
||||||
montant de l’écriture d’immobilisation</li>
|
|
||||||
<li>Durée d’amortissement : (obligatoire) durée en années</li>
|
|
||||||
<li>Date de mise en service : (facultatif) voir <a
|
|
||||||
href="#créer-nouvelle_immobilisation">Créer une nouvelle
|
|
||||||
immobilisation</a>.</li>
|
|
||||||
</ul>
|
|
||||||
<p>Après enregistrement, l’immobilisation est classée dans l’onglet
|
|
||||||
<em>Amortissables</em> ; on peut vérifier et éventuellement modifier ses
|
|
||||||
paramètres grâce au bouton <em>Détails</em></p>
|
|
||||||
<p>Si des amortissements ont été enregistrés pour cette immobilisation
|
|
||||||
avant la mise en service du module, on pourra les attacher à
|
|
||||||
l’immobilisation : voir ci-dessous la rubrique <a
|
|
||||||
href="#attacher-amortissement">Attacher un amortissement à une
|
|
||||||
immobilisation</a></p>
|
|
||||||
<h4 id="immo-sortie-bilan">Immobilisation sortie du bilan</h4>
|
|
||||||
<p>Pour une immobilisation créée et sortie du bilan avant la mise en
|
|
||||||
service du module, un certain nombre d’écritures sont enregistrées dans
|
|
||||||
Paheko :</p>
|
|
||||||
<ul>
|
|
||||||
<li>écritures d’avoir (éventuellement)</li>
|
|
||||||
<li>écritures d’amortissement :
|
|
||||||
<ul>
|
|
||||||
<li>amortissement annuel : 0, 1 ou plusieurs</li>
|
|
||||||
<li>amortissement complémentaire à la date de sortie du bilan</li>
|
|
||||||
<li>amortissement exceptionnel ou écriture de cession, selon le cas</li>
|
|
||||||
</ul></li>
|
|
||||||
<li>écriture de sortie du bilan</li>
|
|
||||||
</ul>
|
|
||||||
<p>Le module donne la possibilité de les attacher à l’immobilisation en
|
|
||||||
plusieurs étapes :</p>
|
|
||||||
<ol type="1">
|
|
||||||
<li>Attacher une ou plusieurs écritures d’avoir à l’immobilisation, le
|
|
||||||
cas échéant</li>
|
|
||||||
<li>Attacher une ou plusieurs écritures d’amortissement à
|
|
||||||
l’immobilisation</li>
|
|
||||||
<li>Attacher une écriture de cession à l’immobilisation, le cas
|
|
||||||
échéant</li>
|
|
||||||
<li>Attacher une écriture de sortie du bilan à l’immobilisation</li>
|
|
||||||
</ol>
|
|
||||||
<p>Une fois cette étape validée, l’immobilisation sera classée dans
|
|
||||||
l’onglet <em>Sorties du bilan</em>.</p>
|
|
||||||
<h3 id="immo-créée-hors-paheko">Immobilisations créées dans une
|
|
||||||
comptabilité antérieure à Paheko</h3>
|
|
||||||
<p>Les immobilisations et amortissements créés dans une comptabilité
|
|
||||||
antérieure à Paheko peuvent aussi être pris en charge par le module ;
|
|
||||||
ces immobilisations et amortissements figurent <em>dans le bilan du
|
|
||||||
dernier exercice de l’ancienne comptabilité</em> et doivent
|
|
||||||
<em>obligatoirement se retrouver dans la balance d’ouverture du premier
|
|
||||||
exercice créé dans Paheko</em> ; cette balance comporte, pour chaque
|
|
||||||
compte d’immobilisation, le <em>montant total</em> des immobilisations
|
|
||||||
de ce compte. Il va donc être nécessaire de répartir le montant d’un
|
|
||||||
compte entre les différentes immobilisations dont il est composé. Il en
|
|
||||||
est de même pour les amortissements.</p>
|
|
||||||
<p>Il faut donc obligatoirement disposer des informations ci-dessous
|
|
||||||
pour chaque immobilisation à incorporer :</p>
|
|
||||||
<ul>
|
|
||||||
<li>montant amortissable de l’immobilisation, c’est-à-dire la différence
|
|
||||||
entre le montant d’acquisition et le montant des éventuelles ristournes
|
|
||||||
sous forme d’écritures d’avoir au crédit du compte d’immobilisation</li>
|
|
||||||
<li>montant total des amortissements</li>
|
|
||||||
<li>durée d’amortissement</li>
|
|
||||||
<li>date d’acquisition de l’immobilisation<br />
|
|
||||||
ou</li>
|
|
||||||
<li>date de mise en service de l’immobilisation ; voir <a
|
|
||||||
href="#créer-nouvelle_immobilisation">Créer une nouvelle
|
|
||||||
immobilisation</a>.</li>
|
|
||||||
</ul>
|
|
||||||
<p><strong>Remarque :</strong> les immobilisations créées et <em>sorties
|
|
||||||
du bilan</em> dans une comptabilité antérieure à Paheko ne figurent plus
|
|
||||||
au bilan (!) et n’apparaissent donc pas dans la balance d’ouverture du
|
|
||||||
premier exercice créé dans Paheko ; on n’a donc pas à s’en
|
|
||||||
(pré)occuper.</p>
|
|
||||||
<h4 id="exemple">Exemple</h4>
|
|
||||||
<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>
|
|
||||||
<ul>
|
|
||||||
<li>la ligne du compte <strong>2181</strong> correspond à deux
|
|
||||||
immobilisations de valeurs respectives <strong>5 500€</strong> et
|
|
||||||
<strong>13 590,33€</strong> pour un total de
|
|
||||||
<strong>19 090,33€</strong></li>
|
|
||||||
<li>la ligne du compte <strong>2185</strong> correspond à trois
|
|
||||||
immobilisations de valeurs respectives <strong>16 500€</strong>,
|
|
||||||
<strong>8 685€</strong> et <strong>3 500€</strong> pour un total de
|
|
||||||
<strong>28 695€</strong></li>
|
|
||||||
<li>la ligne du compte <strong>28181</strong> correspond à la somme des
|
|
||||||
amortissements des deux immobilisations du compte
|
|
||||||
<strong>2181</strong></li>
|
|
||||||
<li>la ligne du compte <strong>28185</strong> correspond à la somme des
|
|
||||||
amortissements des trois immobilisations du compte
|
|
||||||
<strong>2185</strong></li>
|
|
||||||
</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>
|
|
||||||
<ul>
|
|
||||||
<li>la colonne <em>Date</em> donne la date de la balance
|
|
||||||
d’ouverture</li>
|
|
||||||
<li>la colonne <em>Montant</em> donne le total des immobilisations de
|
|
||||||
chaque compte</li>
|
|
||||||
<li>la colonne <em>Affecté</em> indique quel montant a déjà été attribué
|
|
||||||
à une ou plusieurs immobilisation(s)</li>
|
|
||||||
<li>la colonne <em>Reste</em> indique quel montant n’a pas encore été
|
|
||||||
attribué</li>
|
|
||||||
</ul>
|
|
||||||
<p>Pour saisir les paramètres de la première immobilisation du compte
|
|
||||||
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
|
|
||||||
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>
|
|
||||||
<ul>
|
|
||||||
<li>Date d’acquisition de l’immobilisation</li>
|
|
||||||
<li>Libellé de l’immobilisation</li>
|
|
||||||
<li>Montant de l’immobilisation : (obligatoire) <em>à modifier
|
|
||||||
obligatoirement</em> en indiquant le <em>montant réel de
|
|
||||||
l’immobilisation</em>.<br />
|
|
||||||
Si une immobilisation a fait l’objet d’un avoir, il faut déduire ce
|
|
||||||
montant de celui de l’immobilisation : le montant à indiquer est le
|
|
||||||
<em>montant à amortir</em>.</li>
|
|
||||||
<li>Durée d’amortissement : (obligatoire) durée en années</li>
|
|
||||||
<li>Date de mise en service : (facultatif) ; voir <a
|
|
||||||
href="#créer-nouvelle_immobilisation">Créer une nouvelle
|
|
||||||
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>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>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>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
|
|
||||||
attacher à leur immobilisation : voir ci-dessous la rubrique <a
|
|
||||||
href="#attacher-amortissement">Attacher un amortissement à une
|
|
||||||
immobilisation</a>.</p>
|
|
||||||
<h2 id="attacher-amortissement">Attacher un amortissement à une
|
|
||||||
immobilisation</h2>
|
|
||||||
<p>Si des écritures d’amortissement ont été saisies avec Paheko
|
|
||||||
<em>avant</em> la mise en service du module <em>Amortissements</em>, on
|
|
||||||
peut les attacher à leur immobilisation :</p>
|
|
||||||
<ul>
|
|
||||||
<li>cliquer le bouton <em>Détails</em> en face de l’immobilisation
|
|
||||||
concernée ; si la mention</li>
|
|
||||||
</ul>
|
|
||||||
<blockquote>
|
|
||||||
<p>« Il y a des écritures d’amortissement qui ne sont pas attachées à
|
|
||||||
une immobilisation ! Utilisez le bouton « Attacher un amortissement »
|
|
||||||
pour les afficher ; vous pourrez choisir d’en attacher certaines à cette
|
|
||||||
immobilisation. »</p>
|
|
||||||
</blockquote>
|
|
||||||
<p>est présente, c’est qu’il existe des écritures d’amortissement
|
|
||||||
saisies avec Paheko <em>avant</em> la mise en service du module.</p>
|
|
||||||
<h3 id="cas-des-amortissements-créés-avec-paheko">Cas des amortissements
|
|
||||||
créés avec Paheko</h3>
|
|
||||||
<ul>
|
|
||||||
<li>cliquer le bouton <em>Attacher un amortissement</em> pour en
|
|
||||||
afficher la liste</li>
|
|
||||||
<li>le cas échéant, cliquer <em>Attacher</em> en face de l’écriture à
|
|
||||||
attacher.</li>
|
|
||||||
</ul>
|
|
||||||
<p>Le montant affiché est celui de l’écriture d’amortissement ; il
|
|
||||||
suffit de valider.</p>
|
|
||||||
<h3 id="cas-des-amortissements-créés-hors-paheko">Cas des amortissements
|
|
||||||
créés hors Paheko</h3>
|
|
||||||
<p><em>Rappel</em> : ces amortissements sont présents dans la balance
|
|
||||||
d’ouverture du premier exercice créé dans Paheko ; cette balance inclut,
|
|
||||||
pour chaque compte d’amortissement, le <em>montant total des
|
|
||||||
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>
|
|
||||||
<ul>
|
|
||||||
<li>montant des amortissements du Saxophone : 1016,43€</li>
|
|
||||||
<li>montant des amortissements du Piano numérique : 4102,39€</li>
|
|
||||||
<li>montant des amortissements de la Batterie : 1939,24€</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>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>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>
|
|
||||||
<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 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>
|
|
||||||
<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
|
|
||||||
procéder comme <a href="#enregistrer-nouvel-amortissement">pour une
|
|
||||||
immobilisation standard</a>.</p>
|
|
||||||
<h2 id="sortir-immobilisation-bilan">Sortir une immobilisation du
|
|
||||||
bilan</h2>
|
|
||||||
<p>Tant qu’une immobilisation est utilisée dans l’association, elle
|
|
||||||
reste au bilan, même si elle est totalement amortie.</p>
|
|
||||||
<p>On doit la sortir du bilan quand elle n’est plus utilisée (vétusté,
|
|
||||||
hors service) ou quand elle est donnée ou vendue (dans ce cas, on parle
|
|
||||||
de cession).</p>
|
|
||||||
<p>Cliquer le bouton <em>Détails</em> en face de l’immobilisation à
|
|
||||||
sortir du bilan, puis cliquer <em>Sortir du bilan</em>.</p>
|
|
||||||
<ul>
|
|
||||||
<li>dans la première étape, il faut indiquer l’exercice et la date de
|
|
||||||
sortie du bilan</li>
|
|
||||||
<li>dans la deuxième étape, il faut indiquer si la sortie de bilan
|
|
||||||
s’accompagne d’une cession (vente) et dans ce cas, indiquer le montant
|
|
||||||
de la cession</li>
|
|
||||||
<li>la troisième étape indique l’ensemble des écritures avec :
|
|
||||||
<ul>
|
|
||||||
<li>un amortissement complémentaire pour l’exercice à la date de sortie
|
|
||||||
si l’immobilisation n’est pas déjà totalement amortie</li>
|
|
||||||
<li>un amortissement exceptionnel s’il n’y a pas de cession et si
|
|
||||||
l’immobilisation n’est pas déjà totalement amortie</li>
|
|
||||||
<li>une écriture de cession, le cas échéant ; cette écriture est une
|
|
||||||
créance qu’il faudra solder lors de l’enregistrement du règlement de la
|
|
||||||
cession</li>
|
|
||||||
<li>l’écriture de sortie du bilan</li>
|
|
||||||
</ul></li>
|
|
||||||
</ul>
|
|
||||||
<p>Après validation, l’immobilisation est classée dans l’onglet
|
|
||||||
<em>Sorties du bilan</em>.<br />
|
|
||||||
En cas de besoin, il est possible de parcourir les différentes étapes
|
|
||||||
pour vérifier les attachements et éventuellement en modifier certains en
|
|
||||||
cliquant le bouton <em>Modifier</em>.</p>
|
|
||||||
<h2 id="transformer-immobilisations-en-cours">Transformer des
|
|
||||||
« Immobilisations en cours » en « Immobilisation amortissable »</h2>
|
|
||||||
<p>L’onglet <em>En cours</em> regroupe des immobilisations en cours de
|
|
||||||
constitution (classe 23 et sous-comptes) ; ces immobilisations ne sont
|
|
||||||
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>Sur la page qui s’ouvre, saisir les données de la nouvelle
|
|
||||||
immobilisation :</p>
|
|
||||||
<ul>
|
|
||||||
<li>Exercice</li>
|
|
||||||
<li>Date de mise en service ; voir <a
|
|
||||||
href="#créer-nouvelle_immobilisation">Créer une nouvelle
|
|
||||||
immobilisation</a>.</li>
|
|
||||||
<li>Libellé</li>
|
|
||||||
<li>Compte dans lequel enregistrer l’écriture d’immobilisation</li>
|
|
||||||
<li>Durée d’amortissement</li>
|
|
||||||
</ul>
|
|
||||||
<p>Après validation, la nouvelle immobilisation sera classée dans
|
|
||||||
l’onglet <em>Amortissables</em>.</p>
|
|
||||||
<p>Si on dé-coche la case <em>Amortir…</em>, l’immobilisation ne sera
|
|
||||||
pas amortie et sera marquée <em>ignorée</em>. On pourra la retrouver
|
|
||||||
dans l’onglet <em>À classer</em> en cochant la case <em>Afficher les
|
|
||||||
écritures ignorées</em>.</p>
|
|
||||||
|
Before Width: | Height: | Size: 88 KiB |
|
Before Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 82 KiB |
|
Before Width: | Height: | Size: 88 KiB |
|
Before Width: | Height: | Size: 125 KiB |
|
Before Width: | Height: | Size: 117 KiB |
|
Before Width: | Height: | Size: 30 KiB |
|
|
@ -13,7 +13,7 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{:assign label_immo=$info_immo.label|or:$ligne_immo.trans_label}}
|
{{:assign label_immo=$info_immo.label|or:$ligne_immo.trans_label}}
|
||||||
{{if $label_immo|strpos:$ligne_immo.line_label === false}}
|
{{if $ligne_immo.line_label != null && $ligne_immo.line_label != $label_immo}}
|
||||||
{{:assign label_immo=$label_immo|cat:" — "|cat:$ligne_immo.line_label}}
|
{{:assign label_immo=$label_immo|cat:" — "|cat:$ligne_immo.line_label}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{:assign trans_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$ligne_immo.trans_id}}
|
{{:assign trans_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$ligne_immo.trans_id}}
|
||||||
|
|
@ -123,13 +123,12 @@
|
||||||
{{/select}}
|
{{/select}}
|
||||||
|
|
||||||
{{:admin_header title="Immobilisation sortie du bilan" custom_css="./style.css" current="module_amortization"}}
|
{{:admin_header title="Immobilisation sortie du bilan" custom_css="./style.css" current="module_amortization"}}
|
||||||
|
|
||||||
{{if $_GET.from == "exit"}}
|
{{if $_GET.from == "exit"}}
|
||||||
{{:assign current="other"}}
|
{{:assign current="other"}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{:assign current="archived"}}
|
{{:assign current="archived"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{*:include file="_nav.html" current=$current subcurrent="exit"*}}
|
{{:include file="_nav.html" current=$current subcurrent="exit"}}
|
||||||
|
|
||||||
{{if $_GET.ok}}
|
{{if $_GET.ok}}
|
||||||
{{if $_GET.msg|match:"attach_avoir"}}
|
{{if $_GET.msg|match:"attach_avoir"}}
|
||||||
|
|
@ -147,7 +146,7 @@
|
||||||
<dt>Compte d'immobilisation</dt>
|
<dt>Compte d'immobilisation</dt>
|
||||||
<dd>{{$ligne_immo.account_code}} — {{$ligne_immo.account_label}}</dd>
|
<dd>{{$ligne_immo.account_code}} — {{$ligne_immo.account_label}}</dd>
|
||||||
<dt>Montant de l'immobilisation</dt>
|
<dt>Montant de l'immobilisation</dt>
|
||||||
<dd><span class="money">{{$montant_immo|money_currency_html:false|raw}}</dd>
|
<dd><span class="money">{{$ligne_immo.amount|money_html|raw}}</dd>
|
||||||
{{if $total_credits > 0}}
|
{{if $total_credits > 0}}
|
||||||
<dt>Montant des avoirs</dt>
|
<dt>Montant des avoirs</dt>
|
||||||
<dd class="money">{{"%f"|math:$total_credits|money_currency_html:false|raw}}</dd>
|
<dd class="money">{{"%f"|math:$total_credits|money_currency_html:false|raw}}</dd>
|
||||||
|
|
@ -163,8 +162,8 @@
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h3 class="ruler">Écritures d'avoir attachées à l'immobilisation</h3>
|
|
||||||
{{if $linked_immos != null}}
|
{{if $linked_immos != null}}
|
||||||
|
<h3 class="ruler">Écritures d'avoir attachées à l'immobilisation</h3>
|
||||||
<table class="list">
|
<table class="list">
|
||||||
<thead>
|
<thead>
|
||||||
<td class="num">N°</td>
|
<td class="num">N°</td>
|
||||||
|
|
@ -186,7 +185,7 @@
|
||||||
<td class="money">{{"%f"|math:$line.amount|money_currency_html:false|raw}}</td>
|
<td class="money">{{"%f"|math:$line.amount|money_currency_html:false|raw}}</td>
|
||||||
<td><a href="{{$compte_url}}">{{$line.account_code}}</a></td>
|
<td><a href="{{$compte_url}}">{{$line.account_code}}</a></td>
|
||||||
<td>{{$line.account_label}}</td>
|
<td>{{$line.account_label}}</td>
|
||||||
<td class="actions">
|
<td>
|
||||||
{{:linkbutton label="Détacher" href="detach_credit.html?immo_doc_id=%s&credit_line_id=%s&from=exit"|args:$_GET.immo_doc_id:$line.credit_line_id shape="minus"}}
|
{{:linkbutton label="Détacher" href="detach_credit.html?immo_doc_id=%s&credit_line_id=%s&from=exit"|args:$_GET.immo_doc_id:$line.credit_line_id shape="minus"}}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
@ -211,7 +210,7 @@
|
||||||
<td class="num">N°</td>
|
<td class="num">N°</td>
|
||||||
<td>Date</td>
|
<td>Date</td>
|
||||||
<td>Libellé</td>
|
<td>Libellé</td>
|
||||||
<td class="nombre">Montant</td>
|
<td>Montant</td>
|
||||||
<td>N° compte</td>
|
<td>N° compte</td>
|
||||||
<td>Compte</td>
|
<td>Compte</td>
|
||||||
<td class="actions"></td>
|
<td class="actions"></td>
|
||||||
|
|
@ -230,7 +229,7 @@
|
||||||
<td class="money">{{$amount|money_html|raw}}</td>
|
<td class="money">{{$amount|money_html|raw}}</td>
|
||||||
<td><a href="{{$compte_url}}">{{$account_code}}</a></td>
|
<td><a href="{{$compte_url}}">{{$account_code}}</a></td>
|
||||||
<td>{{$account_label}}</td>
|
<td>{{$account_label}}</td>
|
||||||
<td class="actions">
|
<td>
|
||||||
{{:linkbutton label="Attacher" href="attach_credit.html?immo_doc_id=%s&credit_line_id=%s&from=exit"|args:$_GET.immo_doc_id:$credit_line_id shape="plus" target="_dialog"}}
|
{{:linkbutton label="Attacher" href="attach_credit.html?immo_doc_id=%s&credit_line_id=%s&from=exit"|args:$_GET.immo_doc_id:$credit_line_id shape="plus" target="_dialog"}}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
{{/form}}
|
{{/form}}
|
||||||
|
|
||||||
{{:assign label_immo=$info_immo.label|or:$ligne_immo.trans_label}}
|
{{:assign label_immo=$info_immo.label|or:$ligne_immo.trans_label}}
|
||||||
{{if $label_immo|strpos:$ligne_immo.line_label === false}}
|
{{if $ligne_immo.line_label != null && $ligne_immo.line_label != $label_immo}}
|
||||||
{{:assign label_immo=$label_immo|cat:" — "|cat:$ligne_immo.line_label}}
|
{{:assign label_immo=$label_immo|cat:" — "|cat:$ligne_immo.line_label}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{:assign trans_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$ligne_immo.trans_id}}
|
{{:assign trans_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$ligne_immo.trans_id}}
|
||||||
|
|
@ -95,7 +95,7 @@
|
||||||
{{else}}
|
{{else}}
|
||||||
{{:assign current="archived"}}
|
{{:assign current="archived"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{*:include file="_nav.html" current=$current subcurrent="exit"*}}
|
{{:include file="_nav.html" current=$current subcurrent="exit"}}
|
||||||
|
|
||||||
{{if $_GET.ok}}
|
{{if $_GET.ok}}
|
||||||
{{if $_GET.msg|match:"attach_amort"}}
|
{{if $_GET.msg|match:"attach_amort"}}
|
||||||
|
|
@ -113,7 +113,7 @@
|
||||||
<dt>Compte d'immobilisation</dt>
|
<dt>Compte d'immobilisation</dt>
|
||||||
<dd>{{$ligne_immo.account_code}} — {{$ligne_immo.account_label}}</dd>
|
<dd>{{$ligne_immo.account_code}} — {{$ligne_immo.account_label}}</dd>
|
||||||
<dt>Montant de l'immobilisation</dt>
|
<dt>Montant de l'immobilisation</dt>
|
||||||
<dd><span class="money">{{$montant_immo|money_currency_html:false|raw}}</dd>
|
<dd><span class="money">{{$ligne_immo.amount|money_html|raw}}</dd>
|
||||||
{{if $total_credits > 0}}
|
{{if $total_credits > 0}}
|
||||||
<dt>Montant des avoirs</dt>
|
<dt>Montant des avoirs</dt>
|
||||||
<dd class="money">{{"%f"|math:$total_credits|money_currency_html:false|raw}}</dd>
|
<dd class="money">{{"%f"|math:$total_credits|money_currency_html:false|raw}}</dd>
|
||||||
|
|
@ -129,8 +129,8 @@
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h3 class="ruler">Écritures d'amortissement attachées à l'immobilisation</h3>
|
|
||||||
{{if $linked_amort != null}}
|
{{if $linked_amort != null}}
|
||||||
|
<h3 class="ruler">Écritures d'amortissement attachées à l'immobilisation</h3>
|
||||||
<table class="list">
|
<table class="list">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
@ -164,7 +164,7 @@
|
||||||
<td class="money">{{"%f"|math:$line.amount|money_html:false|raw}}</td>
|
<td class="money">{{"%f"|math:$line.amount|money_html:false|raw}}</td>
|
||||||
<td><a href="{{$compte_url}}">{{$line.account_code}}</a></td>
|
<td><a href="{{$compte_url}}">{{$line.account_code}}</a></td>
|
||||||
<td>{{$line.account_label}}</td>
|
<td>{{$line.account_label}}</td>
|
||||||
<td class="actions">
|
<td>
|
||||||
{{:linkbutton label="Détacher" href="detach_amort.html?immo_doc_id=%s&amort_line_id=%s&from=exit"|args:$_GET.immo_doc_id:$line.line_id shape="minus"}}
|
{{:linkbutton label="Détacher" href="detach_amort.html?immo_doc_id=%s&amort_line_id=%s&from=exit"|args:$_GET.immo_doc_id:$line.line_id shape="minus"}}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
@ -221,7 +221,7 @@
|
||||||
<td class="money">{{"%f"|math:$line.amort_amount|money_html:false|raw}}</td>
|
<td class="money">{{"%f"|math:$line.amort_amount|money_html:false|raw}}</td>
|
||||||
<td><a href="{{$compte_url}}">{{$line.account_code}}</a></td>
|
<td><a href="{{$compte_url}}">{{$line.account_code}}</a></td>
|
||||||
<td>{{$line.account_label}}</td>
|
<td>{{$line.account_label}}</td>
|
||||||
<td class="actions">
|
<td>
|
||||||
{{:linkbutton label="Attacher" href="attach_amort.html?immo_doc_id=%s&amort_line_id=%s&from=exit"|args:$_GET.immo_doc_id:$line.amort_line_id shape="plus" target="_dialog"}}
|
{{:linkbutton label="Attacher" href="attach_amort.html?immo_doc_id=%s&amort_line_id=%s&from=exit"|args:$_GET.immo_doc_id:$line.amort_line_id shape="plus" target="_dialog"}}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
{{/form}}
|
{{/form}}
|
||||||
|
|
||||||
{{:assign label_immo=$info_immo.label|or:$ligne_immo.trans_label}}
|
{{:assign label_immo=$info_immo.label|or:$ligne_immo.trans_label}}
|
||||||
{{if $label_immo|strpos:$ligne_immo.line_label === false}}
|
{{if $ligne_immo.line_label != null && $ligne_immo.line_label != $label_immo}}
|
||||||
{{:assign label_immo=$label_immo|cat:" — "|cat:$ligne_immo.line_label}}
|
{{:assign label_immo=$label_immo|cat:" — "|cat:$ligne_immo.line_label}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{:assign trans_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$ligne_immo.trans_id}}
|
{{:assign trans_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$ligne_immo.trans_id}}
|
||||||
|
|
@ -100,7 +100,7 @@
|
||||||
{{else}}
|
{{else}}
|
||||||
{{:assign current="archived"}}
|
{{:assign current="archived"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{*:include file="_nav.html" current=$current subcurrent="exit"*}}
|
{{:include file="_nav.html" current=$current subcurrent="exit"}}
|
||||||
|
|
||||||
{{if $_GET.ok}}
|
{{if $_GET.ok}}
|
||||||
{{if $_GET.msg|match:"attach_cession"}}
|
{{if $_GET.msg|match:"attach_cession"}}
|
||||||
|
|
@ -118,7 +118,7 @@
|
||||||
<dt>Compte d'immobilisation</dt>
|
<dt>Compte d'immobilisation</dt>
|
||||||
<dd>{{$ligne_immo.account_code}} — {{$ligne_immo.account_label}}</dd>
|
<dd>{{$ligne_immo.account_code}} — {{$ligne_immo.account_label}}</dd>
|
||||||
<dt>Montant de l'immobilisation</dt>
|
<dt>Montant de l'immobilisation</dt>
|
||||||
<dd><span class="money">{{$montant_immo|money_currency_html:false|raw}}</dd>
|
<dd><span class="money">{{$ligne_immo.amount|money_html|raw}}</dd>
|
||||||
{{if $total_credits > 0}}
|
{{if $total_credits > 0}}
|
||||||
<dt>Montant des avoirs</dt>
|
<dt>Montant des avoirs</dt>
|
||||||
<dd class="money">{{"%f"|math:$total_credits|money_currency_html:false|raw}}</dd>
|
<dd class="money">{{"%f"|math:$total_credits|money_currency_html:false|raw}}</dd>
|
||||||
|
|
@ -138,8 +138,8 @@
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h3 class="ruler">Écriture de cession attachée à l'immobilisation</h3>
|
|
||||||
{{if $linked_cessions != null}}
|
{{if $linked_cessions != null}}
|
||||||
|
<h3 class="ruler">Écriture de cession attachée à l'immobilisation</h3>
|
||||||
<table class="list">
|
<table class="list">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
@ -173,7 +173,7 @@
|
||||||
<td class="money">{{"%f"|math:$line.amount|money_html:false|raw}}</td>
|
<td class="money">{{"%f"|math:$line.amount|money_html:false|raw}}</td>
|
||||||
<td><a href="{{$compte_url}}">{{$line.account_code}}</a></td>
|
<td><a href="{{$compte_url}}">{{$line.account_code}}</a></td>
|
||||||
<td>{{$line.account_label}}</td>
|
<td>{{$line.account_label}}</td>
|
||||||
<td class="actions">
|
<td>
|
||||||
{{:linkbutton label="Détacher" href="detach_cession.html?immo_doc_id=%s&cession_line_id=%s&from=exit"|args:$_GET.immo_doc_id:$line.line_id shape="minus"}}
|
{{:linkbutton label="Détacher" href="detach_cession.html?immo_doc_id=%s&cession_line_id=%s&from=exit"|args:$_GET.immo_doc_id:$line.line_id shape="minus"}}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
@ -186,7 +186,7 @@
|
||||||
</p>
|
</p>
|
||||||
{{else}}
|
{{else}}
|
||||||
<p class="block alert">
|
<p class="block alert">
|
||||||
Aucune écriture de cession
|
Aucune écriture de cession... que faire ?
|
||||||
</p>
|
</p>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
|
@ -226,7 +226,7 @@
|
||||||
<td class="money">{{"%f"|math:$line.amount|money_html:false|raw}}</td>
|
<td class="money">{{"%f"|math:$line.amount|money_html:false|raw}}</td>
|
||||||
<td><a href="{{$compte_url}}">{{$line.account_code}}</a></td>
|
<td><a href="{{$compte_url}}">{{$line.account_code}}</a></td>
|
||||||
<td>{{$line.account_label}}</td>
|
<td>{{$line.account_label}}</td>
|
||||||
<td class="actions">
|
<td>
|
||||||
{{:linkbutton label="Attacher" href="attach_cession.html?immo_doc_id=%s&cession_line_id=%s&from=exit"|args:$_GET.immo_doc_id:$line.line_id shape="plus"}}
|
{{:linkbutton label="Attacher" href="attach_cession.html?immo_doc_id=%s&cession_line_id=%s&from=exit"|args:$_GET.immo_doc_id:$line.line_id shape="plus"}}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
||||||
|
|
@ -26,11 +26,11 @@
|
||||||
{{/form}}
|
{{/form}}
|
||||||
|
|
||||||
{{#form on="finish"}}
|
{{#form on="finish"}}
|
||||||
{{:redirect to="index.html?type_immo=other"}}
|
{{:redirect to="index.html?type_immo=managed"}}
|
||||||
{{/form}}
|
{{/form}}
|
||||||
|
|
||||||
{{:assign label_immo=$info_immo.label|or:$ligne_immo.trans_label}}
|
{{:assign label_immo=$info_immo.label|or:$ligne_immo.trans_label}}
|
||||||
{{if $label_immo|strpos:$ligne_immo.line_label === false}}
|
{{if $ligne_immo.line_label != null && $ligne_immo.line_label != $label_immo}}
|
||||||
{{:assign label_immo=$label_immo|cat:" — "|cat:$ligne_immo.line_label}}
|
{{:assign label_immo=$label_immo|cat:" — "|cat:$ligne_immo.line_label}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{:assign trans_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$ligne_immo.trans_id}}
|
{{:assign trans_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$ligne_immo.trans_id}}
|
||||||
|
|
@ -84,39 +84,6 @@
|
||||||
assign="exit_line"
|
assign="exit_line"
|
||||||
}}
|
}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
|
|
||||||
{{* lignes de l'écriture de sortie *}}
|
|
||||||
{{#select
|
|
||||||
line.label as line_label,
|
|
||||||
line.credit,
|
|
||||||
line.debit,
|
|
||||||
acc.id as account_id,
|
|
||||||
acc.code as account_code,
|
|
||||||
acc.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 acc ON line.id_account = acc.id
|
|
||||||
WHERE trans.id = :exit_trans_id;
|
|
||||||
:exit_trans_id = $exit_line.trans_id
|
|
||||||
assign="trans"
|
|
||||||
}}
|
|
||||||
{{:assign var="exit_trans.%s"|args:$account_code value=$trans}}
|
|
||||||
{{/select}}
|
|
||||||
|
|
||||||
{{:assign acc_codes=$exit_trans|keys}}
|
|
||||||
{{#foreach from=$linked_amort}}
|
|
||||||
{{if $account_code|in:$acc_codes}}
|
|
||||||
{{:assign var="exit_amort" from="exit_trans.%s.debit"|args:$account_code}}
|
|
||||||
{{:break}}
|
|
||||||
{{/if}}
|
|
||||||
{{/foreach}}
|
|
||||||
|
|
||||||
{{if $exit_amort != $total_amort}}
|
|
||||||
{{:assign exit_amort_display=$exit_amort|money_currency:false|replace:" ":" "}}
|
|
||||||
{{:assign total_amort_display=$total_amort|money_currency:false|replace:" ":" "}}
|
|
||||||
{{:assign erreur=1}}
|
|
||||||
{{:assign message="Le montant des amortissement dans l'écriture de sortie (%s) est différent du total des amortissements associés à l'immobilisation (%s)."|args:$exit_amort_display:$total_amort_display}}
|
|
||||||
{{/if}}
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{*
|
{{*
|
||||||
|
|
@ -220,7 +187,7 @@
|
||||||
{{else}}
|
{{else}}
|
||||||
{{:assign current="archived"}}
|
{{:assign current="archived"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{*:include file="_nav.html" current=$current subcurrent="exit"*}}
|
{{:include file="_nav.html" current=$current subcurrent="exit"}}
|
||||||
|
|
||||||
{{if $_GET.ok}}
|
{{if $_GET.ok}}
|
||||||
{{if $_GET.msg|match:"attach_exit"}}
|
{{if $_GET.msg|match:"attach_exit"}}
|
||||||
|
|
@ -238,7 +205,7 @@
|
||||||
<dt>Compte d'immobilisation</dt>
|
<dt>Compte d'immobilisation</dt>
|
||||||
<dd>{{$ligne_immo.account_code}} — {{$ligne_immo.account_label}}</dd>
|
<dd>{{$ligne_immo.account_code}} — {{$ligne_immo.account_label}}</dd>
|
||||||
<dt>Montant de l'immobilisation</dt>
|
<dt>Montant de l'immobilisation</dt>
|
||||||
<dd><span class="money">{{$montant_immo|money_currency_html:false|raw}}</dd>
|
<dd><span class="money">{{$ligne_immo.amount|money_html|raw}}</dd>
|
||||||
{{if $total_credits > 0}}
|
{{if $total_credits > 0}}
|
||||||
<dt>Montant des avoirs</dt>
|
<dt>Montant des avoirs</dt>
|
||||||
<dd class="money">{{"%f"|math:$total_credits|money_currency_html:false|raw}}</dd>
|
<dd class="money">{{"%f"|math:$total_credits|money_currency_html:false|raw}}</dd>
|
||||||
|
|
@ -258,37 +225,8 @@
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{if $erreur}}
|
|
||||||
<p class="block error">{{$message}}<br />Vérifiez si vous avez correctement attaché les écritures d'amortissement.</p>
|
|
||||||
<table class="list error">
|
|
||||||
<caption>Détails de l'écriture de sortie de bilan</caption>
|
|
||||||
<thead class="error">
|
|
||||||
<tr>
|
|
||||||
<td class="num">Numéro</td>
|
|
||||||
<td>Compte</td>
|
|
||||||
<td class="nombre">Débit</td>
|
|
||||||
<td class="nombre">Crédit</td>
|
|
||||||
<td>Libellé</td>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{{#foreach from=$exit_trans key="account_code" item="line"}}
|
|
||||||
{{:assign account_url="%s/acc/accounts/journal.php?id=%s&year=%s"|args:$admin_url:$line.account_id:$line.id_year}}
|
|
||||||
<tr>
|
|
||||||
<td class="num"><a href="{{$account_url}}">{{$line.account_code}}</a></td>
|
|
||||||
<td>{{$line.account_label}}</td>
|
|
||||||
<td class="money">{{$line.debit|money_currency:false}}</td>
|
|
||||||
<td class="money">{{$line.credit|money_currency:false}}</td>
|
|
||||||
<td>{{$line.line_label}}</td>
|
|
||||||
</tr>
|
|
||||||
{{/foreach}}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
<h3 class="ruler">Écriture de sortie de bilan attachée à l'immobilisation</h3>
|
|
||||||
{{if $exit_line != null}}
|
{{if $exit_line != null}}
|
||||||
{{:assign exit_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$exit_line.trans_id}}
|
<h3 class="ruler">Écriture de sortie du bilan attachée à l'immobilisation</h3>
|
||||||
<table class="list">
|
<table class="list">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
@ -303,7 +241,7 @@
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="num"><a href="{{$exit_url}}">#{{$exit_line.trans_id}}</a></td>
|
<td class="num"><a href="{{$trans_url}}">#{{$exit_line.trans_id}}</a></td>
|
||||||
<td>{{$exit_line.date|date_short}}</td>
|
<td>{{$exit_line.date|date_short}}</td>
|
||||||
<td>
|
<td>
|
||||||
{{if $exit_line.line_label != null}}
|
{{if $exit_line.line_label != null}}
|
||||||
|
|
@ -315,7 +253,7 @@
|
||||||
<td class="money">{{"%f"|math:$exit_line.amount|money_html:false|raw}}</td>
|
<td class="money">{{"%f"|math:$exit_line.amount|money_html:false|raw}}</td>
|
||||||
<td><a href="{{$compte_url}}">{{$exit_line.account_code}}</a></td>
|
<td><a href="{{$compte_url}}">{{$exit_line.account_code}}</a></td>
|
||||||
<td>{{$exit_line.account_label}}</td>
|
<td>{{$exit_line.account_label}}</td>
|
||||||
<td class="actions">
|
<td>
|
||||||
{{:linkbutton label="Détacher" href="detach_exit.html?immo_doc_id=%s&exit_line_id=%s&from=exit"|args:$_GET.immo_doc_id:$exit_line.line_id shape="minus"}}
|
{{:linkbutton label="Détacher" href="detach_exit.html?immo_doc_id=%s&exit_line_id=%s&from=exit"|args:$_GET.immo_doc_id:$exit_line.line_id shape="minus"}}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
@ -323,7 +261,7 @@
|
||||||
</table>
|
</table>
|
||||||
{{elseif $exit_lines}}
|
{{elseif $exit_lines}}
|
||||||
<p class="block alert">
|
<p class="block alert">
|
||||||
Vous pouvez attacher une écriture de sortie de bilan à l'immobilisation
|
Vous pouvez attacher une écriture de sortie du bilan à l'immobilisation
|
||||||
</p>
|
</p>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
|
@ -355,7 +293,7 @@
|
||||||
<td class="money">{{"%f"|math:$line.amount|money_html:false|raw}}</td>
|
<td class="money">{{"%f"|math:$line.amount|money_html:false|raw}}</td>
|
||||||
<td><a href="{{$compte_url}}">{{$line.account_code}}</a></td>
|
<td><a href="{{$compte_url}}">{{$line.account_code}}</a></td>
|
||||||
<td>{{$line.account_label}}</td>
|
<td>{{$line.account_label}}</td>
|
||||||
<td class="actions">
|
<td>
|
||||||
{{:linkbutton label="Attacher" href="attach_exit.html?immo_doc_id=%s&exit_line_id=%s&from=exit"|args:$_GET.immo_doc_id:$line.credit_line_id shape="plus"}}
|
{{:linkbutton label="Attacher" href="attach_exit.html?immo_doc_id=%s&exit_line_id=%s&from=exit"|args:$_GET.immo_doc_id:$line.credit_line_id shape="plus"}}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
@ -363,29 +301,16 @@
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
{{elseif $exit_line == null}}
|
{{elseif $exit_line == null}}
|
||||||
<p class="block error">Aucune écriture de sortie de bilan avec un
|
<p class="block alert">Aucune écriture de sortie du bilan. Vérifiez l'attachement d'écriture d'avoir.</p>
|
||||||
montant de {{$solde|money_currency_html:false|raw}} au crédit du
|
|
||||||
compte {{$ligne_immo.account_code}} — {{$ligne_immo.account_label}} ;
|
|
||||||
<br />
|
|
||||||
Vérifiez si vous avez correctement attaché les éventuelles écritures d'avoir.
|
|
||||||
<br />
|
|
||||||
Si vous avez supprimé l'écriture de sortie de bilan, il faut
|
|
||||||
la recréer avant de pouvoir classer cette immobilisation
|
|
||||||
« Sortie du bilan » !
|
|
||||||
</p>
|
|
||||||
{{:save
|
|
||||||
key=$info_immo.key
|
|
||||||
status=null
|
|
||||||
}}
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<form method="post" action="">
|
<form method="post" action="">
|
||||||
<p class="submit">
|
<p class="submit">
|
||||||
{{:button type="submit" name="backward" label="Revenir à l'étape précédente" shape="left" class="main"}}
|
{{:button type="submit" name="backward" label="Revenir à l'étape précédente" shape="left" class="main"}}
|
||||||
{{if $exit_line && ! $erreur}}
|
{{if $exit_line}}
|
||||||
{{:button type="submit" name="validate" label="Terminer" shape="check" class="main"}}
|
{{:button type="submit" name="validate" label="Terminer" shape="check" class="main"}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{:button type="submit" name="finish" label="Annuler" shape="delete" class="main"}}
|
{{:button type="submit" name="finish" label="Terminer" shape="export" class="main"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</p>
|
</p>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Libellé</th>
|
<th>Libellé</th>
|
||||||
<th class="actions"></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,6 @@
|
||||||
{{:error message="Il n'y a aucune écriture avec le numéro de ligne %s !"|args:$_GET.immo_line_id}}
|
{{:error message="Il n'y a aucune écriture avec le numéro de ligne %s !"|args:$_GET.immo_line_id}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
{{#load type="immo" assign="info_immo" where="$$.line = :line_id" :line_id=$_GET.immo_line_id|intval}}{{/load}}
|
{{#load type="immo" assign="info_immo" where="$$.line = :line_id" :line_id=$_GET.immo_line_id|intval}}{{/load}}
|
||||||
{{:assign trans_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$ligne_immo.trans_id}}
|
|
||||||
|
|
||||||
{{* Traiter l'envoi du formulaire *}}
|
{{* Traiter l'envoi du formulaire *}}
|
||||||
{{#form on="proceed"}}
|
{{#form on="proceed"}}
|
||||||
|
|
|
||||||
28
index.html
|
|
@ -7,39 +7,36 @@
|
||||||
{{:assign type_immo=$_GET.type_immo}}
|
{{:assign type_immo=$_GET.type_immo}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{if $type_immo == "managed"}}
|
{{if $type_immo == "managed"}}
|
||||||
{{:admin_header title="Immobilisations en cours d'amortissement" custom_css="./style.css" current="module_amortization"}}
|
{{:admin_header title="Immobilisations en cours d'amortissement" custom_css="./style.css" current="module_amortization"}}
|
||||||
{{elseif $type_immo == "amortized"}}
|
{{elseif $type_immo == "amortized"}}
|
||||||
{{:admin_header title="Immobilisations amorties" custom_css="./style.css" current="module_amortization"}}
|
{{:admin_header title="Immobilisations amorties" custom_css="./style.css" current="module_amortization"}}
|
||||||
{{elseif $type_immo == "archived"}}
|
{{elseif $type_immo == "archived"}}
|
||||||
{{:admin_header title="Immobilisations archivées" custom_css="./style.css" current="module_amortization"}}
|
{{:admin_header title="Immobilisations archivées" custom_css="./style.css" current="module_amortization"}}
|
||||||
{{elseif $type_immo == "other"}}
|
{{elseif $type_immo == "other"}}
|
||||||
{{:admin_header title="Immobilisations à classer" custom_css="./style.css" current="module_amortization"}}
|
{{:admin_header title="Immobilisations à classer" custom_css="./style.css" current="module_amortization"}}
|
||||||
{{elseif $type_immo == "unfinished"}}
|
{{elseif $type_immo == "unfinished"}}
|
||||||
{{:admin_header title="Immobilisations en cours de constitution" custom_css="./style.css" current="module_amortization" subcurrent="unfinished"}}
|
{{:admin_header title="Immobilisations en cours de constitution" custom_css="./style.css" current="module_amortization" subcurrent="unfinished"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{:include file="_nav.html" current=$type_immo}}
|
{{:include file="_nav.html" current=$type_immo}}
|
||||||
|
|
||||||
{{* Mise à niveau *}}
|
|
||||||
{{:assign module_version="0.33"}}
|
|
||||||
{{:include file="upgrade.html" module_version=$module_version}}
|
|
||||||
|
|
||||||
{{* supprimer les documents sans écriture associée *}}
|
|
||||||
{{:include file="_remove_orphan_docs.tpl"}}
|
|
||||||
|
|
||||||
{{if $_GET.ok}}
|
{{if $_GET.ok}}
|
||||||
{{if $_GET.msg|match:"immobilisation"}}
|
{{if $_GET.msg|match:"immobilisation"}}
|
||||||
{{:assign msg="Immobilisation enregistrée"}}
|
{{:assign msg="Immobilisation enregistrée"}}
|
||||||
{{elseif $_GET.msg|match:"suppr_infos"}}
|
{{elseif $_GET.msg|match:"suppr_infos"}}
|
||||||
{{:assign msg="Paramètres supprimés"}}
|
{{:assign msg="Informations supprimées"}}
|
||||||
{{elseif $_GET.msg|match:"infos"}}
|
{{elseif $_GET.msg|match:"infos"}}
|
||||||
{{:assign msg="Paramètres enregistrés"}}
|
{{:assign msg="Informations enregistrées"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<p class="block confirm">{{$msg}}</p>
|
<p class="block confirm">{{$msg}}</p>
|
||||||
{{elseif $_GET.err}}
|
{{elseif $_GET.err}}
|
||||||
<p class="block error">Échec enregistrement immobilisation</p>
|
<p class="block error">Échec enregistrement immobilisation</p>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
{{* supprimer les documents sans écriture associée *}}
|
||||||
|
{{:include file="_remove_orphan_docs.tpl"}}
|
||||||
|
|
||||||
{{if $type_immo == "other"}}
|
{{if $type_immo == "other"}}
|
||||||
{{:include file="_immobilisations_autres.html"}}
|
{{:include file="_immobilisations_autres.html"}}
|
||||||
{{elseif $type_immo == "archived"}}
|
{{elseif $type_immo == "archived"}}
|
||||||
|
|
@ -49,4 +46,5 @@
|
||||||
{{elseif $type_immo == "managed" || $type_immo == "amortized"}}
|
{{elseif $type_immo == "managed" || $type_immo == "amortized"}}
|
||||||
{{:include file="_immobilisations.html"}}
|
{{:include file="_immobilisations.html"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{:admin_footer}}
|
{{:admin_footer}}
|
||||||
|
|
|
||||||
|
|
@ -10,16 +10,10 @@
|
||||||
{{if $message != null}}
|
{{if $message != null}}
|
||||||
{{:error message=$message}}
|
{{:error message=$message}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
{{:assign label_immo=$ligne_immo.trans_label}}
|
||||||
{{:assign trans_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$ligne_immo.trans_id}}
|
{{if $ligne_immo.line_label != null && $ligne_immo.line_label != $label_immo}}
|
||||||
{{:assign date_debut=$info_immo.date_mes|or:$info_immo.date_achat|or:$ligne_immo.date_achat}}
|
|
||||||
{{:assign label_immo=$info_immo.label|or:$ligne_immo.trans_label}}
|
|
||||||
{{if $label_immo|strpos:$ligne_immo.line_label ===false }}
|
|
||||||
{{:assign label_immo=$label_immo|cat:" — "|cat:$ligne_immo.line_label}}
|
{{:assign label_immo=$label_immo|cat:" — "|cat:$ligne_immo.line_label}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{if $info_immo.amount != null}}
|
|
||||||
{{:assign var="ligne_immo.amount" value=$info_immo.amount}}
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
{{*
|
{{*
|
||||||
lister les écritures au crédit du compte de l'immobilisation
|
lister les écritures au crédit du compte de l'immobilisation
|
||||||
|
|
@ -29,8 +23,6 @@
|
||||||
{{else}}
|
{{else}}
|
||||||
{{:assign account_code=$ligne_immo.account_code|substr:0:2|cat:"%"}}
|
{{:assign account_code=$ligne_immo.account_code|substr:0:2|cat:"%"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{:assign date_immo=$info_immo.date_achat|or:$ligne_immo.date_achat}}
|
|
||||||
|
|
||||||
{{#select
|
{{#select
|
||||||
line.id as credit_line_id,
|
line.id as credit_line_id,
|
||||||
line.id_transaction as credit_trans_id,
|
line.id_transaction as credit_trans_id,
|
||||||
|
|
@ -48,7 +40,6 @@
|
||||||
INNER JOIN acc_accounts AS account ON account.id = line.id_account
|
INNER JOIN acc_accounts AS account ON account.id = line.id_account
|
||||||
INNER JOIN acc_years AS y ON y.id = trans.id_year
|
INNER JOIN acc_years AS y ON y.id = trans.id_year
|
||||||
WHERE account.code LIKE :account_code AND credit > 0
|
WHERE account.code LIKE :account_code AND credit > 0
|
||||||
AND trans.date >= :date_immo
|
|
||||||
AND credit_line_id NOT IN (
|
AND credit_line_id NOT IN (
|
||||||
SELECT json_extract(link.document, '$.credit_line_id') AS credit_line_id FROM !table as link
|
SELECT json_extract(link.document, '$.credit_line_id') AS credit_line_id FROM !table as link
|
||||||
WHERE json_extract(link.document, '$.type') == "credit_link"
|
WHERE json_extract(link.document, '$.type') == "credit_link"
|
||||||
|
|
@ -57,8 +48,7 @@
|
||||||
WHERE json_extract(exit_link.document, '$.type') == "exit_link")
|
WHERE json_extract(exit_link.document, '$.type') == "exit_link")
|
||||||
ORDER BY trans.date, trans.label;
|
ORDER BY trans.date, trans.label;
|
||||||
:account_code = $account_code
|
:account_code = $account_code
|
||||||
!table = $module.table
|
!table =$module.table
|
||||||
:date_immo = $date_immo
|
|
||||||
assign="other_immos."
|
assign="other_immos."
|
||||||
}}
|
}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
|
|
@ -98,7 +88,7 @@
|
||||||
<dt>Montant</dt>
|
<dt>Montant</dt>
|
||||||
<dd class="money strong">{{"%f"|math:$ligne_immo.amount|money_currency_html:false|raw}}</dd>
|
<dd class="money strong">{{"%f"|math:$ligne_immo.amount|money_currency_html:false|raw}}</dd>
|
||||||
<dt>Date de l'immobilisation</dt>
|
<dt>Date de l'immobilisation</dt>
|
||||||
<dd>{{$date_debut|date_short}}</dd>
|
<dd>{{$ligne_immo.date_achat|date_short}}</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -128,7 +118,7 @@
|
||||||
</td>
|
</td>
|
||||||
<td><a href="{{$compte_url}}">{{$line.account_code}}</a></td>
|
<td><a href="{{$compte_url}}">{{$line.account_code}}</a></td>
|
||||||
<td>{{$line.account_label}}</td>
|
<td>{{$line.account_label}}</td>
|
||||||
<td class="actions">
|
<td>
|
||||||
{{:linkbutton label="Attacher" href="attach_credit.html?credit_line_id=%d&immo_doc_id=%s"|args:$line.credit_line_id:$_GET.immo_doc_id shape="plus"}}
|
{{:linkbutton label="Attacher" href="attach_credit.html?credit_line_id=%d&immo_doc_id=%s"|args:$line.credit_line_id:$_GET.immo_doc_id shape="plus"}}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
{{:assign montant_immo=$info_immo.amount|or:$ligne_immo.amount}}
|
{{:assign montant_immo=$info_immo.amount|or:$ligne_immo.amount}}
|
||||||
{{:assign label_immo=$info_immo.label|or:$ligne_immo.trans_label}}
|
{{:assign label_immo=$info_immo.label|or:$ligne_immo.trans_label}}
|
||||||
{{if $label_immo|strpos:$ligne_immo.line_label === false}}
|
{{if $ligne_immo.line_label != null && $ligne_immo.line_label != $label_immo}}
|
||||||
{{:assign label_immo=$label_immo|cat:" — "|cat:$ligne_immo.line_label}}
|
{{:assign label_immo=$label_immo|cat:" — "|cat:$ligne_immo.line_label}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{:assign date_mes=$info_immo.date_mes|or:$info_immo.date_achat|or:$ligne_immo.date_achat}}
|
{{:assign date_mes=$info_immo.date_mes|or:$info_immo.date_achat|or:$ligne_immo.date_achat}}
|
||||||
|
|
@ -22,26 +22,21 @@
|
||||||
{{:include file="_get_credit_lines.html" immo_doc_id=$_GET.immo_doc_id keep="linked_immos, total_credits"}}
|
{{:include file="_get_credit_lines.html" immo_doc_id=$_GET.immo_doc_id keep="linked_immos, total_credits"}}
|
||||||
{{:assign montant_immo="%d-%d"|math:$montant_immo:$total_credits}}
|
{{:assign montant_immo="%d-%d"|math:$montant_immo:$total_credits}}
|
||||||
|
|
||||||
{{* déterminer le compte d'amortissement en fonction du compte d'immobilisation *}}
|
{{if $_GET.filter}}
|
||||||
{{:include
|
{{* déterminer le compte d'amortissement en fonction du compte d'immobilisation *}}
|
||||||
|
{{:include
|
||||||
file="./_get_amort_code.html"
|
file="./_get_amort_code.html"
|
||||||
code_immo=$ligne_immo.account_code
|
code_immo=$ligne_immo.account_code
|
||||||
keep="code_amort"
|
keep="code_amort"
|
||||||
}}
|
}}
|
||||||
{{if $_GET.filter}}
|
{{:assign filter_condition="account.code = "|cat:$code_amort}}
|
||||||
{{:assign amort_account=$code_amort|quote_sql}}
|
|
||||||
{{:assign filter_condition="account.code = "|cat:$amort_account}}
|
|
||||||
{{else}}
|
{{else}}
|
||||||
{{:assign account_filter="28%"|quote_sql}}
|
{{:assign account_filter="28%"|quote_sql}}
|
||||||
{{:assign filter_condition="account.code LIKE "|cat:$account_filter}}
|
{{:assign filter_condition="account.code LIKE "|cat:$account_filter}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{:assign date_amort=$date_mes|quote_sql}}
|
|
||||||
{{:assign date_condition="trans.date >= "|cat:$date_amort}}
|
|
||||||
{{:assign condition=$date_condition|cat:" AND "|cat:$filter_condition}}
|
|
||||||
|
|
||||||
{{* lister les amortissements non rattachés à une immo *}}
|
{{* lister les amortissements non rattachés à une immo *}}
|
||||||
{{:include file="./_get_free_amort.html" condition=$condition keep="free_amort_lines"}}
|
{{:include file="./_get_free_amort.html" filter_condition=$filter_condition keep="free_amort_lines"}}
|
||||||
|
|
||||||
{{:admin_header title="Amortissements non rattachés" custom_css="./style.css" current="module_amortization"}}
|
{{:admin_header title="Amortissements non rattachés" custom_css="./style.css" current="module_amortization"}}
|
||||||
|
|
||||||
|
|
@ -117,7 +112,7 @@
|
||||||
<td class="money">{{"%f"|math:$line.amount|money_html:false|raw}}</td>
|
<td class="money">{{"%f"|math:$line.amount|money_html:false|raw}}</td>
|
||||||
<td><a href="{{$compte_url}}">{{$line.account_code}}</a></td>
|
<td><a href="{{$compte_url}}">{{$line.account_code}}</a></td>
|
||||||
<td>{{$line.account_label}}</td>
|
<td>{{$line.account_label}}</td>
|
||||||
<td class="actions">
|
<td>
|
||||||
{{:linkbutton label="Attacher" href="attach_amort.html?immo_doc_id=%s&amort_line_id=%s"|args:$_GET.immo_doc_id:$line.line_id shape="plus"}}
|
{{:linkbutton label="Attacher" href="attach_amort.html?immo_doc_id=%s&amort_line_id=%s"|args:$_GET.immo_doc_id:$line.line_id shape="plus"}}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
||||||
|
|
@ -74,15 +74,6 @@ table.list tbody tr.ignored:nth-child(even) {
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
background: rgba(255, 255, 200, 0.5);
|
background: rgba(255, 255, 200, 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
table.error {
|
|
||||||
background-color: #fcc;
|
|
||||||
}
|
|
||||||
table.error tr, table.error td, table.error thead td {
|
|
||||||
background-image : none;
|
|
||||||
background-color: #fcc;
|
|
||||||
}
|
|
||||||
|
|
||||||
html.dark table.list tbody tr.ignored:nth-child(odd) {
|
html.dark table.list tbody tr.ignored:nth-child(odd) {
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
background: rgba(100, 100, 0, 0.4);
|
background: rgba(100, 100, 0, 0.4);
|
||||||
|
|
|
||||||
|
|
@ -1,69 +0,0 @@
|
||||||
section.page *
|
|
||||||
{
|
|
||||||
padding: 0.1em;
|
|
||||||
margin-top: 0.1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
section.page ul {
|
|
||||||
list-style: inside;
|
|
||||||
margin-left: 1.5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
section.page ol {
|
|
||||||
list-style: decimal;
|
|
||||||
margin-left: 1.5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
section.page h1 {
|
|
||||||
font-size: 2em;
|
|
||||||
}
|
|
||||||
|
|
||||||
section.page h2 {
|
|
||||||
font-size: 1.5em;
|
|
||||||
margin-top : 1.5rem;
|
|
||||||
margin-bottom : 0.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
section.page h3 {
|
|
||||||
font-size: 1.2em;
|
|
||||||
margin-top : 1.5rem;
|
|
||||||
margin-bottom : 0.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
section.page h4 {
|
|
||||||
font-size: 1em;
|
|
||||||
margin-top : 1.5rem;
|
|
||||||
margin-bottom : 0.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
section.page figure {
|
|
||||||
margin-top : 0.5rem;
|
|
||||||
margin-bottom : 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
section.page figcaption {
|
|
||||||
font-weight : bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
section.page blockquote {
|
|
||||||
width: 75%;
|
|
||||||
margin-left: 2em;
|
|
||||||
margin-right: 2em;
|
|
||||||
font-family: Arial, Helvetica, sans-serif;
|
|
||||||
font-size: 1.1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
section.page article header {
|
|
||||||
text-align: center;
|
|
||||||
margin: 1rem 0;
|
|
||||||
padding-bottom: 0.5rem;
|
|
||||||
border-bottom: 2px solid #999;
|
|
||||||
}
|
|
||||||
|
|
||||||
a:link {
|
|
||||||
color: #0033aa;
|
|
||||||
}
|
|
||||||
|
|
||||||
a:link:visited {
|
|
||||||
color: #6600aa;
|
|
||||||
}
|
|
||||||
|
|
@ -36,6 +36,7 @@
|
||||||
{{:assign trans_list=$trans_list|implode:","}}
|
{{:assign trans_list=$trans_list|implode:","}}
|
||||||
{{:assign trans_list="("|cat:$trans_list|cat:")"}}
|
{{:assign trans_list="("|cat:$trans_list|cat:")"}}
|
||||||
{{:assign condition=$condition|cat:" AND trans.id IN "|cat:$trans_list}}
|
{{:assign condition=$condition|cat:" AND trans.id IN "|cat:$trans_list}}
|
||||||
|
{{:assign condition=$condition|cat:" AND NOT (trans.status & 16)"}}
|
||||||
|
|
||||||
{{#select
|
{{#select
|
||||||
trans.id as trans_id,
|
trans.id as trans_id,
|
||||||
|
|
@ -44,7 +45,6 @@
|
||||||
SUM(line.debit) AS line_debit,
|
SUM(line.debit) AS line_debit,
|
||||||
account.code AS account_code,
|
account.code AS account_code,
|
||||||
account.label AS account_label,
|
account.label AS account_label,
|
||||||
line.label as line_label,
|
|
||||||
line.id_project as project_id
|
line.id_project as project_id
|
||||||
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
|
||||||
|
|
@ -56,7 +56,6 @@
|
||||||
}}
|
}}
|
||||||
{{:assign var="transactions.%s"|args:$trans_id
|
{{:assign var="transactions.%s"|args:$trans_id
|
||||||
amount=$line_debit
|
amount=$line_debit
|
||||||
line_label=$line_label
|
|
||||||
date=$trans_date
|
date=$trans_date
|
||||||
code=$account_code
|
code=$account_code
|
||||||
label=$account_label
|
label=$account_label
|
||||||
|
|
@ -266,7 +265,7 @@
|
||||||
</td>
|
</td>
|
||||||
<td>{{:input name="credit_lines[]" type="text" class="money" size="8" default=$amount|money}}</td>
|
<td>{{:input name="credit_lines[]" type="text" class="money" size="8" default=$amount|money}}</td>
|
||||||
<td>{{:input name="debit_lines[]" type="text" class="money" size="8" disabled=true}}</td>
|
<td>{{:input name="debit_lines[]" type="text" class="money" size="8" disabled=true}}</td>
|
||||||
<td>{{:input type="text" name="line_labels[]" size="40" default=$line_label}}</td>
|
<td>{{:input type="text" name="line_labels[]" size="40"}}</td>
|
||||||
<td>
|
<td>
|
||||||
{{if $projects != null}}
|
{{if $projects != null}}
|
||||||
{{:input type="select" name="id_project" options=$projects default_empty="— Aucun —"}}
|
{{:input type="select" name="id_project" options=$projects default_empty="— Aucun —"}}
|
||||||
|
|
|
||||||
45
upgrade.html
|
|
@ -1,45 +0,0 @@
|
||||||
{{* -*- brindille -*- *}}
|
|
||||||
|
|
||||||
{{*
|
|
||||||
mise à niveau des documents selon version
|
|
||||||
*}}
|
|
||||||
|
|
||||||
{{* version 0.31 *}}
|
|
||||||
{{:assign tag="0.31"}}
|
|
||||||
|
|
||||||
{{:include file="_compare_version.tpl" nv1=$module_version nv2=$tag keep="comp"}}
|
|
||||||
{{:assign module_comp=$comp}}
|
|
||||||
{{:include file="_compare_version.tpl" nv1=$module.config.version nv2=$tag keep="comp"}}
|
|
||||||
{{:assign config_comp=$comp}}
|
|
||||||
|
|
||||||
{{if $module_comp >= 0 && $config_comp < 0}}
|
|
||||||
{{* $module_version >= '0.31' && $module.config.version < '0.31' *}}
|
|
||||||
|
|
||||||
{{:include file="_upgrade_to031.tpl"}}
|
|
||||||
<p class="block info">Mise à jour vers version {{$tag}} terminée</p>
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
{{* version 0.33 *}}
|
|
||||||
{{:assign tag="0.33"}}
|
|
||||||
|
|
||||||
{{:include file="_compare_version.tpl" nv1=$module_version nv2=$tag keep="comp"}}
|
|
||||||
{{:assign module_comp=$comp}}
|
|
||||||
{{:include file="_compare_version.tpl" nv1=$module.config.version nv2=$tag keep="comp"}}
|
|
||||||
{{:assign config_comp=$comp}}
|
|
||||||
|
|
||||||
{{if $module_comp >= 0 && $config_comp < 0}}
|
|
||||||
{{* $module_version >= '0.33' && $module.config.version < '0.33' *}}
|
|
||||||
|
|
||||||
{{:include file="_upgrade_to033.tpl"}}
|
|
||||||
<p class="block info">Mise à jour vers version {{$tag}} terminée</p>
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
{{* enregistrer le nouveau numéro de version dans la config du module *}}
|
|
||||||
{{: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}}
|
|
||||||
|
|
||||||
{{:linkbutton label="Revenir à la page d'accueil du module" href="index.html" shape="right"}}
|
|
||||||
|
|
||||||
|
|
@ -17,20 +17,6 @@
|
||||||
{{:error message=$message}}
|
{{:error message=$message}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{:assign label_immo=$info_immo.label|or:$ligne_immo.trans_label}}
|
|
||||||
{{if $label_immo|strpos:$ligne_immo.line_label === false}}
|
|
||||||
{{:assign label_immo=$label_immo|cat:" — "|cat:$ligne_immo.line_label}}
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
{{:assign date_achat=$info_immo.date_achat|or:$ligne_immo.date_achat}}
|
|
||||||
{{if $info_immo.date_mes != null && $info_immo.date_mes != $date_achat}}
|
|
||||||
{{:assign date_mes=$info_immo.date_mes}}
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
{{if $info_immo.amount != null}}
|
|
||||||
{{:assign var="ligne_immo.amount" value=$info_immo.amount}}
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
{{* déduire le montant des écritures liées à l'immo courante au crédit du même compte *}}
|
{{* déduire le montant des écritures liées à l'immo courante au crédit du même compte *}}
|
||||||
{{:include file="_get_credit_lines.html" immo_doc_id=$_GET.immo_doc_id keep="total_credits"}}
|
{{:include file="_get_credit_lines.html" immo_doc_id=$_GET.immo_doc_id keep="total_credits"}}
|
||||||
{{:assign var="ligne_immo.amount" value="%d-%d"|math:$ligne_immo.amount:$total_credits}}
|
{{:assign var="ligne_immo.amount" value="%d-%d"|math:$ligne_immo.amount:$total_credits}}
|
||||||
|
|
@ -59,8 +45,19 @@
|
||||||
{{:assign vnc_code="652"}}
|
{{:assign vnc_code="652"}}
|
||||||
{{:assign cession_code="757"}}
|
{{:assign cession_code="757"}}
|
||||||
|
|
||||||
|
{{* TODO : faut-il forcer les 3 sélecteurs de compte d'amortissement à avoir toujours la même valeur ? *}}
|
||||||
|
|
||||||
{{* Traiter l'envoi du formulaire *}}
|
{{* Traiter l'envoi du formulaire *}}
|
||||||
{{#form on="save"}}
|
{{#form on="save"}}
|
||||||
|
{{*
|
||||||
|
{{if $_POST.amort_comp_account != null}
|
||||||
|
{{:assign account=$_POST.amort_comp_account}}
|
||||||
|
{{elseif $_POST.amort_except_account != null}
|
||||||
|
{{:assign account=$_POST.amort_except_account}}
|
||||||
|
{{elseif $_POST.amort_sortie_account != null}
|
||||||
|
{{:assign account=$_POST.amort_sortie_account}}
|
||||||
|
{{/if}}
|
||||||
|
*}}
|
||||||
{{:assign account=$_POST.amort_sortie_account}}
|
{{:assign account=$_POST.amort_sortie_account}}
|
||||||
|
|
||||||
{{:include
|
{{:include
|
||||||
|
|
@ -81,7 +78,7 @@
|
||||||
}}
|
}}
|
||||||
{{:assign comp_account_code=$account_code|keys|value:0}}
|
{{:assign comp_account_code=$account_code|keys|value:0}}
|
||||||
|
|
||||||
{{:assign libelle="Amortissement complémentaire "|cat:$label_immo}}
|
{{:assign libelle="Amortissement complémentaire "|cat:$ligne_immo.trans_label}}
|
||||||
{{:assign
|
{{:assign
|
||||||
var="lines."
|
var="lines."
|
||||||
debit="%f/100"|math:$amort_comp
|
debit="%f/100"|math:$amort_comp
|
||||||
|
|
@ -106,7 +103,7 @@
|
||||||
keep="account_code"
|
keep="account_code"
|
||||||
}}
|
}}
|
||||||
{{:assign except_account_code=$account_code|keys|value:0}}
|
{{:assign except_account_code=$account_code|keys|value:0}}
|
||||||
{{:assign libelle="Amortissement exceptionnel "|cat:$label_immo}}
|
{{:assign libelle="Amortissement exceptionnel "|cat:$ligne_immo.trans_label}}
|
||||||
{{:assign
|
{{:assign
|
||||||
var="lines."
|
var="lines."
|
||||||
debit="%f/100"|math:$amort_except
|
debit="%f/100"|math:$amort_except
|
||||||
|
|
@ -132,7 +129,7 @@
|
||||||
id_year=$_GET.year
|
id_year=$_GET.year
|
||||||
type="advanced"
|
type="advanced"
|
||||||
date=$_GET.exit_date
|
date=$_GET.exit_date
|
||||||
label="Amortissement final "|cat:$label_immo
|
label="Amortissement final "|cat:$ligne_immo.trans_label
|
||||||
lines=$lines
|
lines=$lines
|
||||||
linked_transactions=$ligne_immo.trans_id
|
linked_transactions=$ligne_immo.trans_id
|
||||||
}}
|
}}
|
||||||
|
|
@ -159,7 +156,7 @@
|
||||||
keep="account_code"
|
keep="account_code"
|
||||||
}}
|
}}
|
||||||
{{:assign immo_account_code=$account_code|keys|value:0}}
|
{{:assign immo_account_code=$account_code|keys|value:0}}
|
||||||
{{:assign libelle="Sortie du bilan de "|cat:$label_immo}}
|
{{:assign libelle="Sortie du bilan de "|cat:$ligne_immo.trans_label}}
|
||||||
{{:assign
|
{{:assign
|
||||||
var="lines."
|
var="lines."
|
||||||
account=$immo_account_code
|
account=$immo_account_code
|
||||||
|
|
@ -219,7 +216,7 @@
|
||||||
|
|
||||||
{{if $montant_cession > 0}}
|
{{if $montant_cession > 0}}
|
||||||
{{* Cession de l'immobilisation *}}
|
{{* Cession de l'immobilisation *}}
|
||||||
{{:assign libelle="Produit cession "|cat:$label_immo}}
|
{{:assign libelle="Produit cession "|cat:$ligne_immo.trans_label}}
|
||||||
{{:include
|
{{:include
|
||||||
file="_get_codes.html"
|
file="_get_codes.html"
|
||||||
account=$_POST.creance_account
|
account=$_POST.creance_account
|
||||||
|
|
@ -336,7 +333,7 @@
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
{{:assign patterns=$pattern_array|implode:"|"}}
|
{{:assign patterns=$pattern_array|implode:"|"}}
|
||||||
|
|
||||||
<h3>Sortir l'immobilisation « {{$label_immo}} » du bilan</h3>
|
<h3>Sortir l'immobilisation « {{$ligne_immo.trans_label}} » du bilan</h3>
|
||||||
<form method="post" action="">
|
<form method="post" action="">
|
||||||
|
|
||||||
<div class="informations">
|
<div class="informations">
|
||||||
|
|
@ -345,10 +342,10 @@
|
||||||
<dt>Montant</dt>
|
<dt>Montant</dt>
|
||||||
<dd class="money">{{$ligne_immo.amount|money_currency_html:false|raw}}</dd>
|
<dd class="money">{{$ligne_immo.amount|money_currency_html:false|raw}}</dd>
|
||||||
<dt>Date d'acquisition</dt>
|
<dt>Date d'acquisition</dt>
|
||||||
<dd >{{$date_achat|date_short}}</dd>
|
<dd >{{$ligne_immo.date_achat|date_short}}</dd>
|
||||||
{{if $date_mes != null}}
|
{{if $info_immo.date_mes != null && $info_immo.date_mes != $ligne_immo.date_achat}}
|
||||||
<dt>Date de mise en service</dt>
|
<dt>Date de mise en service</dt>
|
||||||
<dd>{{$date_mes|date_short}}</dd>
|
<dd>{{$info_immo.date_mes|date_short}}</dd>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<dt>Durée de l'amortissement</dt>
|
<dt>Durée de l'amortissement</dt>
|
||||||
<dd class="num">{{$info_immo.duration}} ans</dd>
|
<dd class="num">{{$info_immo.duration}} ans</dd>
|
||||||
|
|
|
||||||