FIX_downloadExcelPerformingAgentsByID removed monthly and 10 days
This commit is contained in:
parent
02c2b3739e
commit
08dde95f77
@ -1842,13 +1842,19 @@ class ExcelExportController extends ResourceController
|
||||
// $builder->where('pp.manager_id', $managerId);
|
||||
$builder->where('pp.policy_number IS NOT NULL');
|
||||
$builder->where('pa.id', $AgentId);
|
||||
|
||||
$fromDate = date('Y-m-d', strtotime('-10 days'));
|
||||
$toDate = date('Y-m-d');
|
||||
|
||||
$builder->where('pp.issued_date >=', $fromDate);
|
||||
$builder->where('pp.issued_date <=', $toDate);
|
||||
|
||||
|
||||
// Current Month Date Range Filter
|
||||
// if ($month === "current") {
|
||||
// // WHERE issued_date >= start_of_current_month AND issued_date < start_of_next_month
|
||||
$builder->where("pp.issued_date >= DATE_FORMAT(CURRENT_DATE(), '%Y-%m-01')", NULL, FALSE);
|
||||
$builder->where("pp.issued_date < DATE_FORMAT(DATE_ADD(CURRENT_DATE(), INTERVAL 1 MONTH), '%Y-%m-01')", NULL, FALSE);
|
||||
// $builder->where("pp.issued_date >= DATE_FORMAT(CURRENT_DATE(), '%Y-%m-01')", NULL, FALSE);
|
||||
// $builder->where("pp.issued_date < DATE_FORMAT(DATE_ADD(CURRENT_DATE(), INTERVAL 1 MONTH), '%Y-%m-01')", NULL, FALSE);
|
||||
// }
|
||||
// else if ($month === "previous") {
|
||||
// // WHERE issued_date >= start_of_previous_month AND issued_date < start_of_current_month
|
||||
|
||||
Loading…
Reference in New Issue
Block a user