PHP event trigger by NodeJS [stock dashboard]

This commit is contained in:
Thanakorn S
2026-05-25 14:33:36 +07:00
parent 1237888ab9
commit 8027ab569e
15 changed files with 227 additions and 1 deletions
+2
View File
@@ -3,6 +3,7 @@
require_once '../../../assets/utils/db_auth.php';
require_role($user_role, ['owner', 'admin']);
require_once '../../../assets/utils/classes/InvoiceManager.php';
require_once '../../../assets/utils/notify_node.php';
$id = (int)($data['id'] ?? 0);
@@ -20,6 +21,7 @@
$answer['success'] = 1;
$answer['message'] = 'Invoice voided.';
notify_node('invoice_updated', [], $company_id);
} catch (PDOException $e) {
$answer['message'] = 'Database error, please try again.';