From 92ec78b6c1457a16717c86f67af3a5be8f67cb6b Mon Sep 17 00:00:00 2001 From: Jean-Christophe Engel Date: Fri, 18 Apr 2025 17:56:12 +0200 Subject: [PATCH] =?UTF-8?q?historiques=20:=20ajout=20id=20mouvement=20?= =?UTF-8?q?=C3=A0=20la=20date=20pour=20tri?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- global_history.html | 2 +- historique.html | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) 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é';