<?php
 $availableTableColumns = array_keys($tableColumns); if (is_array($reportFilters['docGroupType']) and $reportFilters['docGroupType']['d']) { $reportFilters['docGroupType'] = $reportFilters['docGroupType']['d']; } if (!$reportFilters['docGroupType'] or !in_array($reportFilters['docGroupType'], ['noGroup', 'groupByPivotDoc'])) { $reportFilters['docGroupType'] = "noGroup"; } $reportFilters['docDate']['startDate'] = standard2mysqlDateConversion($reportFilters['docDate']['startDate']); $reportFilters['docDate']['endDate'] = standard2mysqlDateConversion($reportFilters['docDate']['endDate']); $reportFilters['docType'] = array_keys((array)$reportFilters['docType']); try { include(__DIR__."/reportData_executeSQL.php"); include(__DIR__."/reportData_otherFields.php"); include(__DIR__."/reportData_loopRecords.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()); } 