Synkronisering

Reports and calculations pull data from several sources. The API exposes endpoints to refresh source data and trigger recalculation.

Frozen state

When a financial statement is frozen (readyForAccountingAt or accountingCompletedAt is set), synchronization skips all recalculation. The endpoint still returns current data and checksums, but background, business information, year-end closing, tax return, and annual statement are not recalculated.

To force a full recalculation despite frozen state, include the ForceSync option:

{
    "fsUuid": "...",
    "options": ["SyncAll", "ForceSync"]
}
http POST http://api.tritt.test/finsta/financial-statements/:synchronize fsUuid=<fsUuid>
http POST http://api.tritt.test/finsta/financial-statements/-/trial-balances/:synchronize fsUuid=<fsUuid>
response-json
{
    "fsUuid": "131315d3-fd7b-4431-9abb-122e12af096c",
    "checksums": {
        "TrialBalance": "69fdb646fecb543d4de6c71265a84d22"
    }
}

Asset registry sync

The asset registry is normally not recomputed on every financial statement sync. Each AssetRegistryRoot carries a registryVersion field (an AssregVersion enum stored as its name) that is compared against AssregVersion.CURRENT at sync time. When equal, the sync is a no-op: no save, no AssetRegistryEvent. This means once a root has been brought up to current, subsequent FS syncs do nothing assreg-related.

Bumping AssregVersion.CURRENT is a deliberate decision made together with calculator or remark-assembler changes that need to roll across all existing roots. The enum is the chronological log of registry-behavior changes — each value has Javadoc explaining what shipped at that version. After a bump, the next FS sync touching each stale root runs the assreg sync once to bring it current, sets registryVersion, syncedAt, and checksum, then never runs again until the next bump.

Sync state on the root

Field Purpose

registryVersion

AssregVersion enum name (e.g. V1_RealEstateSplit). Compared to AssregVersion.CURRENT to decide whether to sync. Existing rows backfilled to V0_PreVersioning; new roots are created at AssregVersion.CURRENT. Null is equivalent to V0_PreVersioning.

syncedAt

Set whenever the sync runs successfully (gated or forced). Null for roots that have never been synced.

checksum

Whole-root content checksum recorded at last sync. Informational; useful for drift detection and external comparison.

Manual sync endpoint

To force a re-sync independently of the FS sync cascade, the assreg controller exposes a dedicated endpoint:

http POST http://api.tritt.test/finsta/asset-registry/-/:synchronize
{
    "rootUuid": "<rootUuid>",
    "options": ["ForceRun"]
}

Options:

  • SyncRealEstates, SyncFixedAssets — limit the sync to a subset; default (no selector options) syncs everything available.

  • SyncAll — sentinel meaning every currently-available selector.

  • DryRun — recompute and update sync-state fields in memory but do not persist.

  • OnlyIfStale — skip the sync entirely when the root is at AssregVersion.CURRENT. The cascade integration uses this to make steady-state FS syncs a no-op once a root is current.

  • ForceRun — persist entities even when their per-entity checksum is unchanged. Use when the per-entity calculateChecksumPart may have gaps (a reactive field not in the checksum) and you want to force the row write anyway.

Modifier options (DryRun, OnlyIfStale, ForceRun) are orthogonal: setting only modifiers does not narrow the selector set.

Returns the post-sync state of the root:

{
    "rootUuid": "...",
    "registryVersion": "V1_RealEstateSplit",
    "syncedAt": "2026-05-22T12:00:00Z",
    "checksum": "..."
}

Requires GA_ASSREG_SYNCHRONIZE.