diff --git a/config.html b/config.html index 2a5b6f5..6506ce9 100644 --- a/config.html +++ b/config.html @@ -1,4 +1,5 @@ {{* -*- brindille -*- *}} + {{:admin_header title="Configuration" custom_css="./style.css" current="module_amortissement"}} {{* barre de navigation *}} {{:include file="_nav.html" current="config"}} @@ -9,26 +10,16 @@ {{* 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 => voir commentaire précédent *}} + {{* ne pas garder si préfixe d'un compte déjà présent *}} {{#foreach from=$account_codes item="code"}} {{:assign pos=$code|strpos:$fields.0}} - {{*:debug code=$code pos=$pos*}} {{if $pos !== false}} {{:assign present=true}} {{:break}} @@ -38,7 +29,6 @@ {{:assign var="account_codes." value=$fields.0}} {{/if}} {{/foreach}} - {{*:debug codes=$account_codes*}} {{:save key="config" @@ -62,26 +52,6 @@ {{/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"}} @@ -90,7 +60,6 @@ {{/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, @@ -107,15 +76,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*}} -{{* -