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><a href={{$compte_url}}>{{$account_code}}</a></td>
|
||||
<td class="actions">
|
||||
{{if ! $exist_amort}}
|
||||
{{:linkbutton
|
||||
label="Paramètres"
|
||||
href="add_infos.html?immo_id=%s&type_immo=%s"|args:$immo_id:$type_immo
|
||||
shape="settings"
|
||||
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
|
||||
label="Amortissements"
|
||||
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>{{$account_label}}</td>
|
||||
<td class="actions">
|
||||
{{if $status == "unknown"}}
|
||||
{{:linkbutton
|
||||
label="Paramètres"
|
||||
href="add_infos.html?immo_id=%s&type_immo=other"|args:$immo_id
|
||||
shape="settings"
|
||||
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
|
||||
label="Amortissements"
|
||||
href="amortization.html?immo_id=%s&type_immo=other"|args:$immo_id
|
||||
|
|
|
|||
|
|
@ -5,10 +5,9 @@
|
|||
@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}}
|
||||
|
||||
{{* données de l'immobilisaion *}}
|
||||
{{#select
|
||||
trans.date as date_achat,
|
||||
line.debit as montant
|
||||
|
|
@ -22,6 +21,7 @@
|
|||
|
||||
{{* Traiter l'envoi du formulaire *}}
|
||||
{{#form on="save"}}
|
||||
|
||||
{{if $_POST.classify == null}}
|
||||
{{:error message="Vous devez choisir une action"}}
|
||||
{{/if}}
|
||||
|
|
@ -42,8 +42,19 @@
|
|||
{{/if}}
|
||||
|
||||
{{if $_POST.classify == "amortized"}}
|
||||
{{if $info_immo.duration == null}}
|
||||
{{:assign duration=0}}
|
||||
{{else}}
|
||||
{{:assign duration=$info_immo.duration}}
|
||||
{{/if}}
|
||||
{{: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}}
|
||||
{{:assign duration=$_POST.duree|intval}}
|
||||
{{if $duration <= 0}}
|
||||
|
|
@ -84,18 +95,14 @@
|
|||
{{:form_errors}}
|
||||
{{/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 *}}
|
||||
{{if ! $dialog}}
|
||||
{{:include file="_nav.html" current="index"}}
|
||||
{{/if}}
|
||||
|
||||
{{if $info_immo == null}}
|
||||
{{:assign default=$_GET.type_immo}}
|
||||
{{else}}
|
||||
{{:assign default=$info_immo.status}}
|
||||
{{/if}}
|
||||
{{:assign choix_defaut=$_GET.type_immo}}
|
||||
|
||||
{{if $info_immo != null}}
|
||||
{{:assign date_defaut=$info_immo.date}}
|
||||
|
|
@ -116,20 +123,19 @@
|
|||
<legend>Classement</legend>
|
||||
<dl id="classement_immo">
|
||||
<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="amortized" label="Amortissement terminé" help="Cette immobilisation sera classée parmi les immobilisations amorties" default=$default}}
|
||||
{{: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="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=$choix_defaut}}
|
||||
{{: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>
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="infos_immo">
|
||||
<legend>Informations</legend>
|
||||
<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="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>
|
||||
</fieldset>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
name="Amortissements"
|
||||
description="Immobilisations et amortissements\nversion 0.27"
|
||||
description="Immobilisations et amortissements\nversion 0.28"
|
||||
author="Jean-Christophe Engel"
|
||||
author_url="https://gitea.zaclys.com/lesanges"
|
||||
home_button=false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue