Compare commits
2 commits
eae9a2f31c
...
e3bbdf7574
Author | SHA1 | Date | |
---|---|---|---|
![]() |
e3bbdf7574 | ||
![]() |
688cada3e8 |
9 changed files with 84 additions and 57 deletions
|
@ -3,9 +3,9 @@
|
||||||
{{* Liste des immobilisations en cours ou amorties *}}
|
{{* Liste des immobilisations en cours ou amorties *}}
|
||||||
|
|
||||||
<section class="immobilisation">
|
<section class="immobilisation">
|
||||||
{{if $type_immo == "encours"}}
|
{{if $type_immo == "managed"}}
|
||||||
<h2 class="ruler">Immobilisations en cours</h2>
|
<h2 class="ruler">Immobilisations en cours</h2>
|
||||||
{{elseif $type_immo == "amortie"}}
|
{{elseif $type_immo == "amortized"}}
|
||||||
<h2 class="ruler">Immobilisations amorties</h2>
|
<h2 class="ruler">Immobilisations amorties</h2>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{:assign nb_immo=0}}
|
{{:assign nb_immo=0}}
|
||||||
|
@ -133,10 +133,11 @@
|
||||||
|
|
||||||
|
|
||||||
{{* classement par onglet *}}
|
{{* classement par onglet *}}
|
||||||
{{if $type_immo == "encours" && $amort_amount >= $debit}}{{:continue}}{{/if}}
|
{{if $type_immo == "managed" && $amort_amount >= $debit}}{{:continue}}{{/if}}
|
||||||
{{if $type_immo == "encours" && $status == "amortized"}}{{:continue}}{{/if}}
|
{{if $type_immo == "managed" && $status == "amortized"}}{{:continue}}{{/if}}
|
||||||
{{if $status == "unknown" && ! $exist_amort}}{{:continue}}{{/if}}
|
{{if $status == "unknown" && ! $exist_amort}}{{:continue}}{{/if}}
|
||||||
{{if $type_immo == "amortie" && $amort_amount < $debit && $status != "amortized"}}{{:continue}}{{/if}}
|
{{if $type_immo == "amortized" && $amort_amount < $debit && $status != "amortized"}}{{:continue}}{{/if}}
|
||||||
|
|
||||||
{{:assign nb_immo="%d+1"|math:$nb_immo}}
|
{{:assign nb_immo="%d+1"|math:$nb_immo}}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="num"><a href={{$trans_url}}>#{{$trans_id}}</a></td>
|
<td class="num"><a href={{$trans_url}}>#{{$trans_id}}</a></td>
|
||||||
|
@ -150,14 +151,14 @@
|
||||||
{{if ! $exist_amort}}
|
{{if ! $exist_amort}}
|
||||||
{{:linkbutton
|
{{:linkbutton
|
||||||
label="Paramètres"
|
label="Paramètres"
|
||||||
href="add_infos.html?immo_id=%s&amort=1&op=modif&type_immo=%s"|args:$immo_id:$type_immo
|
href="add_infos.html?immo_id=%s&op=modif&type_immo=%s"|args:$immo_id:$type_immo
|
||||||
shape="settings"
|
shape="settings"
|
||||||
target="_dialog"
|
target="_dialog"
|
||||||
}}
|
}}
|
||||||
{{elseif $status == "unknown"}}
|
{{elseif $status == "unknown"}}
|
||||||
{{:linkbutton
|
{{:linkbutton
|
||||||
label="Paramètres"
|
label="Paramètres"
|
||||||
href="add_infos.html?immo_id=%s&amort=1&op=new&type_immo=%s"|args:$immo_id:$type_immo
|
href="add_infos.html?immo_id=%s&op=new&type_immo=%s"|args:$immo_id:$type_immo
|
||||||
shape="settings"
|
shape="settings"
|
||||||
target="_dialog"
|
target="_dialog"
|
||||||
}}
|
}}
|
||||||
|
|
|
@ -6,6 +6,12 @@
|
||||||
<h2 class="ruler">Autres immobilisations</h2>
|
<h2 class="ruler">Autres immobilisations</h2>
|
||||||
{{:assign nb_immo=0}}
|
{{:assign nb_immo=0}}
|
||||||
|
|
||||||
|
<form method="post" action="">
|
||||||
|
<fieldset>
|
||||||
|
{{:input type="checkbox" value=1 name="unhide" label="Afficher les écritures marquées ignorées" }}
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
|
||||||
<table class="list">
|
<table class="list">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -59,9 +65,15 @@
|
||||||
{{else}}
|
{{else}}
|
||||||
{{:assign status="unknown"}}
|
{{:assign status="unknown"}}
|
||||||
{{/load}}
|
{{/load}}
|
||||||
|
{{if $_POST.unhide == null}}
|
||||||
{{if $status != "unknown"}}
|
{{if $status != "unknown"}}
|
||||||
{{:continue}}
|
{{:continue}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
{{else}}
|
||||||
|
{{if $status != "ignored" && $status != "unknown"}}
|
||||||
|
{{:continue}}
|
||||||
|
{{/if}}
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
{{* voir s'il existe des écritures d'amortissement associées *}}
|
{{* voir s'il existe des écritures d'amortissement associées *}}
|
||||||
{{#select
|
{{#select
|
||||||
|
@ -88,7 +100,7 @@
|
||||||
account.code LIKE '28%';
|
account.code LIKE '28%';
|
||||||
:line_id = $immo_id|intval
|
:line_id = $immo_id|intval
|
||||||
}}
|
}}
|
||||||
{{if $status == "unknown" && $amort_amount != null}}
|
{{if $amort_amount != null}}
|
||||||
{{:assign ignore=true}}
|
{{:assign ignore=true}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{:assign ignore=false}}
|
{{:assign ignore=false}}
|
||||||
|
@ -111,14 +123,14 @@
|
||||||
{{if $status == "unknown"}}
|
{{if $status == "unknown"}}
|
||||||
{{:linkbutton
|
{{:linkbutton
|
||||||
label="Paramètres"
|
label="Paramètres"
|
||||||
href="add_infos.html?immo_id=%s&amort=0&op=new&type_immo=autre"|args:$immo_id
|
href="add_infos.html?immo_id=%s&op=new&type_immo=autre"|args:$immo_id
|
||||||
shape="settings"
|
shape="settings"
|
||||||
target="_dialog"
|
target="_dialog"
|
||||||
}}
|
}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{:linkbutton
|
{{:linkbutton
|
||||||
label="Paramètres"
|
label="Paramètres"
|
||||||
href="add_infos.html?immo_id=%s&amort=0&op=modif&type_immo=autre"|args:$immo_id
|
href="add_infos.html?immo_id=%s&op=modif&type_immo=autre"|args:$immo_id
|
||||||
shape="settings"
|
shape="settings"
|
||||||
target="_dialog"
|
target="_dialog"
|
||||||
}}
|
}}
|
||||||
|
@ -137,3 +149,15 @@
|
||||||
<p class="block alert">Aucune immobilisation</p>
|
<p class="block alert">Aucune immobilisation</p>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
function changeVisibility(evt, idcheck = 'f_unhide_1') {
|
||||||
|
this.form.dispatchEvent(new Event('submit'));
|
||||||
|
this.form.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
(function () {
|
||||||
|
document.getElementById('f_unhide_1').onclick = changeVisibility;
|
||||||
|
})();
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
18
_nav.html
18
_nav.html
|
@ -1,11 +1,11 @@
|
||||||
{{* -*- brindille -*- *}}
|
{{* -*- brindille -*- *}}
|
||||||
|
|
||||||
<nav class="tabs">
|
<nav class="tabs">
|
||||||
{{if $current == 'index' && $subsubcurrent == null}}
|
{{if $current == "index" && $subsubcurrent == null}}
|
||||||
<aside>
|
<aside>
|
||||||
{{:linkbutton label="Ajouter une immobilisation" shape="plus" href="add_asset.html" target="_dialog"}}
|
{{:linkbutton label="Ajouter une immobilisation" shape="plus" href="add_asset.html" target="_dialog"}}
|
||||||
</aside>
|
</aside>
|
||||||
{{elseif $subsubcurrent == "amortization" && $type_immo == null || $type_immo == "encours" || $type_immo == "autre"}}
|
{{elseif $subsubcurrent == "amortization" && $type_immo == null || $type_immo == "managed" || $type_immo == "other"}}
|
||||||
<aside>
|
<aside>
|
||||||
{{if $autres_amort != null}}
|
{{if $autres_amort != null}}
|
||||||
{{:linkbutton label="Attacher un amortissement" href="other_amortizations.html?immo_id=%s"|args:$_GET.immo_id shape="plus" target="_dialog"}}
|
{{:linkbutton label="Attacher un amortissement" href="other_amortizations.html?immo_id=%s"|args:$_GET.immo_id shape="plus" target="_dialog"}}
|
||||||
|
@ -15,20 +15,20 @@
|
||||||
</aside>
|
</aside>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{if $current == 'index'}} {{* && $subsubcurrent != 'balance_exit' *}}
|
{{if $current == "index"}} {{* && $subsubcurrent != "balance_exit" *}}
|
||||||
<ul>
|
<ul>
|
||||||
<li {{if $subcurrent == 'encours'}}class="current"{{/if}}><a href="index.html?type_immo=encours">En cours</a></li>
|
<li {{if $subcurrent == "managed"}}class="current"{{/if}}><a href="index.html?type_immo=managed">En cours</a></li>
|
||||||
<li {{if $subcurrent == 'amortie'}}class="current"{{/if}}><a href="index.html?type_immo=amortie">Amorties</a></li>
|
<li {{if $subcurrent == "amortized"}}class="current"{{/if}}><a href="index.html?type_immo=amortized">Amorties</a></li>
|
||||||
<li {{if $subcurrent == 'sortie'}}class="current"{{/if}}><a href="index.html?type_immo=sortie">Sorties du bilan</a></li>
|
<li {{if $subcurrent == "archived"}}class="current"{{/if}}><a href="index.html?type_immo=archived">Sorties du bilan</a></li>
|
||||||
<li {{if $subcurrent == 'autre'}}class="current"{{/if}}><a href="index.html?type_immo=autre">Autres</a></li>
|
<li {{if $subcurrent == "other"}}class="current"{{/if}}><a href="index.html?type_immo=other">Autres</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{if $subsubcurrent == 'amortization'}}
|
{{if $subsubcurrent == "amortization"}}
|
||||||
<ul class="sub">
|
<ul class="sub">
|
||||||
<li class="title"><strong>Amortissements</strong></li>
|
<li class="title"><strong>Amortissements</strong></li>
|
||||||
</ul>
|
</ul>
|
||||||
{{elseif $subsubcurrent == 'balance_exit'}}
|
{{elseif $subsubcurrent == "balance_exit"}}
|
||||||
<ul class="sub">
|
<ul class="sub">
|
||||||
<li class="title"><strong>Sortie de bilan</strong></li>
|
<li class="title"><strong>Sortie de bilan</strong></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -117,9 +117,9 @@
|
||||||
status=$status
|
status=$status
|
||||||
}}
|
}}
|
||||||
{{if $_POST.amortir}}
|
{{if $_POST.amortir}}
|
||||||
{{:assign type_immo="encours"}}
|
{{:assign type_immo="managed"}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{:assign type_immo="autre"}}
|
{{:assign type_immo="other"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{:redirect force="index.html?ok=1&msg=immobilisation&type_immo=%s"|args:$type_immo}}
|
{{:redirect force="index.html?ok=1&msg=immobilisation&type_immo=%s"|args:$type_immo}}
|
||||||
{{/form}}
|
{{/form}}
|
||||||
|
|
|
@ -2,15 +2,12 @@
|
||||||
|
|
||||||
{{*
|
{{*
|
||||||
@param immo_id
|
@param immo_id
|
||||||
@param amort = 1 si immo amortissable, 0 si non
|
|
||||||
@param op = new ou modif
|
@param op = new ou modif
|
||||||
@param type_immo : encours, amortie, sortie, autre
|
@param type_immo : managed, amortized, archived, other
|
||||||
*}}
|
*}}
|
||||||
|
|
||||||
{{if $_GET.op == "modif"}}
|
|
||||||
{{#load type="immo" assign="info_immo" where="$$.line = :line_id" :line_id=$_GET.immo_id|intval}}
|
{{#load type="immo" assign="info_immo" where="$$.line = :line_id" :line_id=$_GET.immo_id|intval}}
|
||||||
{{/load}}
|
{{/load}}
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
{{* Traiter l'envoi du formulaire *}}
|
{{* Traiter l'envoi du formulaire *}}
|
||||||
{{#form on="save"}}
|
{{#form on="save"}}
|
||||||
|
@ -70,10 +67,8 @@
|
||||||
status=$status
|
status=$status
|
||||||
}}
|
}}
|
||||||
|
|
||||||
{{if $_POST.classify == "managed"}}
|
{{if $_POST.classify == "managed" || $_POST.classify == "amortized"}}
|
||||||
{{:assign type_immo="encours"}}
|
{{:assign type_immo=$_POST.classify}}
|
||||||
{{elseif $_POST.classify == "amortized"}}
|
|
||||||
{{:assign type_immo="amortie"}}
|
|
||||||
{{else}}
|
{{else}}
|
||||||
{{:assign type_immo=$_GET.type_immo}}
|
{{:assign type_immo=$_GET.type_immo}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -89,23 +84,30 @@
|
||||||
{{:include file="_nav.html" current="index"}}
|
{{:include file="_nav.html" current="index"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{* renseigner ou modifier la date de mise en service et la durée d'amortissement *}}
|
{{if $info_immo == null}}
|
||||||
{{if $_GET.amort == 0}}
|
{{:assign default=$_GET.type_immo}}
|
||||||
{{:assign disabled=1}}
|
|
||||||
{{:assign default=""}}
|
|
||||||
{{else}}
|
{{else}}
|
||||||
{{:assign disabled=0}}
|
{{:assign default=$info_immo.status}}
|
||||||
{{:assign default="managed"}}
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
{{if $_GET.type_immo == "managed" || $_GET.type_immo == "amortized"}}
|
||||||
|
{{:assign disabled=0}}
|
||||||
|
{{else}}
|
||||||
|
{{:assign disabled=1}}
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
{{*
|
||||||
|
- classer l'immobilisation
|
||||||
|
- renseigner ou modifier la date de mise en service et la durée d'amortissement
|
||||||
|
*}}
|
||||||
<form method="post" action="">
|
<form method="post" action="">
|
||||||
<fieldset id="infos_immo">
|
<fieldset id="infos_immo">
|
||||||
<legend></legend>
|
<legend></legend>
|
||||||
<dl>
|
<dl>
|
||||||
<dt><label>Faites un choix</label> <b>(obligatoire)</b></dt>
|
<dt><label>Faites un choix</label> <b>(obligatoire)</b></dt>
|
||||||
{{:input type="radio" name="classify" value="managed" label="Amortir" help="Amortir cette immobilisation" default=$default onclick="toggleInputs('div_inputs','f_classify_managed', 'f_classify_amortized')"}}
|
{{:input type="radio" name="classify" value="managed" label="Amortir" help="Amortir cette immobilisation" default=$default onclick="toggleInputs('div_inputs','f_classify_managed', 'f_classify_amortized')"}}
|
||||||
{{:input type="radio" name="classify" value="amortized" label="Marquer amortie" help="Cette immobilisation sera classée parmi les immobilisations amorties" onclick="toggleInputs('div_inputs','f_classify_managed', 'f_classify_amortized')"}}
|
{{:input type="radio" name="classify" value="amortized" label="Amortissement terminé" help="Cette immobilisation sera classée parmi les immobilisations amorties" default=$default onclick="toggleInputs('div_inputs','f_classify_managed', 'f_classify_amortized')"}}
|
||||||
{{:input type="radio" name="classify" value="ignored" label="Ignorer l'écriture" help="Cette écriture n'apparaitra plus dans la liste des immobilisations" onclick="toggleInputs('div_inputs','f_classify_managed', 'f_classify_amortized')"}}
|
{{:input type="radio" name="classify" value="ignored" label="Ignorer l'écriture" help="Cette écriture n'apparaitra plus dans la liste des immobilisations" default=$default onclick="toggleInputs('div_inputs','f_classify_managed', 'f_classify_amortized')"}}
|
||||||
|
|
||||||
{{if $info_immo != null}}
|
{{if $info_immo != null}}
|
||||||
{{:assign date_defaut=$info_immo.date}}
|
{{:assign date_defaut=$info_immo.date}}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
{{*
|
{{*
|
||||||
Lister les écritures d'amortissement associées à une immobilisation
|
Lister les écritures d'amortissement associées à une immobilisation
|
||||||
@param immo_id : id de la ligne d'immo
|
@param immo_id : id de la ligne d'immo
|
||||||
@param type_immo : encours, amortie, sortie, autres
|
@param type_immo : managed, amortized, archived, others
|
||||||
*}}
|
*}}
|
||||||
|
|
||||||
{{* récupérer les infos de l'immobilisation *}}
|
{{* récupérer les infos de l'immobilisation *}}
|
||||||
|
@ -114,14 +114,14 @@
|
||||||
{{:admin_header title="Liste des amortissements" custom_css="./style.css" current="module_amortissement"}}
|
{{:admin_header title="Liste des amortissements" custom_css="./style.css" current="module_amortissement"}}
|
||||||
|
|
||||||
{{* barre de navigation *}}
|
{{* barre de navigation *}}
|
||||||
{{if $_GET.type_immo == "amortie" || $valeur_residuelle== 0 }}
|
{{if $_GET.type_immo == "amortized" || $valeur_residuelle== 0 }}
|
||||||
{{:assign subcurrent="amortie"}}
|
{{:assign subcurrent="amortized"}}
|
||||||
{{elseif $_GET.type_immo == "sortie"}}
|
{{elseif $_GET.type_immo == "archived"}}
|
||||||
{{:assign subcurrent="sortie"}}
|
{{:assign subcurrent="archived"}}
|
||||||
{{elseif $_GET.type_immo == null || $_GET.type_immo == "encours"}}
|
{{elseif $_GET.type_immo == null || $_GET.type_immo == "managed"}}
|
||||||
{{:assign subcurrent="encours"}}
|
{{:assign subcurrent="managed"}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{:assign subcurrent="autre"}}
|
{{:assign subcurrent="other"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{:include
|
{{:include
|
||||||
|
@ -241,7 +241,7 @@
|
||||||
<p class="block alert">Aucun amortissement enregistré pour cette immobilisation</p>
|
<p class="block alert">Aucun amortissement enregistré pour cette immobilisation</p>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{if $_GET.type_immo == null || $_GET.type_immo != "amortie"}}
|
{{if $_GET.type_immo == null || $_GET.type_immo != "amortized"}}
|
||||||
|
|
||||||
{{* Autres amortissements non rattachés *}}
|
{{* Autres amortissements non rattachés *}}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
{{* barre de navigation *}}
|
{{* barre de navigation *}}
|
||||||
{{if $_GET.type_immo == null}}
|
{{if $_GET.type_immo == null}}
|
||||||
{{:assign type_immo="encours"}}
|
{{:assign type_immo="managed"}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{:assign type_immo=$_GET.type_immo}}
|
{{:assign type_immo=$_GET.type_immo}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -34,11 +34,11 @@
|
||||||
{{/select}}
|
{{/select}}
|
||||||
{{/load}}
|
{{/load}}
|
||||||
|
|
||||||
{{if $type_immo == "autre"}}
|
{{if $type_immo == "other"}}
|
||||||
{{:include file="_immobilisations_autres.html"}}
|
{{:include file="_immobilisations_autres.html"}}
|
||||||
{{elseif $type_immo == "sortie"}}
|
{{elseif $type_immo == "archived"}}
|
||||||
{{:include file="_archives.html"}}
|
{{:include file="_archives.html"}}
|
||||||
{{elseif $type_immo == "encours" || $type_immo == "amortie"}}
|
{{elseif $type_immo == "managed" || $type_immo == "amortized"}}
|
||||||
{{:include file="_immobilisations.html"}}
|
{{:include file="_immobilisations.html"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
|
|
@ -61,9 +61,9 @@
|
||||||
{{:include
|
{{:include
|
||||||
file="_nav.html"
|
file="_nav.html"
|
||||||
current="index"
|
current="index"
|
||||||
subcurrent="autre"
|
subcurrent="other"
|
||||||
subsubcurrent="amortization"
|
subsubcurrent="amortization"
|
||||||
type_immo="autre"
|
type_immo="other"
|
||||||
autres_amort=$autres_amortissements
|
autres_amort=$autres_amortissements
|
||||||
}}
|
}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
@ -214,7 +214,7 @@
|
||||||
|
|
||||||
{{* barre de navigation *}}
|
{{* barre de navigation *}}
|
||||||
{{if ! $dialog}}
|
{{if ! $dialog}}
|
||||||
{{:include file="_nav.html" current="index" subcurrent="encours" subsubcurrent="amortization"}}
|
{{:include file="_nav.html" current="index" subcurrent="managed" subsubcurrent="amortization"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{:form_errors}}
|
{{:form_errors}}
|
||||||
|
|
Loading…
Add table
Reference in a new issue