MGCEarmarkAccrualJournalRegister
The link between a general journal that Earmark created and the accrual movement it carries. One row per journal, written as part of journal creation inside the movement transaction, holding the journal reference, the journal number, the voucher once it is stamped, the deal, accrual instance and accrual transaction behind it, the Earmark journal type, the movement type, and whether Earmark generated the journal. It is evidence: it is never deleted, it is exempt from retention, and it is the source of the guard that refuses deletion of an Earmark journal by hand. It is also the authority on which of the seven Earmark journal types a journal carries, because six journal names carry seven types - a claim approval reversal deliberately posts on the claim approval name so that a matched pair nets inside one journal. Implements requirement C11 and carries rule BR-45.
Fields
| Name | Type | Mandatory | Description |
|---|---|---|---|
AccrualInstance | RefRecId | No | The record reference of the accrual instance this journal posted against - the frozen commitment whose terms decided the amount, the accounts and the journal name. |
AccrualTrans | RefRecId | No | The 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. |
AutoPost | NoYesId | No | Whether this journal was created under the Post automatically setting for its movement type. It is frozen when the journal is created, so changing the setting later does not post journals that were created to be reviewed. Earmark posts a journal marked this way after the movement has been saved; if the posting fails, the movement is kept, stays Journal pending, and a Journal post row on the execution-exceptions workbench names the reason. |
Deal | RefRecId | No | The record reference of the deal whose money this journal moved. |
EarmarkJournalType | MGCEarmarkJournalType | No | Which 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. |
JournalNum | LedgerJournalId | Yes | The 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. |
LedgerJournalTable | RefRecId | Yes | The 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. |
MovementType | MGCEarmarkMovementType | No | The 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. |
SystemGenerated | NoYesId | No | Whether 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. |
Voucher | Voucher | No | The 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. |