warehouse capacity and occupancy

This commit is contained in:
Thanakorn S
2026-04-23 08:24:30 +07:00
parent 35dd1a9fce
commit ed23c269ea
15 changed files with 429 additions and 85 deletions
@@ -24,7 +24,6 @@
":warehouse_name" => $data["warehouse_name"] ?? "",
":location" => $data["location"] ?? "",
":manager" => (int)($data["manager"] ?? 0),
":capacity" => (int)($data["capacity"] ?? 0),
":description" => $data["description"] ?? "",
":status" => (int)($data["status"] ?? 1),
":log" => json_encode($table_log, JSON_UNESCAPED_UNICODE),
@@ -36,7 +35,6 @@
`warehouse_name` = :warehouse_name,
`location` = :location,
`manager` = :manager,
`capacity` = :capacity,
`description` = :description,
`status` = :status,
`log` = :log
@@ -47,9 +45,9 @@
} else {
$sql = "INSERT INTO md_warehouse
(company_id, warehouse_name, location, manager, capacity, description, status, `log`)
(company_id, warehouse_name, location, manager, description, status, `log`)
VALUES
(:company_id, :warehouse_name, :location, :manager, :capacity, :description, :status, :log)";
(:company_id, :warehouse_name, :location, :manager, :description, :status, :log)";
}
$sth = $pdo->prepare($sql);
@@ -72,7 +70,7 @@
} catch (Exception $e) {
$answer["success"] = 0;
$answer["message"] = "Something went wrong";
$answer["message"] = $e->getMessage();
}
exit(json_encode($answer));