<?php
$availableTableColumns = array_keys($tableColumns); $reportFilters['docDate']['startDate'] = standard2mysqlDateConversion($reportFilters['docDate']['startDate']); $reportFilters['docDate']['endDate'] = standard2mysqlDateConversion($reportFilters['docDate']['endDate']); $reportFilters['docAddDate']['startDate'] = standard2mysqlDateConversion($reportFilters['docAddDate']['startDate']); $reportFilters['docAddDate']['endDate'] = standard2mysqlDateConversion($reportFilters['docAddDate']['endDate']); $reportFilters['processStatus'] = array_keys((array)$reportFilters['processStatus']); $reportFilters['extSystem'] = array_keys((array)$reportFilters['extSystem']); $reportFilters['idSupplier'] = $reportFilters['supplier']['id']; $reportFilters['idCorporate'] = $reportFilters['corporate']['id']; $reportFilters['idCustomer'] = $reportFilters['customer']['id']; $reportExtraFilters = []; if ($reportFilters['idSupplier']) { $reportExtraFilters['idSupplier'] = \Entity\Supplier::select($reportFilters['idSupplier'])->fullDuplicatedSuppliersGroup; } if ($reportFilters['idCorporate']) { $reportExtraFilters['idCorporate'] = \Entity\Corporate::select($reportFilters['idCorporate'])->fullDuplicatedCorporatesGroup; } if ($reportFilters['idCustomer']) { $reportExtraFilters['idCustomer'] = \Entity\Customer::select($reportFilters['idCustomer'])->fullDuplicatedCustomersGroup; } 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()); } 