Change 'Rack' to 'Bin'

This commit is contained in:
Thanakorn S
2026-05-27 17:14:53 +07:00
parent ea94b6a6ae
commit 987cf7ded9
41 changed files with 931 additions and 933 deletions
@@ -8,7 +8,7 @@
$warehouse_id = (int)($data['warehouse_id'] ?? 0);
$zone = trim($data['zone'] ?? '');
$aisle = trim($data['aisle'] ?? '');
$rack = trim($data['rack'] ?? '');
$bin = trim($data['bin'] ?? '');
if ($label_action !== 'list') {
require_role($user_role, ['owner', 'admin', 'staff']);
@@ -56,14 +56,14 @@
}
// Default: create
if ($barcode === '' || !$warehouse_id || $rack === '') {
if ($barcode === '' || !$warehouse_id || $bin === '') {
$answer['message'] = 'Location barcode data is incomplete.';
http_response_code(400);
exit(json_encode($answer));
}
try {
$output = $bm->createLocationLabel($barcode, $warehouse_id, $zone, $aisle, $rack);
$output = $bm->createLocationLabel($barcode, $warehouse_id, $zone, $aisle, $bin);
$answer['success'] = 1;
$answer['output'] = $output;
} catch (Exception $e) {
+4 -4
View File
@@ -13,11 +13,11 @@
if (isset($data['warehouse_to']) && $type === 'to') { $warehouse = (int)$data['warehouse_to']; $zone = $data['zone_to'] ?? $zone; $aisle = $data['aisle_to'] ?? $aisle; }
if (!empty($data['id'])) {
$output = $whMgmt->getRacksAll($warehouse, $zone, $aisle);
$output = $whMgmt->getBinsAll($warehouse, $zone, $aisle);
} elseif ($type === 'to') {
$output = $whMgmt->getRacksIn($warehouse, $zone, $aisle);
$output = $whMgmt->getBinsIn($warehouse, $zone, $aisle);
} elseif ($type === 'from') {
$output = $whMgmt->getRacksOut(
$output = $whMgmt->getBinsOut(
$warehouse,
$zone,
$aisle,
@@ -26,7 +26,7 @@
$data['serial_number'] ?? null
);
} else {
$output = $whMgmt->getRacksAll($warehouse, $zone, $aisle);
$output = $whMgmt->getBinsAll($warehouse, $zone, $aisle);
}
$answer['output'] = $output;
+1 -1
View File
@@ -10,7 +10,7 @@
$id = (int)($data['id'] ?? 0);
// When type=from and a lot is selected, filter warehouses to only those
// holding that specific lot in an approved, rack-occupied stock-in row.
// holding that specific lot in an approved, bin-occupied stock-in row.
if ($type === 'from' && $sku && $lot) {
$answer['output'] = $wh->getWarehousesByLot($sku, $lot);
} else {
@@ -11,7 +11,7 @@
$warehouse_id = (int)($data['warehouse_id'] ?? 0);
$zone = trim($data['zone'] ?? '');
$aisle = trim($data['aisle'] ?? '');
$rack = trim($data['rack'] ?? '');
$bin = trim($data['bin'] ?? '');
$product_sku = trim($data['product_sku'] ?? '');
$lot_number = trim($data['lot_number'] ?? '');
$serial = trim($data['serial_number'] ?? '');
@@ -22,7 +22,7 @@
$warehouse_id,
$zone,
$aisle,
$rack,
$bin,
$product_sku,
$lot_number,
$serial