Files
wms-app/app/ics/api/engine/warehouse_stats.php
T
2026-03-21 14:58:15 +07:00

24 lines
527 B
PHP

<?php
session_start();
require '../../../assets/utils/db_auth.php';
$sql = "SELECT SUM(capacity) as total_capacity, count(*) as total_warehouse
FROM md_warehouse a
WHERE
a.company_id = :company_id
";
$sth = $pdo2->prepare($sql);
$sth->execute([
":company_id" => $company_id
]);
db_check($sth, $answer);
$output = $sth->fetch(PDO::FETCH_ASSOC);
$answer["output"] = $output;
$answer["success"] = 1;
exit(json_encode($answer));
?>