Affichage écritures ignorées
This commit is contained in:
parent
688cada3e8
commit
e3bbdf7574
2 changed files with 49 additions and 23 deletions
|
@ -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>
|
||||||
|
|
|
@ -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}}
|
||||||
|
|
Loading…
Add table
Reference in a new issue