Articles in this section

The compliance trail and retention

Published:
Updated:

Every action taken on a Beleg (receipt/expense document) is written to an immutable, append-only audit trail, and every automated data-retention run is logged. This article explains how to query the compliance trail and read retention status. Both require the belege:compliance-trail permission, which is granted to fleet-manager and administrator roles.

What the compliance trail records

The trail is the governance backbone of the Belege module. It captures workflow events as they happen and cannot be edited after the fact. Recorded events include, among others:

  • State transitions and denied transitions (including the reason a transition was refused).
  • Submit denials that failed validation.
  • Warning overrides, with the reason and the acting user.
  • Financial corrections (before-and-after values) and any denied correction attempts.
  • Financial snapshots captured at approval and payment.

Each entry stores the action, the entity type and id, the acting user and email, a timestamp, and a payload with the event details.

Searching the access trail

You can query the trail with optional filters and page through the results:

  • Entity — narrow to a specific Beleg.
  • Driver — return events for Belege linked to a particular driver.
  • Start and end date — bound the time window.

Results are returned in chronological order (oldest first) so you can read an entity's history as a timeline, together with a total count for the matching filter.

Tip: To reconstruct the full life of one Beleg — who submitted, reviewed, overrode, corrected, approved, and paid it — filter by that Beleg's entity id and read the timeline top to bottom.

Reading retention status

A scheduled retention process removes aged records according to your company's retention policy, and each run is logged immutably per company. The retention status view lists recent runs, most recent first, so you can confirm the process is executing and healthy. Each run entry shows:

FieldMeaning
Run timeWhen the retention run executed.
SuccessWhether the run completed without error.
Error messageThe failure detail when a run did not succeed.
Records deletedHow many aged records and audit entries were removed.

Compliance reporting trends

Beyond the raw trail, a compliance reporting dashboard aggregates warning trends, override trends, and record counts by Beleg type over a date range. This reporting view is gated by the reports permission (reports:view-all) rather than the compliance-trail permission, so it may be available to a different set of users.

Related

  • Rule warnings, blockers, and override governance
  • Making a financial correction during review
  • Approving a Beleg and how approval locks the record
  • The expense dashboard and exports
AH
Written by Alexander Hagemann
Updated:
Access denied
Access denied