[OOP] contact,inventory,ics,dashboard
This commit is contained in:
@@ -1,29 +1,10 @@
|
||||
<?php
|
||||
<?php
|
||||
session_start();
|
||||
|
||||
require '../../../assets/utils/db_auth.php';
|
||||
require '../../../assets/utils/classes/WarehouseManager.php';
|
||||
|
||||
$sql = "SELECT a.*, b.warehouse_name
|
||||
FROM md_storage a
|
||||
LEFT JOIN md_warehouse b ON
|
||||
a.company_id = b.company_id and
|
||||
a.warehouse = b.id
|
||||
WHERE
|
||||
a.company_id = :company_id ";
|
||||
$sth = $pdo2->prepare($sql);
|
||||
$sth->execute([
|
||||
":company_id" => $company_id
|
||||
]);
|
||||
db_check($sth, $answer);
|
||||
|
||||
$answer["output"] = $sth->fetchAll(PDO::FETCH_ASSOC);
|
||||
|
||||
// modify output
|
||||
foreach($answer["output"] as $key => $item){
|
||||
|
||||
}
|
||||
|
||||
$answer["success"] = 1;
|
||||
$wh = new WarehouseManager($pdo2, $company_id);
|
||||
$answer['output'] = $wh->getStorageList();
|
||||
$answer['success'] = 1;
|
||||
exit(json_encode($answer));
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user