<?php
declare(strict_types=1);define('SCR_EXPORT',true);ini_set('display_errors','0');require_once __DIR__.'/../includes/aclhelper.php';require_login();require_acl('can_view','salary-config/salary-configuration-report.php');require_once __DIR__.'/salary-configuration-report-common.php';$errors=[];$access=gsr_access($con);$options=scr_options($con,$access);$filters=scr_filters($con,$access,$options,$errors);if($errors){http_response_code(400);exit('Invalid report filters.');}$data=scr_report($con,$access,$filters);header('Content-Type: application/vnd.ms-excel; charset=UTF-8');header('Content-Disposition: attachment; filename="Salary Configuration Report '.date('Y-m-d').'.xls"');header('X-Content-Type-Options: nosniff');echo "\xEF\xBB\xBF";?><html xmlns:x="urn:schemas-microsoft-com:office:excel"><head><meta charset="utf-8"></head><body><h2>Salary Configuration Report</h2><?php scr_render_table($data);?></body></html>
