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:
Thanakorn S
2026-05-28 09:53:19 +07:00
co-authored by Claude Sonnet 4.6
parent 8f57ab5570
commit 5df67367fa
4 changed files with 49 additions and 49 deletions
+10 -10
View File
@@ -17,7 +17,7 @@
<div class="col-12">
<div class="d-flex flex-column flex-md-row justify-content-between align-items-md-center mb-5 gap-3">
<div>
<h1 class="fs-3 mb-1">Rack Occupancy</h1>
<h1 class="fs-3 mb-1">Bin Occupancy</h1>
<p class="mb-0">View occupied and available bin positions across all warehouses</p>
</div>
</div>
@@ -34,7 +34,7 @@
<i class="ti ti-box-seam fs-4"></i>
</div>
<div>
<span>Total Racks</span>
<span id="stat_label_bins">Total Bins</span>
<h2 class="fw-bold mb-0" id="stat_total">—</h2>
</div>
</div>
@@ -111,7 +111,7 @@
<div class="card-body p-6">
<div class="mb-6 d-flex align-items-center justify-content-between">
<div>
<h3 class="mb-1 fs-4">All Racks</h3>
<h3 class="mb-1 fs-4">All Bins</h3>
<p class="mb-0">Complete bin list across all warehouses</p>
</div>
</div>
@@ -131,7 +131,7 @@
<th>Warehouse</th>
<th class="th_loc_zone">Zone</th>
<th class="th_loc_aisle">Aisle</th>
<th class="th_loc_bin">Rack</th>
<th class="th_loc_bin">Bin</th>
<th>SKU</th>
<th>Product</th>
<th>Status</th>
@@ -154,8 +154,8 @@
<div class="card-body p-6">
<div class="mb-6 d-flex align-items-center justify-content-between">
<div>
<h3 class="mb-1 fs-4">Occupied Racks</h3>
<p class="mb-0">Racks currently holding stock</p>
<h3 class="mb-1 fs-4">Occupied Bins</h3>
<p class="mb-0">Bins currently holding stock</p>
</div>
</div>
<div class="col-lg-12 mb-5">
@@ -174,7 +174,7 @@
<th>Warehouse</th>
<th class="th_loc_zone">Zone</th>
<th class="th_loc_aisle">Aisle</th>
<th class="th_loc_bin">Rack</th>
<th class="th_loc_bin">Bin</th>
<th>SKU</th>
<th>Product</th>
<th>Action</th>
@@ -196,8 +196,8 @@
<div class="card-body p-6">
<div class="mb-6 d-flex align-items-center justify-content-between">
<div>
<h3 class="mb-1 fs-4">Available Racks</h3>
<p class="mb-0">Empty racks ready to receive stock</p>
<h3 class="mb-1 fs-4">Available Bins</h3>
<p class="mb-0">Empty bins ready to receive stock</p>
</div>
</div>
<div class="col-lg-12 mb-5">
@@ -216,7 +216,7 @@
<th>Warehouse</th>
<th class="th_loc_zone">Zone</th>
<th class="th_loc_aisle">Aisle</th>
<th class="th_loc_bin">Rack</th>
<th class="th_loc_bin">Bin</th>
<th>Action</th>
</tr>
</thead>