Seal live dashboard event gaps

This commit is contained in:
Thanakorn S
2026-05-25 17:02:52 +07:00
parent 4733c78ac6
commit 4f884177a5
13 changed files with 147 additions and 17 deletions
+3
View File
@@ -32,6 +32,9 @@
$answer['message'] = 'Return confirmed.';
$answer['auto_cn'] = $auto_cn;
notify_node('return_updated', [], $company_id);
if ($auto_approve) {
notify_node('stock_updated', ['warehouse_id' => 0, 'type' => 'in'], $company_id);
}
if ($auto_cn) {
notify_node('invoice_updated', [], $company_id);
}
+1 -1
View File
@@ -57,7 +57,7 @@
}
$pdo2->commit();
notify_node('gl_posted', ['doc_type' => $doc['doc_type'], 'id' => $id, 'action' => 'posted'], $company_id);
notify_node('gl_posted', gl_posted_payload((string)$doc['doc_type'], (int)$id, $existing ? 'replaced' : 'posted', $built['lines'] ?? []), $company_id);
$answer['gl_posted'] = true;
} catch (Exception $e) {
if ($pdo2->inTransaction()) $pdo2->rollBack();