<?php
$availableTableColumns = array_keys($tableColumns); if ($reportFilters['contactDate']['startDate']) { $reportFilters['contactDate']['start'] = standard2mysqlDateConversion($reportFilters['contactDate']['startDate']); } if ($reportFilters['contactDate']['endDate']) { $reportFilters['contactDate']['end'] = standard2mysqlDateConversion($reportFilters['contactDate']['endDate']); } if ($reportFilters['addDate']['startDate']) { $reportFilters['addDate']['start'] = standard2mysqlDateConversion($reportFilters['addDate']['startDate']); } if ($reportFilters['addDate']['endDate']) { $reportFilters['addDate']['end'] = standard2mysqlDateConversion($reportFilters['addDate']['endDate']); } list($reportFilters['contactOfficeUser']['idOffice'], $reportFilters['contactOfficeUser']['idUser']) = explode("|", $reportFilters['contactOfficeUser']['id']); $reportExtraFilters = []; if ($reportFilters['corporate']['id']) { $reportExtraFilters['corporate'] = \Entity\Corporate::select($reportFilters['corporate']['id'])->fullDuplicatedCorporatesGroup; } try { include(__DIR__."/reportData_executeSQL.php"); include(__DIR__."/reportData_otherFields.php"); } catch (\DBException $e) { killReport("Could not run SQL in report. SQL error: ".$e->getMessage()); } catch (\Exception $e) { killReport("Could not process report. Error: ".$e->getMessage()); }