diff --git a/global_history.html b/global_history.html
index 7d8cbad..a6ef606 100644
--- a/global_history.html
+++ b/global_history.html
@@ -35,7 +35,7 @@
{{* lister tous les mouvements *}}
{{#list
type="movement"
- select="$$.date AS 'Date';
+ select="($$.date || '_' || substr('000000' || id, -6, 6)) AS 'Date';
CASE $$.direction WHEN 'input' THEN 'Entrée' WHEN 'output' THEN 'Sortie' END AS 'Mouvement';
$$.operation AS 'Opération';
(SELECT $$.name
diff --git a/historique.html b/historique.html
index 5023e59..bb96ee3 100644
--- a/historique.html
+++ b/historique.html
@@ -164,22 +164,24 @@
{{#list
type="movement"
- select="$$.date AS 'Date';
+ select="
+ ($$.date || '_' || substr('000000' || id, -6, 6)) AS 'Date';
CASE $$.direction WHEN 'input' THEN 'Entrée' WHEN 'output' THEN 'Sortie' END AS 'Mouvement';
$$.operation AS 'Opération';
$$.amount AS 'Quantité';
- "" as 'Stock';
- "" as 'Sorti';
- "" as 'Disponible';
+ '' AS 'Stock';
+ '' AS 'Sorti';
+ '' AS 'Disponible';
CASE WHEN $$.user NOT NULL
THEN (SELECT %s AS nom FROM users WHERE id = $$.user)
ELSE ''
- END as 'Dépositaire';
+ END AS 'Dépositaire';
CASE WHEN $$.storage NOT NULL
THEN (SELECT $$.name FROM @TABLE as storage WHERE storage.key = @TABLE.$$.storage)
ELSE ''
- END as 'Stockage';
- $$.comment AS 'Commentaire'
+ END AS 'Stockage';
+ $$.comment AS 'Commentaire';
+ id AS 'Id'
"|args:$config.user_fields.name_sql
equipment=$equipment_key
order=1
@@ -266,7 +268,7 @@
{{#list
type="movement"
- select="$$.date AS 'Date';
+ select="($$.date || '_' || substr('000000' || id, -6, 6)) AS 'Date';
CASE $$.direction WHEN 'input' THEN 'Entrée' WHEN 'output' THEN 'Sortie' END AS 'Mouvement';
$$.operation AS 'Opération';
$$.amount AS 'Quantité';