remove actions and data integrity

This commit is contained in:
Thanakorn S
2026-04-24 14:25:39 +07:00
parent a75e180686
commit 92d116fd21
26 changed files with 1325 additions and 249 deletions
+32
View File
@@ -0,0 +1,32 @@
<?php
session_start();
require '../../../assets/utils/db_auth.php';
require '../../../assets/utils/classes/WarehouseManager.php';
try {
dbTransaction($pdo2, function($pdo) use ($data, $company_id) {
$whMgmt = new WarehouseManager($pdo, $company_id);
$whMgmt->deleteStockIn(
(int)$data['id'],
(int)$data['wh']
);
});
$answer["success"] = 1;
} catch (PDOException $e) {
$answer["success"] = 0;
$answer["message"] = "Database error, please try again";
http_response_code(500);
} catch (Exception $e) {
$answer["success"] = 0;
$answer["message"] = $e->getMessage();
http_response_code(400);
}
exit(json_encode($answer));
?>