Skip to content

Commit b3a8188

Browse files
committed
Merge branch 'issue#2230' of github.com:suraj-webkul/laravel-crm into issue#2230
2 parents 6d68eb2 + 73f7174 commit b3a8188

File tree

1 file changed

+6
-0
lines changed
  • packages/Webkul/Admin/src/Helpers/Reporting

1 file changed

+6
-0
lines changed

packages/Webkul/Admin/src/Helpers/Reporting/Lead.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ public function getTotalLeadsOverTime($period = 'auto'): array
5555
{
5656
$this->stageIds = $this->allStageIds;
5757

58+
$totalMonths = $this->startDate->diffInMonths($this->endDate) + 1;
59+
60+
if ($totalMonths > 12) {
61+
$period = 'month';
62+
}
63+
5864
return $this->getOverTimeStats($this->startDate, $this->endDate, 'leads.id', 'created_at', $period);
5965
}
6066

0 commit comments

Comments
 (0)