fix: adapt to query builder

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
This commit is contained in:
Akhil Narang
2025-11-16 22:50:58 +05:30
parent d40e660a52
commit 1cf9f903e5
49 changed files with 225 additions and 132 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):