ajout autres groupes dans ca_groupes
This commit is contained in:
@@ -56,7 +56,13 @@ def get_ca_groupe_12m(request, societe, datedeb, datefin):
|
||||
SUM(IF(groupe = 'AXA', totalht, 0)) AS AXA_ca,
|
||||
SUM(IF(groupe = 'AXA', 1, 0)) AS AXA_nb,
|
||||
SUM(IF(groupe = 'MAIF', totalht, 0)) AS MAIF_ca,
|
||||
SUM(IF(groupe = 'MAIF', 1, 0)) AS MAIF_nb
|
||||
SUM(IF(groupe = 'MAIF', 1, 0)) AS MAIF_nb,
|
||||
SUM(IF(groupe = 'DOMUS', totalht, 0)) AS DOMUS_ca,
|
||||
SUM(IF(groupe = 'DOMUS', 1, 0)) AS DOMUS_nb,
|
||||
SUM(IF(groupe = 'GMF', totalht, 0)) AS GMF_ca,
|
||||
SUM(IF(groupe = 'GMF', 1, 0)) AS GMF_nb,
|
||||
SUM(IF(groupe = 'MACIF', totalht, 0)) AS MACIF_ca,
|
||||
SUM(IF(groupe = 'MACIF', 1, 0)) AS MACIF_nb
|
||||
FROM bddevfac.facture
|
||||
WHERE societe=:societe and date >= :datedeb and date <= :datefin GROUP BY yymm;"""
|
||||
results = request.dbsession.execute(query, {'societe': societe, 'datedeb': datedeb.strftime("%Y-%m"), 'datefin': datefin.strftime("%Y-%m")})
|
||||
|
||||
Reference in New Issue
Block a user