mirror of
https://github.com/frappe/erpnext.git
synced 2026-10-29 22:57:42 +00:00
fix(setup): count only submitted documents in the sales person heatmap
(cherry picked from commit 1674287d0b)
This commit is contained in:
@@ -139,6 +139,7 @@ def get_timeline_data(doctype: str, name: str) -> dict[int, int]:
|
||||
.on(transaction.name == sales_team.parent)
|
||||
.select(UnixTimestamp(transaction[date_field]), Count("*"))
|
||||
.where(sales_team.sales_person == name)
|
||||
.where(transaction.docstatus == 1)
|
||||
.where(transaction[date_field] > CurDate() - Interval(years=1))
|
||||
.groupby(transaction[date_field])
|
||||
.run()
|
||||
|
||||
Reference in New Issue
Block a user