Ajout et mutualisation contrôles saisie
This commit is contained in:
parent
061a27d40d
commit
d189f6d4c4
5 changed files with 108 additions and 34 deletions
23
_check_date.html
Normal file
23
_check_date.html
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{{* -*- brindille -*- *}}
|
||||
|
||||
{{*
|
||||
vérifier que la date est située dans un exercice ouvert
|
||||
paramètres :
|
||||
- date
|
||||
résultat : open_years, selected_year, selected_chart
|
||||
*}}
|
||||
|
||||
{{:assign open_years=""}}
|
||||
{{#years closed=false}}
|
||||
{{:assign open_years=$open_years|cat:"\n"|cat:" - "|cat:$label|cat:" : "}}
|
||||
{{:assign debut=$start_date|date_short}}
|
||||
{{:assign fin=$end_date|date_short}}
|
||||
{{:assign open_years=$open_years|cat:$debut|cat:" à "|cat:$fin}}
|
||||
{{if
|
||||
$start_date|strtotime <= $date|parse_date|strtotime &&
|
||||
$end_date|strtotime >= $date|parse_date|strtotime
|
||||
}}
|
||||
{{:assign selected_year=$id}}
|
||||
{{:assign selected_chart=$id_chart}}
|
||||
{{/if}}
|
||||
{{/years}}
|
||||
Loading…
Add table
Add a link
Reference in a new issue