Skip to content

Commit

Permalink
fix(foUser): improve declaration count for users, don't count 'BROUIL… (
Browse files Browse the repository at this point in the history
#470)

…LON'
  • Loading branch information
iNeoO authored Sep 10, 2024
2 parents 25cff7d + 0bcb756 commit 7eb4d5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/backend/src/services/FoUser.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const query = {
org.personne_morale->>'siret' AS siret,
org.personne_morale->>'siren' AS siren,
org.personne_morale->>'raisonSociale' AS "raisonSociale",
count(ds.id) AS "nombreDeclarations"
count(CASE WHEN ds.statut <> 'BROUILLON' THEN ds.id ELSE NULL END) AS "nombreDeclarations"
FROM front.users AS us
LEFT OUTER JOIN front.user_organisme AS uo ON uo.use_id = us.id
LEFT OUTER JOIN front.organismes AS org ON org.id = uo.org_id
Expand Down

0 comments on commit 7eb4d5f

Please sign in to comment.