From d669b5c95bd8fcd4db6afeecd506dae172129aac Mon Sep 17 00:00:00 2001
From: Jean-Christophe Engel
Date: Wed, 30 Apr 2025 11:32:23 +0200
Subject: [PATCH] =?UTF-8?q?petite=20am=C3=A9lioration=20script?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
add_asset.html | 12 ++++++++----
scripts.js | 4 ++--
2 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/add_asset.html b/add_asset.html
index bf97a82..31237d4 100644
--- a/add_asset.html
+++ b/add_asset.html
@@ -127,7 +127,7 @@
{{: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 $start_date|strtotime <= $now && $end_date|strtotime >= $now}}
+ {{if $debut <= $now && $now <= $fin}}
{{:assign selected_year=$id}}
{{/if}}
{{/years}}
@@ -187,14 +187,18 @@
+{{:admin_footer}}
-
-{{:admin_footer}}
diff --git a/scripts.js b/scripts.js
index 8dcde5f..e530523 100644
--- a/scripts.js
+++ b/scripts.js
@@ -41,8 +41,8 @@ function disableOptions(idSelect, init, values) {
}
}
-// choisir les exercices affichés selon la date d'acquisition
-function setYears(evt, id_date = 'f_date_achat', id_exercices = 'f_id_year', id_years = 'f_years_data')
+// choisir les exercices affichés selon la date paramètre
+function chooseYears(id_date, id_exercices, id_years)
{
// masquer le message d'erreur
document.getElementById('erreur').setAttribute('class', 'hidden');