Compare commits
No commits in common. "7a41c43ea322497b4d855f22dc5cd5a4faf1e439" and "472b5551b17ea83f27934db98574ad3fdd5cf1be" have entirely different histories.
7a41c43ea3
...
472b5551b1
7 changed files with 80 additions and 34 deletions
|
@ -78,6 +78,8 @@
|
|||
{{/select}}
|
||||
|
||||
<section class="immobilisation">
|
||||
<h2 class="ruler">Immobilisations archivées</h2>
|
||||
|
||||
{{:assign nb_immo=0}}
|
||||
<table class="list">
|
||||
<thead>
|
||||
|
|
|
@ -3,6 +3,11 @@
|
|||
{{* Liste des immobilisations en cours ou amorties *}}
|
||||
|
||||
<section class="immobilisation">
|
||||
{{if $type_immo == "managed"}}
|
||||
<h2 class="ruler">Immobilisations en cours</h2>
|
||||
{{elseif $type_immo == "amortized"}}
|
||||
<h2 class="ruler">Immobilisations amorties</h2>
|
||||
{{/if}}
|
||||
{{:assign nb_immo=0}}
|
||||
|
||||
<table class="list">
|
||||
|
|
|
@ -3,12 +3,9 @@
|
|||
{{* Liste des immobilisations non amortissables ou non (encore) gérées *}}
|
||||
|
||||
<section class="immobilisation">
|
||||
<h2 class="ruler">Autres immobilisations</h2>
|
||||
{{:assign nb_immo=0}}
|
||||
|
||||
<p class="help">
|
||||
Cette page liste les écritures pas (encore) prises en charges par le module ou classées non amortissables
|
||||
</p>
|
||||
|
||||
<form method="post" action="">
|
||||
<fieldset>
|
||||
{{:input type="checkbox" value=1 name="unhide" label="Afficher les écritures marquées ignorées" }}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
{{elseif $subsubcurrent == "amortization" && $type_immo == null || $type_immo == "managed" || $type_immo == "other"}}
|
||||
<aside>
|
||||
{{if $autres_amort != null}}
|
||||
{{:linkbutton label="Rattacher une écriture" href="other_amortizations.html?immo_id=%s"|args:$_GET.immo_id shape="link" target="_dialog"}}
|
||||
{{:linkbutton label="Attacher un amortissement" href="other_amortizations.html?immo_id=%s"|args:$_GET.immo_id shape="plus" target="_dialog"}}
|
||||
{{/if}}
|
||||
{{:linkbutton label="Enregistrer un amortissement" shape="plus"
|
||||
href="save_amort.html?immo_id=%s"|args:$_GET.immo_id target="_dialog"}}
|
||||
|
|
|
@ -76,7 +76,7 @@
|
|||
{{:form_errors}}
|
||||
{{/form}}
|
||||
|
||||
{{:admin_header title="Informations amortissement" custom_css=$custom_css current="module_amortissement"}}
|
||||
{{:admin_header title="Renseigner informations amortissement" custom_css=$custom_css current="module_amortissement"}}
|
||||
|
||||
{{* barre de navigation *}}
|
||||
{{if ! $dialog}}
|
||||
|
@ -100,19 +100,14 @@
|
|||
- renseigner ou modifier la date de mise en service et la durée d'amortissement
|
||||
*}}
|
||||
<form method="post" action="">
|
||||
<fieldset id="classement_immo">
|
||||
<legend>Classement</legend>
|
||||
<fieldset id="infos_immo">
|
||||
<legend></legend>
|
||||
<dl>
|
||||
<dt><label>Faites un choix</label> <b>(obligatoire)</b></dt>
|
||||
{{:input type="radio-btn" name="classify" value="managed" label="Amortir" default=$default onclick="toggleInputs('div_inputs','f_classify_managed', 'f_classify_amortized')"}}
|
||||
{{:input type="radio-btn" 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-btn" 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')"}}
|
||||
</dl>
|
||||
</fieldset>
|
||||
{{: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="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" default=$default onclick="toggleInputs('div_inputs','f_classify_managed', 'f_classify_amortized')"}}
|
||||
|
||||
<fieldset id="infos_immo">
|
||||
<legend>Informations</legend>
|
||||
<dl>
|
||||
{{if $info_immo != null}}
|
||||
{{:assign date_defaut=$info_immo.date}}
|
||||
{{:assign duree_defaut=$info_immo.duration}}
|
||||
|
|
72
config.html
72
config.html
|
@ -1,5 +1,4 @@
|
|||
{{* -*- brindille -*- *}}
|
||||
|
||||
{{:admin_header title="Configuration" custom_css="./style.css" current="module_amortissement"}}
|
||||
{{* barre de navigation *}}
|
||||
{{:include file="_nav.html" current="config"}}
|
||||
|
@ -10,16 +9,26 @@
|
|||
{{* lecture config (défaut ou enregistrée) *}}
|
||||
{{:include file="./_get_config.html" keep="config"}}
|
||||
|
||||
{{*:debug prefixes=$config.prefixes*}}
|
||||
|
||||
{{#form on="save"}}
|
||||
{{*:debug post=$_POST*}}
|
||||
{{:assign ok=0}}
|
||||
{{*
|
||||
TODO ? gérer le cas d'un compte qui englobe un autre...
|
||||
ex : 27 21 273 ou 20 21 27 2
|
||||
*}}
|
||||
{{#foreach from=$_POST.immo_accounts item="line"}}
|
||||
{{:assign elem=$line|values}}
|
||||
{{:assign elem=$elem.0}}
|
||||
{{*:debug elem=$elem*}}
|
||||
{{:assign var="fields" value=$elem|explode:" "}}
|
||||
{{*if ! $account_codes|has:$fields.0*}}
|
||||
{{:assign present=false}}
|
||||
{{* ne pas garder si préfixe d'un compte déjà présent *}}
|
||||
{{* ne pas garder si préfixe d'un compte déjà présent => voir commentaire précédent *}}
|
||||
{{#foreach from=$account_codes item="code"}}
|
||||
{{:assign pos=$code|strpos:$fields.0}}
|
||||
{{*:debug code=$code pos=$pos*}}
|
||||
{{if $pos !== false}}
|
||||
{{:assign present=true}}
|
||||
{{:break}}
|
||||
|
@ -29,6 +38,7 @@
|
|||
{{:assign var="account_codes." value=$fields.0}}
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
{{*:debug codes=$account_codes*}}
|
||||
|
||||
{{:save
|
||||
key="config"
|
||||
|
@ -52,6 +62,26 @@
|
|||
{{/years}}
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{*
|
||||
{{#select
|
||||
year.id,
|
||||
year.label as year_label,
|
||||
year.start_date,
|
||||
year.end_date,
|
||||
chart.id as chart_id,
|
||||
chart.label AS chart_label
|
||||
FROM acc_years AS year
|
||||
INNER JOIN acc_charts AS chart ON chart.id = year.id_chart
|
||||
WHERE year.id = :year_id;
|
||||
:year_id = $selected_year
|
||||
}}
|
||||
*}}
|
||||
{{*:debug year=$year_label chart=$chart_label*}}
|
||||
{{*
|
||||
{{/select}}
|
||||
*}}
|
||||
|
||||
{{* libellés des comptes d'immobilisation *}}
|
||||
{{:assign condition="("}}
|
||||
{{#foreach from=$config.prefixes item="code"}}
|
||||
|
@ -60,6 +90,7 @@
|
|||
{{/foreach}}
|
||||
{{:assign condition=$condition|cat:"0)"}}
|
||||
{{:assign condition=$condition|cat:" AND year.id = %s"|args:$selected_year}}
|
||||
{{*:debug cond=$condition*}}
|
||||
|
||||
{{#select
|
||||
account.id as account_id,
|
||||
|
@ -76,15 +107,15 @@
|
|||
!condition=$condition
|
||||
}}
|
||||
{{:assign var="accounts.%s"|args:$code label=$label id=$account_id}}
|
||||
{{*:debug acc_id=$account_id code=$code label=$label year_label=$year_label chart_label=$chart_label*}}
|
||||
{{/select}}
|
||||
{{*:debug accounts=$accounts*}}
|
||||
|
||||
<h3>Comptes d'immobilisation</h3>
|
||||
{{*
|
||||
<form method="post" action="">
|
||||
*}}
|
||||
<h3>Comptes d'immobilisation</h3>
|
||||
<form method="post" action="">
|
||||
|
||||
<p class="help">
|
||||
Les immobilisations sont cherchées dans les comptes sélectionnées et leurs sous-comptes.
|
||||
</p>
|
||||
|
||||
<table class="list transaction-lines" id="asset_prefixes">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -125,6 +156,30 @@
|
|||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
{{*
|
||||
<p class="actions">
|
||||
{{:button shape="plus" label="Ajouter" title="Ajouter un compte"}}
|
||||
*}}
|
||||
{{*:button shape="plus" label="Ajouter un compte" onclick="var a = $('#asset_prefixes tbody')[0].lastElementChild; var b = a.cloneNode(true); b.querySelectorAll('input, select').forEach((e) => e.value = null); a.parentNode.append(b);"*}}
|
||||
{{*
|
||||
</p>
|
||||
*}}
|
||||
|
||||
{{*
|
||||
<fieldset>
|
||||
<dl>
|
||||
{{:input
|
||||
type="list"
|
||||
name="immo_account"
|
||||
label="Ajouter un compte d'immobilisation"
|
||||
target="!acc/charts/accounts/selector.php?codes=2*&year=%s"|args:$selected_year
|
||||
}}
|
||||
*}}
|
||||
{{*:input type="checkbox" name="tva" value=1 label="TVA" source=$config help="Cocher si l'asso est assujettie à la TVA"*}}
|
||||
{{*
|
||||
</dl>
|
||||
</fieldset>
|
||||
*}}
|
||||
|
||||
<p class="submit">
|
||||
{{:button type="submit" name="save" label="Enregistrer" shape="right" class="main"}}
|
||||
|
@ -189,3 +244,4 @@
|
|||
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
11
index.html
11
index.html
|
@ -1,4 +1,5 @@
|
|||
{{* -*- brindille -*- *}}
|
||||
{{:admin_header title="Immobilisations et amortissements" custom_css="./style.css" current="module_amortization"}}
|
||||
|
||||
{{* barre de navigation *}}
|
||||
{{if $_GET.type_immo == null}}
|
||||
|
@ -7,16 +8,6 @@
|
|||
{{:assign type_immo=$_GET.type_immo}}
|
||||
{{/if}}
|
||||
|
||||
{{if $type_immo == "managed"}}
|
||||
{{:admin_header title="Immobilisations en cours" custom_css="./style.css" current="module_amortization"}}
|
||||
{{elseif $type_immo == "amortized"}}
|
||||
{{:admin_header title="Immobilisations amorties" custom_css="./style.css" current="module_amortization"}}
|
||||
{{elseif $type_immo == "archived"}}
|
||||
{{:admin_header title="Immobilisations archivées" custom_css="./style.css" current="module_amortization"}}
|
||||
{{elseif $type_immo == "other"}}
|
||||
{{:admin_header title="Autres immobilisations" custom_css="./style.css" current="module_amortization"}}
|
||||
{{/if}}
|
||||
|
||||
{{:include file="_nav.html" current="index" subcurrent="%s"|args:$type_immo}}
|
||||
|
||||
{{if $_GET.ok}}
|
||||
|
|
Loading…
Add table
Reference in a new issue