<?php
declare(strict_types=1);ini_set('display_errors','0');header('Cache-Control: private, no-store, max-age=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);$data=$errors?['employees'=>[],'components'=>[],'details'=>[],'componentNames'=>[]]:scr_report($con,$access,$filters);?><!doctype html><html><head><meta charset="utf-8"><title>Salary Configuration Report</title><style>body{font:12px Arial;margin:18px;color:#111}h1{text-align:center}table{width:100%;border-collapse:collapse}th,td{border:1px solid #222;padding:6px}th{background:#eee}@media print{body{margin:0}}</style></head><body><h1>Salary Configuration Report</h1><?php if($errors):?><p><?=h(implode(' ',$errors))?></p><?php else:scr_render_table($data);?><script>window.addEventListener('load',()=>window.print())</script><?php endif;?></body></html>
