Skip to content
Extraits de code Groupes Projets
Valider 75a9f822 rédigé par Benjamin - Le Filament's avatar Benjamin - Le Filament
Parcourir les fichiers

[update] contribution report: do not count invoices without bordereau_id for CG Scop

parent d4445ed0
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -95,3 +95,16 @@ class ScopContributionReport(models.Model): ...@@ -95,3 +95,16 @@ class ScopContributionReport(models.Model):
] ]
domain += add_domain domain += add_domain
return domain return domain
def _where_invoice(self):
"""
Hérite la fonction parente pour ne prendre que les factures/avoirs rattachés à
un bordereau pour la CG Scop et toutes pour les autres sociétés
"""
where_str = super()._where_invoice()
where_str += """
AND (
(i.company_id = 1 AND i.bordereau_id is not null) OR (i.company_id != 1)
)
"""
return where_str
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter