fix: correct SQL parameterization in analytics queries and use distinct icons

- pg-ff-client: replace ANY(ARRAY[...]) with IN(...) for Drizzle compatibility
- sidebar: change Analytics icon from BarChart2 (duplicate) to TrendingUp

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
EOF
This commit is contained in:
Michael committed 2026-03-31 10:02:44 +02:00
1 parent 740aed3181
commit d8a9bf80a0
2 files changed
+4 -4

No files matched your search

+2 -2
View File
@@ -655,7 +655,7 @@ export async function pgGetCaByFournisseur(
JOIN articles a ON a.no_id = m.artnoid
JOIN artfou1 af ON af.art_no_id = a.no_id
JOIN fouadr1 f ON f.code = af.code AND f.sit_code = '000'
WHERE TO_CHAR(m.datmvt, 'YYYY-MM') = ANY(ARRAY[${mois}, ${moisN1}])
WHERE TO_CHAR(m.datmvt, 'YYYY-MM') IN (${mois}, ${moisN1})
AND m.site IN ('292', '579')
AND m.genremvt = 3
GROUP BY af.code, m.site, TO_CHAR(m.datmvt, 'YYYY-MM')
@@ -683,7 +683,7 @@ export async function pgGetCaByNomenclature(
FROM mvtart m
JOIN articles a ON a.no_id = m.artnoid
JOIN nomenclature n ON n.no_id = a.nom_no_id
WHERE TO_CHAR(m.datmvt, 'YYYY-MM') = ANY(ARRAY[${mois}, ${moisN1}])
WHERE TO_CHAR(m.datmvt, 'YYYY-MM') IN (${mois}, ${moisN1})
AND m.site IN ('292', '579')
AND m.genremvt = 3
GROUP BY n.code, n.libelle, m.site, TO_CHAR(m.datmvt, 'YYYY-MM')