fix: artfou1.preference is integer, use = 1 not = true

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
MichaelandClaude Sonnet 4.6 committed 2026-04-01 09:12:11 +02:00
1 parent 79aadf62eb
commit c5fbc85c6c
1 file changed
+1 -1
+1 -1
View File
@@ -653,7 +653,7 @@ export async function pgGetCaByFournisseur(
ABS(SUM(m.mntmvtttc))::float AS ca_ttc
FROM mvtart m
JOIN articles a ON a.no_id = m.artnoid
LEFT JOIN artfou1 af ON af.art_no_id = a.no_id AND af.preference = true
LEFT JOIN artfou1 af ON af.art_no_id = a.no_id AND af.preference = 1
LEFT JOIN fouident fi ON fi.code = af.code
WHERE (TO_CHAR(m.datmvt, 'YYYY-MM') = ${mois} OR TO_CHAR(m.datmvt, 'YYYY-MM') = ${moisN1})
AND m.site IN ('292', '579')