diff --git a/add_asset.html b/add_asset.html index 31237d4..e0d9a7f 100644 --- a/add_asset.html +++ b/add_asset.html @@ -123,11 +123,13 @@ {{* formulaire d'ajout d'immobilisation *}} {{#years closed=false order="start_date"}} - {{:assign debut=$start_date|strtotime}} - {{:assign fin=$end_date|strtotime}} - {{:assign var="years_data.%d"|args:$id value=$debut|cat:" "|cat:$fin}} - {{:assign var="open_years.%d"|args:$id value=$label}} - {{if $debut <= $now && $now <= $fin}} + {{:assign ts_debut=$start_date|strtotime}} + {{:assign ts_fin=$end_date|strtotime}} + {{:assign debut=$start_date|date_short}} + {{:assign fin=$end_date|date_short}} + {{:assign var="years_data.%d"|args:$id value=$ts_debut|cat:" "|cat:$ts_fin}} + {{:assign var="open_years.%d"|args:$id value=$label|cat:" (du "|cat:$debut|cat:" au "|cat:$fin|cat:")"}} + {{if $ts_debut <= $now && $now <= $ts_fin}} {{:assign selected_year=$id}} {{/if}} {{/years}}