- Rename rack_log.php → bin_log.php and rack_occupancy.php → bin_occupancy.php (occupy_rack.php was already calling bin_*.php, causing 404 on every load) - Fix occupy_rack.php: page title, stat card label (add id="stat_label_bins"), section headings, and <th> column headers still read "Rack/Racks" - Fix ReportManager: constructor wrote to $this->companyId (dynamic property) instead of the declared $this->company_id, causing all queries to filter on company_id = 0 under strict PHP 8.2+ property semantics Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
22 lines
661 B
PHP
22 lines
661 B
PHP
<?php
|
|
session_start();
|
|
require_once '../../../assets/utils/db_auth.php';
|
|
require_once '../../../assets/utils/classes/UsageGuard.php';
|
|
|
|
(new UsageGuard($pdo1, $company_id, $packages))->assertFeatureAccessible('reports');
|
|
require_once '../../../assets/utils/classes/ReportManager.php';
|
|
|
|
$bin_id = (int)($data['bin_id'] ?? 0);
|
|
|
|
if (!$bin_id) {
|
|
$answer['output'] = [];
|
|
$answer['success'] = 1;
|
|
exit(json_encode($answer));
|
|
}
|
|
|
|
$report = new ReportManager($pdo2, $company_id, $db_database);
|
|
$answer['output'] = $report->getBinLog($bin_id);
|
|
$answer['success'] = 1;
|
|
exit(json_encode($answer));
|
|
?>
|