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 *}}
|
||||
|
||||
{{* Immobilisation avec une écriture de sortie de bilan *}}
|
||||
{{:read file="./defaut.json" assign="config_json"}}
|
||||
{{:assign config_defaut=$config_json|json_decode}}
|
||||
{{:include file="_get_config.html" keep="config.prefixes"}}
|
||||
|
||||
{{:assign condition="("}}
|
||||
{{#foreach from=$config_defaut.prefixes item="code"}}
|
||||
{{#foreach from=$config.prefixes item="code"}}
|
||||
{{:assign code=$code|cat:"%"|quote_sql}}
|
||||
{{:assign condition=$condition|cat:"account.code LIKE "|cat:$code|cat:" OR "}}
|
||||
{{/foreach}}
|
||||
|
|
|
|||
|
|
@ -4,10 +4,6 @@
|
|||
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}}
|
||||
{{:assign var="config.tva" value=$module.config.tva}}
|
||||
|
|
@ -19,5 +15,8 @@
|
|||
{{if $module.config.prefixes != null}}
|
||||
{{:assign var="config.prefixes" value=$module.config.prefixes}}
|
||||
{{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}}
|
||||
{{/if}}
|
||||
|
|
|
|||
|
|
@ -21,10 +21,10 @@
|
|||
<tbody>
|
||||
|
||||
{{* lister les immobilisations *}}
|
||||
{{:read file="./defaut.json" assign="config_json"}}
|
||||
{{:assign config_defaut=$config_json|json_decode}}
|
||||
{{:include file="_get_config.html" keep="config.prefixes"}}
|
||||
|
||||
{{:assign condition="("}}
|
||||
{{#foreach from=$config_defaut.prefixes item="code"}}
|
||||
{{#foreach from=$config.prefixes item="code"}}
|
||||
{{:assign code=$code|cat:"%"|quote_sql}}
|
||||
{{:assign condition=$condition|cat:" account.code LIKE "|cat:$code|cat:" OR "}}
|
||||
{{/foreach}}
|
||||
|
|
|
|||
|
|
@ -30,10 +30,9 @@
|
|||
<tbody>
|
||||
|
||||
{{* lister les immobilisations *}}
|
||||
{{:read file="./defaut.json" assign="config_json"}}
|
||||
{{:assign config_defaut=$config_json|json_decode}}
|
||||
{{:include file="_get_config.html" keep="config.prefixes"}}
|
||||
{{:assign condition="("}}
|
||||
{{#foreach from=$config_defaut.prefixes item="code"}}
|
||||
{{#foreach from=$config.prefixes item="code"}}
|
||||
{{:assign code=$code|cat:"%"|quote_sql}}
|
||||
{{:assign condition=$condition|cat:" account.code LIKE "|cat:$code|cat:" OR "}}
|
||||
{{/foreach}}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
{{* -*- brindille -*- *}}
|
||||
|
||||
{{:read file="./defaut.json" assign="config_json"}}
|
||||
{{:assign config_defaut=$config_json|json_decode}}
|
||||
{{:include file="_get_config.html" keep="config.prefixes"}}
|
||||
|
||||
{{#years closed=false order="start_date" assign=years.}}
|
||||
{{:assign ts_debut=$start_date|strtotime}}
|
||||
|
|
@ -75,7 +74,7 @@
|
|||
file="_check_account.html"
|
||||
account=$debit_account
|
||||
chart_id=$selected_chart
|
||||
prefix_array=$config_defaut.prefixes
|
||||
prefix_array=$config.prefixes
|
||||
keep="account_ok"
|
||||
}}
|
||||
|
||||
|
|
@ -139,7 +138,7 @@
|
|||
{{:assign var="projects.%d"|args:$id value=$label}}
|
||||
{{/select}}
|
||||
|
||||
{{#foreach from=$config_defaut.prefixes item="code"}}
|
||||
{{#foreach from=$config.prefixes item="code"}}
|
||||
{{:assign var="pattern_array." value="%s*"|args:$code}}
|
||||
{{/foreach}}
|
||||
{{:assign var="patterns" value=$pattern_array|implode:"|"}}
|
||||
|
|
|
|||
|
|
@ -248,7 +248,7 @@
|
|||
{{if $autres_amortissements != null}}
|
||||
<p class="block alert">
|
||||
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>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@
|
|||
{{/form}}
|
||||
|
||||
{{* 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}}
|
||||
{{* sélectionner l'exercice le plus probable *}}
|
||||
{{#years}}
|
||||
|
|
|
|||
|
|
@ -147,9 +147,8 @@
|
|||
- 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
|
||||
*}}
|
||||
{{:read file="./defaut.json" assign="config_json"}}
|
||||
{{:assign config_defaut=$config_json|json_decode}}
|
||||
{{#foreach from=$config_defaut.prefixes item="code"}}
|
||||
{{:include file="_get_config.html" keep="config.prefixes"}}
|
||||
{{#foreach from=$config.prefixes item="code"}}
|
||||
{{* déterminer le numéro du compte d'amortissement associé au compte d'immobilisation *}}
|
||||
{{:include
|
||||
file="./_get_amort_code.html"
|
||||
|
|
|
|||
|
|
@ -309,10 +309,8 @@
|
|||
{{:assign var="%s.%s"|args:$name:$code value="%s — %s"|args:$code:$acc_label}}
|
||||
{{/foreach}}
|
||||
|
||||
{{:read file="./defaut.json" assign="config_json"}}
|
||||
{{:assign config_defaut=$config_json|json_decode}}
|
||||
|
||||
{{#foreach from=$config_defaut.prefixes item="code"}}
|
||||
{{:include file="_get_config.html" keep="config.prefixes"}}
|
||||
{{#foreach from=$config.prefixes item="code"}}
|
||||
{{:assign var="pattern_array." value="%s*"|args:$code}}
|
||||
{{/foreach}}
|
||||
{{:assign patterns=$pattern_array|implode:"|"}}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue