fix onboarding bugs

This commit is contained in:
Thanakorn S
2026-05-21 16:51:19 +07:00
parent fdf6292466
commit b76dc679af
7 changed files with 28 additions and 12 deletions
+7 -2
View File
@@ -4,7 +4,12 @@
require '../../../assets/utils/classes/WarehouseManager.php';
$wh = new WarehouseManager($pdo2, $company_id);
$answer['output'] = $wh->getWarehouseListAll();
$answer['success'] = 1;
$answer['output'] = $wh->getWarehouseListAll();
if (empty($answer['output'])) {
$answer['success'] = 0;
$answer['message'] = 'No warehouse found. Please go to <b>Inventory → Warehouse</b> to create your first warehouse before using this page.';
} else {
$answer['success'] = 1;
}
exit(json_encode($answer));
?>