Amélioration et simplification classement immobilisation
This commit is contained in:
parent
f32e1d1a51
commit
53695b6547
4 changed files with 36 additions and 48 deletions
|
|
@ -158,21 +158,12 @@
|
||||||
<td class="money">{{"%d-%d"|math:$montant_immo:$amort_amount|money_html:false|raw}}</td>
|
<td class="money">{{"%d-%d"|math:$montant_immo:$amort_amount|money_html:false|raw}}</td>
|
||||||
<td><a href={{$compte_url}}>{{$account_code}}</a></td>
|
<td><a href={{$compte_url}}>{{$account_code}}</a></td>
|
||||||
<td class="actions">
|
<td class="actions">
|
||||||
{{if ! $exist_amort}}
|
|
||||||
{{:linkbutton
|
{{:linkbutton
|
||||||
label="Paramètres"
|
label="Paramètres"
|
||||||
href="add_infos.html?immo_id=%s&type_immo=%s"|args:$immo_id:$type_immo
|
href="add_infos.html?immo_id=%s&type_immo=%s"|args:$immo_id:$type_immo
|
||||||
shape="settings"
|
shape="settings"
|
||||||
target="_dialog"
|
target="_dialog"
|
||||||
}}
|
}}
|
||||||
{{elseif $status == "unknown"}}
|
|
||||||
{{:linkbutton
|
|
||||||
label="Paramètres"
|
|
||||||
href="add_infos.html?immo_id=%s&type_immo=%s"|args:$immo_id:$type_immo
|
|
||||||
shape="settings"
|
|
||||||
target="_dialog"
|
|
||||||
}}
|
|
||||||
{{/if}}
|
|
||||||
{{:linkbutton
|
{{:linkbutton
|
||||||
label="Amortissements"
|
label="Amortissements"
|
||||||
href="amortization.html?immo_id=%s&type_immo=%s"|args:$immo_id:$type_immo
|
href="amortization.html?immo_id=%s&type_immo=%s"|args:$immo_id:$type_immo
|
||||||
|
|
|
||||||
|
|
@ -154,21 +154,12 @@
|
||||||
<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 class="actions">
|
||||||
{{if $status == "unknown"}}
|
|
||||||
{{:linkbutton
|
{{:linkbutton
|
||||||
label="Paramètres"
|
label="Paramètres"
|
||||||
href="add_infos.html?immo_id=%s&type_immo=other"|args:$immo_id
|
href="add_infos.html?immo_id=%s&type_immo=other"|args:$immo_id
|
||||||
shape="settings"
|
shape="settings"
|
||||||
target="_dialog"
|
target="_dialog"
|
||||||
}}
|
}}
|
||||||
{{else}}
|
|
||||||
{{:linkbutton
|
|
||||||
label="Paramètres"
|
|
||||||
href="add_infos.html?immo_id=%s&type_immo=other"|args:$immo_id
|
|
||||||
shape="settings"
|
|
||||||
target="_dialog"
|
|
||||||
}}
|
|
||||||
{{/if}}
|
|
||||||
{{:linkbutton
|
{{:linkbutton
|
||||||
label="Amortissements"
|
label="Amortissements"
|
||||||
href="amortization.html?immo_id=%s&type_immo=other"|args:$immo_id
|
href="amortization.html?immo_id=%s&type_immo=other"|args:$immo_id
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,9 @@
|
||||||
@param type_immo : managed, amortized, archived, other
|
@param type_immo : managed, amortized, archived, other
|
||||||
*}}
|
*}}
|
||||||
|
|
||||||
|
{{* données de l'immobilisaion *}}
|
||||||
{{#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}}
|
||||||
|
|
||||||
{{* données de l'immobilisaion *}}
|
|
||||||
{{#select
|
{{#select
|
||||||
trans.date as date_achat,
|
trans.date as date_achat,
|
||||||
line.debit as montant
|
line.debit as montant
|
||||||
|
|
@ -22,6 +21,7 @@
|
||||||
|
|
||||||
{{* Traiter l'envoi du formulaire *}}
|
{{* Traiter l'envoi du formulaire *}}
|
||||||
{{#form on="save"}}
|
{{#form on="save"}}
|
||||||
|
|
||||||
{{if $_POST.classify == null}}
|
{{if $_POST.classify == null}}
|
||||||
{{:error message="Vous devez choisir une action"}}
|
{{:error message="Vous devez choisir une action"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
@ -42,8 +42,19 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{if $_POST.classify == "amortized"}}
|
{{if $_POST.classify == "amortized"}}
|
||||||
|
{{if $info_immo.duration == null}}
|
||||||
{{:assign duration=0}}
|
{{:assign duration=0}}
|
||||||
|
{{else}}
|
||||||
|
{{:assign duration=$info_immo.duration}}
|
||||||
|
{{/if}}
|
||||||
{{:assign status="amortized"}}
|
{{:assign status="amortized"}}
|
||||||
|
{{elseif $_POST.classify == "archived"}}
|
||||||
|
{{if $info_immo.duration == null}}
|
||||||
|
{{:assign duration=0}}
|
||||||
|
{{else}}
|
||||||
|
{{:assign duration=$info_immo.duration}}
|
||||||
|
{{/if}}
|
||||||
|
{{:assign status="archived"}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{:assign duration=$_POST.duree|intval}}
|
{{:assign duration=$_POST.duree|intval}}
|
||||||
{{if $duration <= 0}}
|
{{if $duration <= 0}}
|
||||||
|
|
@ -84,18 +95,14 @@
|
||||||
{{:form_errors}}
|
{{:form_errors}}
|
||||||
{{/form}}
|
{{/form}}
|
||||||
|
|
||||||
{{:admin_header title="Informations amortissement" custom_css=$custom_css current="module_amortization"}}
|
{{:admin_header title="Classer l'immobilisation" custom_css=$custom_css current="module_amortization"}}
|
||||||
|
|
||||||
{{* barre de navigation *}}
|
{{* barre de navigation *}}
|
||||||
{{if ! $dialog}}
|
{{if ! $dialog}}
|
||||||
{{:include file="_nav.html" current="index"}}
|
{{:include file="_nav.html" current="index"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{if $info_immo == null}}
|
{{:assign choix_defaut=$_GET.type_immo}}
|
||||||
{{:assign default=$_GET.type_immo}}
|
|
||||||
{{else}}
|
|
||||||
{{:assign default=$info_immo.status}}
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
{{if $info_immo != null}}
|
{{if $info_immo != null}}
|
||||||
{{:assign date_defaut=$info_immo.date}}
|
{{:assign date_defaut=$info_immo.date}}
|
||||||
|
|
@ -116,20 +123,19 @@
|
||||||
<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="Amortir" default=$default}}
|
{{:input type="radio-btn" name="classify" value="managed" label="Immobilisation à amortir" help="Cette immobilisation sera classée parmi les immobilisations amortissables" default=$choix_defaut}}
|
||||||
{{:input type="radio-btn" name="classify" value="amortized" label="Amortissement terminé" help="Cette immobilisation sera classée parmi les immobilisations amorties" default=$default}}
|
{{:input type="radio-btn" name="classify" value="amortized" label="Amortissement terminé" help="Cette immobilisation sera classée parmi les immobilisations amorties" default=$choix_defaut}}
|
||||||
{{:input type="radio-btn" name="classify" value="ignored" label="Ignorer l'écriture" help="Cette écriture n'apparaitra plus dans la liste des immobilisations" default=$default}}
|
{{:input type="radio-btn" name="classify" value="archived" label="Immobilisation sortie du bilan" help="Cette immobilisation sera classée parmi les immobilisations sorties du bilan" default=$choix_defaut}}
|
||||||
|
{{:input type="radio-btn" name="classify" value="ignored" label="Immobilisation à ignorer" help="Cette écriture n'apparaitra plus dans la liste des immobilisations" default=$choix_defaut}}
|
||||||
</dl>
|
</dl>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<fieldset id="infos_immo">
|
<fieldset id="infos_immo">
|
||||||
<legend>Informations</legend>
|
<legend>Informations</legend>
|
||||||
<dl>
|
<dl>
|
||||||
<div id="div_inputs">
|
|
||||||
{{:input type="number" name="duree" label="Durée d'amortissement" default=$duree_defaut required=true min=1}}
|
{{:input type="number" name="duree" label="Durée d'amortissement" default=$duree_defaut required=true min=1}}
|
||||||
{{:input type="money" name="montant" label="Montant" default=$montant_defaut help="à renseigner uniquement si différent du montant de l'acquisition"}}
|
{{:input type="money" name="montant" label="Montant" default=$montant_defaut help="à renseigner uniquement si différent du montant de l'acquisition"}}
|
||||||
{{:input type="date" name="date_mes" label="Date de mise en service" default=$date_defaut help="à renseigner uniquement si différente de la date d'acquisition"}}
|
{{:input type="date" name="date_mes" label="Date de mise en service" default=$date_defaut help="à renseigner uniquement si différente de la date d'acquisition"}}
|
||||||
</div>
|
|
||||||
</dl>
|
</dl>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
name="Amortissements"
|
name="Amortissements"
|
||||||
description="Immobilisations et amortissements\nversion 0.27"
|
description="Immobilisations et amortissements\nversion 0.28"
|
||||||
author="Jean-Christophe Engel"
|
author="Jean-Christophe Engel"
|
||||||
author_url="https://gitea.zaclys.com/lesanges"
|
author_url="https://gitea.zaclys.com/lesanges"
|
||||||
home_button=false
|
home_button=false
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue