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. |
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. |
LedgerJournalTableRecId | 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. |
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. |
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. |
DealRecId | RefRecId | No | The record reference of the deal whose money this journal moved. |
AccrualInstanceRecId | 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. |
AccrualTransRecId | 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. |
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. |