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) {