Seal live dashboard event gaps
This commit is contained in:
@@ -3,10 +3,12 @@ session_start();
|
||||
require_once '../../../assets/utils/db_auth.php';
|
||||
require_once '../../../assets/utils/classes_ac/PostingWindowGuard.php';
|
||||
require_once '../../../assets/utils/classes_ac/GlManager.php';
|
||||
require_once '../../../assets/utils/notify_node.php';
|
||||
|
||||
require_role($user_role, ['owner', 'admin']);
|
||||
|
||||
$gl_id = (int)($data['gl_id'] ?? 0);
|
||||
$event_action = $gl_id > 0 ? 'replaced' : 'posted';
|
||||
$reference = trim((string)($data['reference'] ?? ''));
|
||||
$description = trim((string)($data['description'] ?? ''));
|
||||
$journal_date = trim((string)($data['journal_date'] ?? ''));
|
||||
@@ -73,6 +75,7 @@ try {
|
||||
$pdo2->commit();
|
||||
$answer['success'] = 1;
|
||||
$answer['gl_id'] = $gl_id;
|
||||
notify_node('gl_posted', gl_posted_payload('manual', (int)$gl_id, $event_action, $lines), $company_id);
|
||||
} catch (Exception $e) {
|
||||
if ($pdo2->inTransaction()) $pdo2->rollBack();
|
||||
$answer['message'] = $e->getMessage();
|
||||
|
||||
Reference in New Issue
Block a user