accounting workflows

This commit is contained in:
Thanakorn S
2026-05-20 10:17:02 +07:00
parent 04a683bd02
commit 7396db6ffc
199 changed files with 23539 additions and 5345 deletions
@@ -0,0 +1,21 @@
<?php
session_start();
require '../../../assets/utils/db_auth.php';
require '../../../assets/utils/classes/PurchaseRequestManager.php';
$id = (int)($data['id'] ?? 0);
$prm = new PurchaseRequestManager($pdo2, $company_id);
if ($id > 0) {
$row = $prm->getById($id);
if (!$row) {
http_response_code(404);
exit(json_encode(['success' => 0, 'message' => 'Purchase request not found.']));
}
$answer['output'] = $row;
} else {
$answer['output'] = $prm->getList();
}
$answer['success'] = 1;
exit(json_encode($answer));