fix: use qb for functions

This commit is contained in:
Rohit Waghchaure
2025-11-17 12:55:10 +05:30
committed by Akhil Narang
parent ec4d4a0d6c
commit d40e660a52
9 changed files with 23 additions and 15 deletions

View File

@@ -799,7 +799,7 @@ class EmailDigest(Document):
"status": ["not in", ("Cancelled")],
"company": self.company,
},
fields=["count(*) as count", "sum(grand_total) as grand_total"],
fields=[{"COUNT": "*", "as": "count"}, "sum(grand_total) as grand_total"],
)
def get_from_to_date(self):