Fix incomplete Rack→Bin rename: missing file renames, stale UI labels, ReportManager property bug
- 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>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
8f57ab5570
commit
5df67367fa
@@ -0,0 +1,19 @@
|
||||
<?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';
|
||||
|
||||
$report = new ReportManager($pdo2, $company_id);
|
||||
$total = $report->getTotalCapacity();
|
||||
$occupied = $report->getSpaceUsed();
|
||||
|
||||
$answer['output'] = $report->getRackOccupancy();
|
||||
$answer['total'] = $total;
|
||||
$answer['occupied'] = $occupied;
|
||||
$answer['empty'] = $total - $occupied;
|
||||
$answer['success'] = 1;
|
||||
exit(json_encode($answer));
|
||||
?>
|
||||
Reference in New Issue
Block a user