Configuration : traitement cas particuliers exercices
This commit is contained in:
parent
ab8f695e31
commit
4b504f6eb9
2 changed files with 87 additions and 74 deletions
|
|
@ -13,6 +13,8 @@
|
||||||
{{if $ts_debut <= $now && $now <= $ts_fin}}
|
{{if $ts_debut <= $now && $now <= $ts_fin}}
|
||||||
{{:assign selected_year=$id}}
|
{{:assign selected_year=$id}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
{{else}}
|
||||||
|
{{:error message="Aucun exercice ouvert"}}
|
||||||
{{/years}}
|
{{/years}}
|
||||||
|
|
||||||
{{* Traiter l'envoi du formulaire *}}
|
{{* Traiter l'envoi du formulaire *}}
|
||||||
|
|
|
||||||
19
config.html
19
config.html
|
|
@ -3,6 +3,7 @@
|
||||||
{{: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"}}
|
||||||
|
|
||||||
{{if $_GET.ok == 1}}
|
{{if $_GET.ok == 1}}
|
||||||
<p class="block confirm">Configuration enregistrée.</p>
|
<p class="block confirm">Configuration enregistrée.</p>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
@ -39,19 +40,29 @@
|
||||||
{{:redirect to="./config.html?ok=%d"|args:$ok}}
|
{{:redirect to="./config.html?ok=%d"|args:$ok}}
|
||||||
{{/form}}
|
{{/form}}
|
||||||
|
|
||||||
{{* récupérer l'exercice courant *}}
|
{{* 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 closed=false order="start_date"}}
|
{{#years}}
|
||||||
{{:assign var="open_years.%d"|args:$id value=$label}}
|
|
||||||
{{if $start_date|strtotime <= $now && $end_date|strtotime >= $now}}
|
{{if $start_date|strtotime <= $now && $end_date|strtotime >= $now}}
|
||||||
{{:assign selected_year=$id}}
|
{{:assign selected_year=$id}}
|
||||||
{{:break}}
|
{{:break}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
{{:assign last_year=$id}}
|
||||||
{{/years}}
|
{{/years}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
{{if $selected_year == null}}
|
||||||
|
{{if $last_year == null}}
|
||||||
|
<p class="block alert">Aucun exercice</p>
|
||||||
|
{{else}}
|
||||||
|
{{:assign selected_year=$last_year}}
|
||||||
|
{{/if}}
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
{{if $selected_year != null}}
|
||||||
|
|
||||||
{{* 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"}}
|
||||||
|
|
@ -98,7 +109,6 @@
|
||||||
<td>
|
<td>
|
||||||
{{:assign var="immo_account.%s.%s"|args:$code:$code value="%s — "|args:$code|cat:$elem.label}}
|
{{:assign var="immo_account.%s.%s"|args:$code:$code value="%s — "|args:$code|cat:$elem.label}}
|
||||||
{{:assign var="current_account" from="immo_account.%s"|args:$code}}
|
{{:assign var="current_account" from="immo_account.%s"|args:$code}}
|
||||||
{{*:debug immo_account=$immo_account current_account=$current_account*}}
|
|
||||||
{{:input
|
{{:input
|
||||||
type="list"
|
type="list"
|
||||||
name="immo_accounts[]"
|
name="immo_accounts[]"
|
||||||
|
|
@ -130,6 +140,7 @@
|
||||||
{{:button type="submit" name="save" label="Enregistrer" shape="right" class="main"}}
|
{{:button type="submit" name="save" label="Enregistrer" shape="right" class="main"}}
|
||||||
</p>
|
</p>
|
||||||
</form>
|
</form>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
<script type="text/javascript" src="scripts.js"></script>
|
<script type="text/javascript" src="scripts.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue