<?php
$availableTableColumns = array_keys($tableColumns);
// PREPROCESS FILTERS /////////////////////////////////////////////////////////////////////////////
// cleanup dates
$reportFilters['balanceDate']['startDate'] = standard2mysqlDateConversion($reportFilters['balanceDate']['startDate']);
$reportFilters['balanceDate']['endDate'] = standard2mysqlDateConversion($reportFilters['balanceDate']['endDate']);

// cleanup responsible user
list($reportFilters['responsibleOfficeUser']['idOffice'], $reportFilters['responsibleOfficeUser']['idUser']) = explode("|", $reportFilters['responsibleOfficeUser']['id']);

try {
	// EXCUTE MAIN SQLs ---------------------------------------------------------------------------
	include(__DIR__."/reportData_executeSQL.php");

	// FILL IN OTHER FIELDS -----------------------------------------------------------------------
	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());
}
