stock dash
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
session_start();
|
||||
|
||||
require '../../../assets/utils/db_auth.php';
|
||||
|
||||
|
||||
$sql = "SELECT SUM(total_in) as total_in, SUM(total_out) as total_out, COUNT(DISTINCT warehouse_id) as total_warehouse
|
||||
FROM warehouse_balance 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));
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user