fix: Phase C IPSAS matrix (2100/2410 HO legs) and runtime double-entry guards
Some checks failed
CI/CD Pipeline / Solidity Contracts (push) Failing after 1m16s
CI/CD Pipeline / Security Scanning (push) Successful in 2m39s
CI/CD Pipeline / Lint and Format (push) Failing after 50s
CI/CD Pipeline / Terraform Validation (push) Failing after 25s
CI/CD Pipeline / Kubernetes Validation (push) Successful in 30s
HYBX OMNL TypeScript & anchor / token-aggregation build + reconcile artifact (push) Failing after 29s
OMNL reconcile anchor / Run omnl:reconcile and upload artifacts (push) Failing after 29s
Validation / validate-genesis (push) Successful in 30s
Validation / validate-terraform (push) Failing after 30s
Validation / validate-kubernetes (push) Failing after 13s
Validation / validate-smart-contracts (push) Failing after 11s
Validation / validate-security (push) Failing after 1m24s
Validation / validate-documentation (push) Failing after 20s
Verify Deployment / Verify Deployment (push) Failing after 1m7s
Some checks failed
CI/CD Pipeline / Solidity Contracts (push) Failing after 1m16s
CI/CD Pipeline / Security Scanning (push) Successful in 2m39s
CI/CD Pipeline / Lint and Format (push) Failing after 50s
CI/CD Pipeline / Terraform Validation (push) Failing after 25s
CI/CD Pipeline / Kubernetes Validation (push) Successful in 30s
HYBX OMNL TypeScript & anchor / token-aggregation build + reconcile artifact (push) Failing after 29s
OMNL reconcile anchor / Run omnl:reconcile and upload artifacts (push) Failing after 29s
Validation / validate-genesis (push) Successful in 30s
Validation / validate-terraform (push) Failing after 30s
Validation / validate-kubernetes (push) Failing after 13s
Validation / validate-smart-contracts (push) Failing after 11s
Validation / validate-security (push) Failing after 1m24s
Validation / validate-documentation (push) Failing after 20s
Verify Deployment / Verify Deployment (push) Failing after 1m7s
Align interoffice HO allocations to 2100→2410 with branch 1410→2100 two-leg entries, registry v1.2.1, explicit same-GL rejection in validators, doc matrices, and validation tests. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -4,6 +4,7 @@ import { omnlSensitiveRouteGuard, omnlRequireApiKeyInProduction } from '../middl
|
||||
import { omnlAuditMiddleware } from '../middleware/omnl-audit-middleware';
|
||||
import {
|
||||
loadIpsasRegistry,
|
||||
isDoubleEntryPair,
|
||||
validateJournalPairWithMatrix,
|
||||
fetchFineractGlAccounts,
|
||||
compareRegistryToFineract,
|
||||
@@ -78,7 +79,9 @@ router.post('/omnl/ipsas/validate-pairs', (req: Request, res: Response) => {
|
||||
return {
|
||||
debitGlCode,
|
||||
creditGlCode,
|
||||
doubleEntryValid: debitGlCode !== creditGlCode,
|
||||
ipsasCompliantPair: v.valid,
|
||||
rejectReason: v.rejectReason,
|
||||
ipsasRef: v.ipsasRef,
|
||||
memo: v.memo,
|
||||
narrative: v.narrative,
|
||||
@@ -107,13 +110,16 @@ router.get('/omnl/ipsas/validate-pair', (req: Request, res: Response) => {
|
||||
} catch {
|
||||
matrix = null;
|
||||
}
|
||||
const doubleEntryValid = isDoubleEntryPair(debitGlCode, creditGlCode);
|
||||
const v = validateJournalPairWithMatrix(registry, matrix, debitGlCode, creditGlCode);
|
||||
const debitKnown = registry.accounts.some((a) => a.glCode === debitGlCode);
|
||||
const creditKnown = registry.accounts.some((a) => a.glCode === creditGlCode);
|
||||
res.json({
|
||||
debitGlCode,
|
||||
creditGlCode,
|
||||
doubleEntryValid,
|
||||
ipsasCompliantPair: v.valid,
|
||||
rejectReason: v.rejectReason,
|
||||
ipsasRef: v.ipsasRef,
|
||||
memo: v.memo,
|
||||
narrative: v.narrative,
|
||||
|
||||
Reference in New Issue
Block a user