MGCEarmarkMigrationTieOut
The evidence that a cut-over load balances: general ledger tie-out lines, double-claim dispositions and control reconciliation dispositions, all under one batch. One table rather than three because the three answer one question - may this batch be certified - and certification has to ask it once. A tie-out line blocks certification while its variance is not zero; a disposition row blocks it while nobody has said what to do about the difference. Nothing here is ever deleted.
Fields
| Name | Type | Mandatory | Description |
|---|---|---|---|
MigrationBatchId | MGCEarmarkMigrationBatchId | Yes | The identifier of a cut-over migration batch, which is one ordered, idempotent run of the migration steps, each with its own validation and its own tie-out. It is allocated from the Migration batch ID number sequence, with a generated fallback while sequences are unconfigured. Because a certified tie-out cites the batch ID, the sequence may never be lowered. Implements requirement F10. |
MigrationBatch | RefRecId | No | The internal reference to the batch this row belongs to. The batch identifier travels beside it, because a record reference alone is useless in an export or after a further migration. |
RowKind | MGCEarmarkTieOutRowKind | No | |
SourceKey | MGCEarmarkSourceKey | Yes | The natural key the migrated row carried in the source system. It is half of the migration idempotency key - batch identifier plus source key - so a step that is re-run cannot load the same record twice, Retry selected reloads exactly one record, and Roll back step deletes by the same pair. It is recorded because the source identifier is the only thing a person reconciling a cut-over can look up on both sides. |
MainAccount | MainAccountNum | No | The main account this tie-out line compares. Tie-out is per main account and currency, because that is the grain the general ledger opening balance is available at. |
CurrencyCode | CurrencyCode | No | The transaction currency the migrated movements on this line were denominated in. It is part of the tie-out grain; the variance beside it is stated in the accounting currency, because the general ledger figure it is compared to already is. |
DealId | MGCEarmarkDealId | No | The deal this row is about, on a deal balance tie-out line or a control reconciliation row. A general ledger tie-out line names a main account instead. |
GLOpeningBalance | AmountMST | No | The opening balance the general ledger carries for this main account and currency. One of the two sides of a general ledger tie-out line. |
MigratedMovementTotal | AmountMST | No | The sum of the open migrated movements for this main account and currency. The other side of a general ledger tie-out line. |
RebuiltBalance | AmountMST | No | The deal balance as the product recomputes it from its own accrual movements, the opening balances step M-3 loaded included. On a deal line it is in the deal currency and in the sign Earmark uses for the deal balance (an amount owed to a customer is negative). One of the two sides of a deal tie-out line. |
BaselineBalance | AmountMST | No | The deal balance as the source system reported it, computed outside this product against the source database and loaded in. On a deal line it is stated in the deal currency and in the sign Earmark uses for the deal balance (an amount owed to a customer is negative), net of the approved credits not yet settled that step M-6 loads, because that is how the rebuilt balance beside it is measured. It is the only figure on a tie-out line that arrives from outside, and it has to: a baseline the product computed itself would prove nothing. |
Variance | MGCEarmarkTieOutVariance | No | The difference between the two sides of one tie-out line. On a general ledger tie-out line it is the opening balance less the sum of open migrated movements for that main account and currency, in the accounting currency, because the general ledger figure it is compared to is already in the accounting currency. On a deal line it is the rebuilt balance less the baseline, in the deal currency. ANY NON-ZERO VARIANCE BLOCKS CERTIFICATION, and no disposition clears it - a difference means the ledger does not balance, and nobody can sign that away. |
ProposedJournalNum | LedgerJournalId | No | The unposted general journal the currency re-statement step proposed for this currency. It is proposal-only and is left for ordinary review. Recording the number here is what makes a re-run safe: a re-run that finds this journal already exists does nothing and says so, rather than proposing a second one, and a rollback is refused while the journal is posted, with an instruction to raise a reversing journal first. It cannot be changed, because the whole mechanism depends on it pointing at the same journal it did the first time. |
ParentSourceKey | MGCEarmarkSourceKey | No | The source-system accrual that was claimed twice. The two credits raised against it are named beside this. |
CreditVoucher | Voucher | No | The voucher of the first customer credit raised against the double-claimed accrual. |
DuplicateCreditVoucher | Voucher | No | The voucher of the second customer credit raised against the same accrual - the one that makes this a double claim. |
CorrectionVoucher | Voucher | No | The voucher of the accounts receivable correction raised to put the duplicate right, where one was raised. It is recorded so that the disposition points at the transaction that carried it out rather than merely asserting that somebody did. |
DoubleClaimDisposition | MGCEarmarkDoubleClaimDisposition | No | |
ControlDisposition | MGCEarmarkControlReconciliationDisposition | No | |
DispositionReasonCode | ReasonCode | No | The reason code for the decision recorded on this row. A disposition clears a block on certifying a whole ledger load, so it must carry a reason and an actor; the table refuses one without the other. |
DispositionNote | MGCEarmarkReasonNote | No | Free text expanding on the reason for this decision. Optional, and the place to record the conversation that produced the decision. |
DispositionedBy | UserId | No | Who decided what to do about this difference. A disposition is a person taking responsibility for something a machine could not resolve, which is why it is attributable. |
DispositionedDateTime | TransDateTime | No | When the decision was recorded. |