Skip to main content

MGCEarmarkAccrualJournalRegisterEntity

The audit trace from a general-ledger voucher to the Earmark accrual movement that produced it, read-only, keyed on the journal number and the voucher - the pair an auditor actually arrives holding. Each row names the journal Earmark created, the voucher it wrote once it posted, the deal, accrual instance and accrual transaction behind it, which of the seven Earmark journal types it carries, which movement it posted, and whether Earmark generated it. Read the Earmark journal type from this entity rather than inferring it from the journal name: six journal names carry seven types, because a claim approval reversal posts on the claim approval name so that a matched pair nets inside one journal. The deal, instance and transaction travel as record references and are joined in the consuming store to the accrual transaction, accrual instance and deal entities; embedding those joins here would make one audit surface depend on three other tables' column names. A blank voucher is a legitimate row: a journal created with auto-posting off has no voucher until it posts. The entity cannot create, change or delete a register row - the register is evidence, exempt from retention, and has no purge path at all. Implements requirement C11 and carries rule BR-45.

  • Public collection name: MGCEarmarkAccrualJournalRegisters
  • Primary key: JournalNum, Voucher

Fields​

NameTypeMandatoryDescription
JournalNumLedgerJournalIdYesThe journal number of the general journal this row registers, stored beside the record reference so that the row stays readable in an export and meaningful after a migration. It is half of the audit entity's key, because a journal number and a voucher are what an auditor actually arrives holding.
VoucherVoucherNoThe voucher this journal wrote. It is blank until the journal posts: a journal created with auto-posting off has no final voucher, and the post-commit journal sync stamps it when the native post commits. It may be filled in once and never changed afterwards, because a re-stamped voucher would silently re-point the audit trail at a different posting.
LedgerJournalTableRecIdRefRecIdYesThe record reference of the general journal header this row registers. It is the register's unique key - one register row per journal - and it is what the journal delete-guard probes when somebody tries to delete a journal. It is stored beside the journal number rather than instead of it, because a record reference is unreadable in an export while a journal number alone is not unique across companies.
EarmarkJournalTypeMGCEarmarkJournalTypeNoWhich of the seven kinds of Earmark posting this journal carries. This column, not the journal name and not any native journal type, is the authoritative discriminator: six journal names carry seven types, because a claim approval reversal posts on the claim approval name so that a reversal and the approval it reverses net inside one journal. Nothing downstream may infer the Earmark journal type from the journal name.
MovementTypeMGCEarmarkMovementTypeNoThe movement this journal posted. It is checked against the Earmark journal type as a pair when the row is written, because the two are decided together by the journal creator and a row whose type contradicts its movement would describe a posting that never happened that way. The mapping is not one to one: an accrual reversal and a return reversal both post under the Reversal journal type.
DealRecIdRefRecIdNoThe record reference of the deal whose money this journal moved.
AccrualInstanceRecIdRefRecIdNoThe record reference of the accrual instance this journal posted against - the frozen commitment whose terms decided the amount, the accounts and the journal name.
AccrualTransRecIdRefRecIdNoThe record reference of the accrual transaction this journal carries. It is blank at the moment the register row is written and filled in immediately afterwards, because the journal is created at step six of the movement pipeline and the transaction it belongs to is written at step seven. Like the voucher it may be filled in once and never changed.
SystemGeneratedNoYesIdNoWhether Earmark created this journal. It is the source of the journal delete-guard: a journal with a system-generated register row cannot be deleted by hand, because deleting it would strand the accrual transaction that points at it - the movement would have posted, the balance would hold the money, and the voucher behind it would be gone. It defaults to Yes, because every row this table is designed to hold is one the journal creator made.

Mappings​

Entity fieldData sourceField
JournalNumMGCEarmarkAccrualJournalRegisterJournalNum
VoucherMGCEarmarkAccrualJournalRegisterVoucher
LedgerJournalTableRecIdMGCEarmarkAccrualJournalRegisterLedgerJournalTable
EarmarkJournalTypeMGCEarmarkAccrualJournalRegisterEarmarkJournalType
MovementTypeMGCEarmarkAccrualJournalRegisterMovementType
DealRecIdMGCEarmarkAccrualJournalRegisterDeal
AccrualInstanceRecIdMGCEarmarkAccrualJournalRegisterAccrualInstance
AccrualTransRecIdMGCEarmarkAccrualJournalRegisterAccrualTrans
SystemGeneratedMGCEarmarkAccrualJournalRegisterSystemGenerated