fix: exclude suspended products from supplier grid

Add WHERE NOT COALESCE(af.suspendu::boolean, false) AND NOT COALESCE(a.suspendu::boolean, false)
to pgGetArticlesByFournisseur — products flagged as suspended in artfou1
or articles table are no longer shown in the grid.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
MichaelandClaude Sonnet 4.6 committed 2026-04-03 12:04:08 +02:00
1 parent 6b26676836
commit a60e21eb04
1 file changed
+2
+2
View File
@@ -151,6 +151,8 @@ export async function pgGetArticlesByFournisseur(codefou: string): Promise<PgArt
) last_fournisseur ON true
WHERE af.code = ${codefou}
AND a.codein IS NOT NULL
AND NOT COALESCE(af.suspendu::boolean, false)
AND NOT COALESCE(a.suspendu::boolean, false)
ORDER BY a.no_id, af.no_id
`);