Compare commits
2 commits
472b5551b1
...
7a41c43ea3
Author | SHA1 | Date | |
---|---|---|---|
![]() |
7a41c43ea3 | ||
![]() |
c025f7f10c |
7 changed files with 34 additions and 80 deletions
|
@ -78,8 +78,6 @@
|
||||||
{{/select}}
|
{{/select}}
|
||||||
|
|
||||||
<section class="immobilisation">
|
<section class="immobilisation">
|
||||||
<h2 class="ruler">Immobilisations archivées</h2>
|
|
||||||
|
|
||||||
{{:assign nb_immo=0}}
|
{{:assign nb_immo=0}}
|
||||||
<table class="list">
|
<table class="list">
|
||||||
<thead>
|
<thead>
|
||||||
|
|
|
@ -3,11 +3,6 @@
|
||||||
{{* Liste des immobilisations en cours ou amorties *}}
|
{{* Liste des immobilisations en cours ou amorties *}}
|
||||||
|
|
||||||
<section class="immobilisation">
|
<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}}
|
{{:assign nb_immo=0}}
|
||||||
|
|
||||||
<table class="list">
|
<table class="list">
|
||||||
|
|
|
@ -3,9 +3,12 @@
|
||||||
{{* Liste des immobilisations non amortissables ou non (encore) gérées *}}
|
{{* Liste des immobilisations non amortissables ou non (encore) gérées *}}
|
||||||
|
|
||||||
<section class="immobilisation">
|
<section class="immobilisation">
|
||||||
<h2 class="ruler">Autres immobilisations</h2>
|
|
||||||
{{:assign nb_immo=0}}
|
{{: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="">
|
<form method="post" action="">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
{{:input type="checkbox" value=1 name="unhide" label="Afficher les écritures marquées ignorées" }}
|
{{: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"}}
|
{{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="Rattacher une écriture" href="other_amortizations.html?immo_id=%s"|args:$_GET.immo_id shape="link" target="_dialog"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{:linkbutton label="Enregistrer un amortissement" shape="plus"
|
{{:linkbutton label="Enregistrer un amortissement" shape="plus"
|
||||||
href="save_amort.html?immo_id=%s"|args:$_GET.immo_id target="_dialog"}}
|
href="save_amort.html?immo_id=%s"|args:$_GET.immo_id target="_dialog"}}
|
||||||
|
|
|
@ -76,7 +76,7 @@
|
||||||
{{:form_errors}}
|
{{:form_errors}}
|
||||||
{{/form}}
|
{{/form}}
|
||||||
|
|
||||||
{{:admin_header title="Renseigner informations amortissement" custom_css=$custom_css current="module_amortissement"}}
|
{{:admin_header title="Informations amortissement" custom_css=$custom_css current="module_amortissement"}}
|
||||||
|
|
||||||
{{* barre de navigation *}}
|
{{* barre de navigation *}}
|
||||||
{{if ! $dialog}}
|
{{if ! $dialog}}
|
||||||
|
@ -100,14 +100,19 @@
|
||||||
- renseigner ou modifier la date de mise en service et la durée d'amortissement
|
- 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="classement_immo">
|
||||||
<legend></legend>
|
<legend>Classement</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-btn" name="classify" value="managed" label="Amortir" 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-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" 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')"}}
|
{{: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>
|
||||||
|
|
||||||
|
<fieldset id="infos_immo">
|
||||||
|
<legend>Informations</legend>
|
||||||
|
<dl>
|
||||||
{{if $info_immo != null}}
|
{{if $info_immo != null}}
|
||||||
{{:assign date_defaut=$info_immo.date}}
|
{{:assign date_defaut=$info_immo.date}}
|
||||||
{{:assign duree_defaut=$info_immo.duration}}
|
{{:assign duree_defaut=$info_immo.duration}}
|
||||||
|
|
72
config.html
72
config.html
|
@ -1,4 +1,5 @@
|
||||||
{{* -*- brindille -*- *}}
|
{{* -*- brindille -*- *}}
|
||||||
|
|
||||||
{{:admin_header title="Configuration" custom_css="./style.css" current="module_amortissement"}}
|
{{:admin_header title="Configuration" custom_css="./style.css" current="module_amortissement"}}
|
||||||
{{* barre de navigation *}}
|
{{* barre de navigation *}}
|
||||||
{{:include file="_nav.html" current="config"}}
|
{{:include file="_nav.html" current="config"}}
|
||||||
|
@ -9,26 +10,16 @@
|
||||||
{{* lecture config (défaut ou enregistrée) *}}
|
{{* lecture config (défaut ou enregistrée) *}}
|
||||||
{{:include file="./_get_config.html" keep="config"}}
|
{{:include file="./_get_config.html" keep="config"}}
|
||||||
|
|
||||||
{{*:debug prefixes=$config.prefixes*}}
|
|
||||||
|
|
||||||
{{#form on="save"}}
|
{{#form on="save"}}
|
||||||
{{*:debug post=$_POST*}}
|
|
||||||
{{:assign ok=0}}
|
{{: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"}}
|
{{#foreach from=$_POST.immo_accounts item="line"}}
|
||||||
{{:assign elem=$line|values}}
|
{{:assign elem=$line|values}}
|
||||||
{{:assign elem=$elem.0}}
|
{{:assign elem=$elem.0}}
|
||||||
{{*:debug elem=$elem*}}
|
|
||||||
{{:assign var="fields" value=$elem|explode:" "}}
|
{{:assign var="fields" value=$elem|explode:" "}}
|
||||||
{{*if ! $account_codes|has:$fields.0*}}
|
|
||||||
{{:assign present=false}}
|
{{:assign present=false}}
|
||||||
{{* ne pas garder si préfixe d'un compte déjà présent => voir commentaire précédent *}}
|
{{* ne pas garder si préfixe d'un compte déjà présent *}}
|
||||||
{{#foreach from=$account_codes item="code"}}
|
{{#foreach from=$account_codes item="code"}}
|
||||||
{{:assign pos=$code|strpos:$fields.0}}
|
{{:assign pos=$code|strpos:$fields.0}}
|
||||||
{{*:debug code=$code pos=$pos*}}
|
|
||||||
{{if $pos !== false}}
|
{{if $pos !== false}}
|
||||||
{{:assign present=true}}
|
{{:assign present=true}}
|
||||||
{{:break}}
|
{{:break}}
|
||||||
|
@ -38,7 +29,6 @@
|
||||||
{{:assign var="account_codes." value=$fields.0}}
|
{{:assign var="account_codes." value=$fields.0}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
{{*:debug codes=$account_codes*}}
|
|
||||||
|
|
||||||
{{:save
|
{{:save
|
||||||
key="config"
|
key="config"
|
||||||
|
@ -62,26 +52,6 @@
|
||||||
{{/years}}
|
{{/years}}
|
||||||
{{/if}}
|
{{/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 *}}
|
{{* libellés des comptes d'immobilisation *}}
|
||||||
{{:assign condition="("}}
|
{{:assign condition="("}}
|
||||||
{{#foreach from=$config.prefixes item="code"}}
|
{{#foreach from=$config.prefixes item="code"}}
|
||||||
|
@ -90,7 +60,6 @@
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
{{:assign condition=$condition|cat:"0)"}}
|
{{:assign condition=$condition|cat:"0)"}}
|
||||||
{{:assign condition=$condition|cat:" AND year.id = %s"|args:$selected_year}}
|
{{:assign condition=$condition|cat:" AND year.id = %s"|args:$selected_year}}
|
||||||
{{*:debug cond=$condition*}}
|
|
||||||
|
|
||||||
{{#select
|
{{#select
|
||||||
account.id as account_id,
|
account.id as account_id,
|
||||||
|
@ -107,15 +76,15 @@
|
||||||
!condition=$condition
|
!condition=$condition
|
||||||
}}
|
}}
|
||||||
{{:assign var="accounts.%s"|args:$code label=$label id=$account_id}}
|
{{: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}}
|
{{/select}}
|
||||||
{{*:debug accounts=$accounts*}}
|
|
||||||
|
|
||||||
{{*
|
<h3>Comptes d'immobilisation</h3>
|
||||||
<form method="post" action="">
|
|
||||||
*}}
|
|
||||||
<h3>Comptes d'immobilisation</h3>
|
|
||||||
<form method="post" action="">
|
<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">
|
<table class="list transaction-lines" id="asset_prefixes">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -156,30 +125,6 @@
|
||||||
</tr>
|
</tr>
|
||||||
</tfoot>
|
</tfoot>
|
||||||
</table>
|
</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">
|
<p class="submit">
|
||||||
{{:button type="submit" name="save" label="Enregistrer" shape="right" class="main"}}
|
{{:button type="submit" name="save" label="Enregistrer" shape="right" class="main"}}
|
||||||
|
@ -244,4 +189,3 @@
|
||||||
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
11
index.html
11
index.html
|
@ -1,5 +1,4 @@
|
||||||
{{* -*- brindille -*- *}}
|
{{* -*- brindille -*- *}}
|
||||||
{{:admin_header title="Immobilisations et amortissements" custom_css="./style.css" current="module_amortization"}}
|
|
||||||
|
|
||||||
{{* barre de navigation *}}
|
{{* barre de navigation *}}
|
||||||
{{if $_GET.type_immo == null}}
|
{{if $_GET.type_immo == null}}
|
||||||
|
@ -8,6 +7,16 @@
|
||||||
{{:assign type_immo=$_GET.type_immo}}
|
{{:assign type_immo=$_GET.type_immo}}
|
||||||
{{/if}}
|
{{/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}}
|
{{:include file="_nav.html" current="index" subcurrent="%s"|args:$type_immo}}
|
||||||
|
|
||||||
{{if $_GET.ok}}
|
{{if $_GET.ok}}
|
||||||
|
|
Loading…
Add table
Reference in a new issue