Correction gestion config + coquille
This commit is contained in:
parent
4b504f6eb9
commit
547ef819d0
9 changed files with 19 additions and 26 deletions
|
|
@ -3,11 +3,10 @@
|
||||||
{{* Liste des immobilisations archivées *}}
|
{{* Liste des immobilisations archivées *}}
|
||||||
|
|
||||||
{{* Immobilisation avec une écriture de sortie de bilan *}}
|
{{* Immobilisation avec une écriture de sortie de bilan *}}
|
||||||
{{:read file="./defaut.json" assign="config_json"}}
|
{{:include file="_get_config.html" keep="config.prefixes"}}
|
||||||
{{:assign config_defaut=$config_json|json_decode}}
|
|
||||||
|
|
||||||
{{:assign condition="("}}
|
{{:assign condition="("}}
|
||||||
{{#foreach from=$config_defaut.prefixes item="code"}}
|
{{#foreach from=$config.prefixes item="code"}}
|
||||||
{{:assign code=$code|cat:"%"|quote_sql}}
|
{{:assign code=$code|cat:"%"|quote_sql}}
|
||||||
{{:assign condition=$condition|cat:"account.code LIKE "|cat:$code|cat:" OR "}}
|
{{:assign condition=$condition|cat:"account.code LIKE "|cat:$code|cat:" OR "}}
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,6 @@
|
||||||
Récupérer la config
|
Récupérer la config
|
||||||
*}}
|
*}}
|
||||||
|
|
||||||
{{* config par défaut *}}
|
|
||||||
{{:read file="./defaut.json" assign="config_defaut"}}
|
|
||||||
{{:assign config_defaut=$config_defaut|json_decode}}
|
|
||||||
|
|
||||||
{{*
|
{{*
|
||||||
{{if $module.config.tva != null}}
|
{{if $module.config.tva != null}}
|
||||||
{{:assign var="config.tva" value=$module.config.tva}}
|
{{:assign var="config.tva" value=$module.config.tva}}
|
||||||
|
|
@ -19,5 +15,8 @@
|
||||||
{{if $module.config.prefixes != null}}
|
{{if $module.config.prefixes != null}}
|
||||||
{{:assign var="config.prefixes" value=$module.config.prefixes}}
|
{{:assign var="config.prefixes" value=$module.config.prefixes}}
|
||||||
{{else}}
|
{{else}}
|
||||||
|
{{* config par défaut *}}
|
||||||
|
{{:read file="./defaut.json" assign="config_defaut"}}
|
||||||
|
{{:assign config_defaut=$config_defaut|json_decode}}
|
||||||
{{:assign var="config.prefixes" value=$config_defaut.prefixes}}
|
{{:assign var="config.prefixes" value=$config_defaut.prefixes}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
||||||
|
|
@ -21,10 +21,10 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
||||||
{{* lister les immobilisations *}}
|
{{* lister les immobilisations *}}
|
||||||
{{:read file="./defaut.json" assign="config_json"}}
|
{{:include file="_get_config.html" keep="config.prefixes"}}
|
||||||
{{:assign config_defaut=$config_json|json_decode}}
|
|
||||||
{{:assign condition="("}}
|
{{:assign condition="("}}
|
||||||
{{#foreach from=$config_defaut.prefixes item="code"}}
|
{{#foreach from=$config.prefixes item="code"}}
|
||||||
{{:assign code=$code|cat:"%"|quote_sql}}
|
{{:assign code=$code|cat:"%"|quote_sql}}
|
||||||
{{:assign condition=$condition|cat:" account.code LIKE "|cat:$code|cat:" OR "}}
|
{{:assign condition=$condition|cat:" account.code LIKE "|cat:$code|cat:" OR "}}
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
|
|
|
||||||
|
|
@ -30,10 +30,9 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
||||||
{{* lister les immobilisations *}}
|
{{* lister les immobilisations *}}
|
||||||
{{:read file="./defaut.json" assign="config_json"}}
|
{{:include file="_get_config.html" keep="config.prefixes"}}
|
||||||
{{:assign config_defaut=$config_json|json_decode}}
|
|
||||||
{{:assign condition="("}}
|
{{:assign condition="("}}
|
||||||
{{#foreach from=$config_defaut.prefixes item="code"}}
|
{{#foreach from=$config.prefixes item="code"}}
|
||||||
{{:assign code=$code|cat:"%"|quote_sql}}
|
{{:assign code=$code|cat:"%"|quote_sql}}
|
||||||
{{:assign condition=$condition|cat:" account.code LIKE "|cat:$code|cat:" OR "}}
|
{{:assign condition=$condition|cat:" account.code LIKE "|cat:$code|cat:" OR "}}
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
{{* -*- brindille -*- *}}
|
{{* -*- brindille -*- *}}
|
||||||
|
|
||||||
{{:read file="./defaut.json" assign="config_json"}}
|
{{:include file="_get_config.html" keep="config.prefixes"}}
|
||||||
{{:assign config_defaut=$config_json|json_decode}}
|
|
||||||
|
|
||||||
{{#years closed=false order="start_date" assign=years.}}
|
{{#years closed=false order="start_date" assign=years.}}
|
||||||
{{:assign ts_debut=$start_date|strtotime}}
|
{{:assign ts_debut=$start_date|strtotime}}
|
||||||
|
|
@ -75,7 +74,7 @@
|
||||||
file="_check_account.html"
|
file="_check_account.html"
|
||||||
account=$debit_account
|
account=$debit_account
|
||||||
chart_id=$selected_chart
|
chart_id=$selected_chart
|
||||||
prefix_array=$config_defaut.prefixes
|
prefix_array=$config.prefixes
|
||||||
keep="account_ok"
|
keep="account_ok"
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
|
@ -139,7 +138,7 @@
|
||||||
{{:assign var="projects.%d"|args:$id value=$label}}
|
{{:assign var="projects.%d"|args:$id value=$label}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
|
|
||||||
{{#foreach from=$config_defaut.prefixes item="code"}}
|
{{#foreach from=$config.prefixes item="code"}}
|
||||||
{{:assign var="pattern_array." value="%s*"|args:$code}}
|
{{:assign var="pattern_array." value="%s*"|args:$code}}
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
{{:assign var="patterns" value=$pattern_array|implode:"|"}}
|
{{:assign var="patterns" value=$pattern_array|implode:"|"}}
|
||||||
|
|
|
||||||
|
|
@ -248,7 +248,7 @@
|
||||||
{{if $autres_amortissements != null}}
|
{{if $autres_amortissements != null}}
|
||||||
<p class="block alert">
|
<p class="block alert">
|
||||||
Il existe des écritures d'amortissement qui ne sont pas rattachés à une immobilisation ! <br />
|
Il existe des écritures d'amortissement qui ne sont pas rattachés à une immobilisation ! <br />
|
||||||
Utilisez le bouton « Attacher un amortissement » pour les afficher ; vous pourrez choisir d'en attacher certaines à cette immobilisation.
|
Utilisez le bouton « Rattacher une écriture » pour les afficher ; vous pourrez choisir d'en attacher certaines à cette immobilisation.
|
||||||
</p>
|
</p>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@
|
||||||
{{/form}}
|
{{/form}}
|
||||||
|
|
||||||
{{* récupérer l'exercice courant ou sinon le plus récent *}}
|
{{* récupérer l'exercice courant ou sinon le plus récent *}}
|
||||||
{{:assign var="selected_year" from="logged_user.preferences.accounting_year}}
|
{{:assign var="selected_year" from="logged_user.preferences.accounting_year"}}
|
||||||
{{if $selected_year == null}}
|
{{if $selected_year == null}}
|
||||||
{{* sélectionner l'exercice le plus probable *}}
|
{{* sélectionner l'exercice le plus probable *}}
|
||||||
{{#years}}
|
{{#years}}
|
||||||
|
|
|
||||||
|
|
@ -147,9 +147,8 @@
|
||||||
- que le compte d'amortissement débute par un préfixe correct (280, 281, ...)
|
- que le compte d'amortissement débute par un préfixe correct (280, 281, ...)
|
||||||
- est présent dans le PC de l'exercice correspondant à la date
|
- est présent dans le PC de l'exercice correspondant à la date
|
||||||
*}}
|
*}}
|
||||||
{{:read file="./defaut.json" assign="config_json"}}
|
{{:include file="_get_config.html" keep="config.prefixes"}}
|
||||||
{{:assign config_defaut=$config_json|json_decode}}
|
{{#foreach from=$config.prefixes item="code"}}
|
||||||
{{#foreach from=$config_defaut.prefixes item="code"}}
|
|
||||||
{{* déterminer le numéro du compte d'amortissement associé au compte d'immobilisation *}}
|
{{* déterminer le numéro du compte d'amortissement associé au compte d'immobilisation *}}
|
||||||
{{:include
|
{{:include
|
||||||
file="./_get_amort_code.html"
|
file="./_get_amort_code.html"
|
||||||
|
|
|
||||||
|
|
@ -309,10 +309,8 @@
|
||||||
{{:assign var="%s.%s"|args:$name:$code value="%s — %s"|args:$code:$acc_label}}
|
{{:assign var="%s.%s"|args:$name:$code value="%s — %s"|args:$code:$acc_label}}
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
|
|
||||||
{{:read file="./defaut.json" assign="config_json"}}
|
{{:include file="_get_config.html" keep="config.prefixes"}}
|
||||||
{{:assign config_defaut=$config_json|json_decode}}
|
{{#foreach from=$config.prefixes item="code"}}
|
||||||
|
|
||||||
{{#foreach from=$config_defaut.prefixes item="code"}}
|
|
||||||
{{:assign var="pattern_array." value="%s*"|args:$code}}
|
{{:assign var="pattern_array." value="%s*"|args:$code}}
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
{{:assign patterns=$pattern_array|implode:"|"}}
|
{{:assign patterns=$pattern_array|implode:"|"}}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue