MGCEarmarkClaim
One claim - the customer credit an invoice account is owed for a set of accrued deal money. Claims are cut one per invoice account by deal currency, worked from a queue with assign and take, and approved through native workflow by somebody who is neither the generator nor the submitter. Evidence with a state machine: the row is never deleted, and its status moves only through the claim orchestrators. Settlement is standard accounts receivable - Earmark posts no payment and no settlement, and the claim ends at the credit.
Fields
| Name | Type | Mandatory | Description |
|---|---|---|---|
ClaimId | MGCEarmarkClaimId | Yes | The claim's identifier, issued from the claim number sequence and quoted to the customer as the first half of the claim reference. It is frozen from insert and can never be edited, because it has been printed on a statement and used as journal text. |
CounterpartyType | MGCEarmarkClaimCounterpartyType | No | Whether this claim credits a customer or a vendor. It is frozen from insert: the counterparty side decides which posting profile resolves the accounts and which native transaction table the credit lands in, so changing it would re-aim a posting that has already been described. |
CounterpartyAccount | MGCEarmarkAccountRelation | No | The trading party the deal was struck with - WHAT THE USER RECOGNIZES. On a chain account this is not the party that pays, which is why it is a separate column from the invoice account. It is shown so a claims clerk can recognize the claim; it is never the posting target. |
InvoiceAccount | MGCEarmarkAccountRelation | Yes | The account the credit posts to, and the key claims are grouped by - one claim per invoice account per deal currency. It is THE POSTING TARGET, and it is frozen from insert: moving it would re-aim a credit at a different customer without re-cutting the claim. |
CurrencyCode | CurrencyCode | Yes | The deal currency every line on this claim accrued in, and the second half of the grouping key. Amounts on the claim are held in it, with the accounting amount beside them. |
Status | MGCEarmarkClaimStatus | No | Where this claim stands. Written only by the claim orchestrators, and the table enforces that: outside the lifecycle write context a status change is refused in every case, including from a runnable job or a data-management load. Only five moves are legal, and approved is final. |
PostingStatus | MGCEarmarkClaimPostingStatus | No | Whether the claim's journals have posted. It starts at posting pending, which is the enum's zero precisely so that an unset value cannot claim a credit exists when it does not. |
AssignedTo | UserId | No | The user currently working this claim. Together with the status this drives the My claims and Unassigned queues. Assignment is deliberately free of the lifecycle write context: picking up work is not a state change and moves no money. |
AssignedDateTime | TransDateTime | No | When the current assignment was made. |
AssignedBy | UserId | No | Who made the current assignment. On a self-service take this is the same user as the assignee; on a supervisor assignment it is not, and the difference is worth keeping. |
GeneratedBy | UserId | No | Who ran the generator that created this claim. Frozen from insert, because it is half of the segregation-of-duties test at approval - the approver may not be the generator - and a stamp that could be edited afterwards would be worthless as a control. |
GeneratedDateTime | TransDateTime | No | When the claim was generated. Frozen from insert. |
SubmittedBy | UserId | No | Who submitted the claim for approval. The other half of the segregation-of-duties test: the approver may be neither the generator nor the submitter. |
SubmittedDateTime | TransDateTime | No | When the claim was submitted for approval. |
ApprovedBy | UserId | No | Who approved the claim. Approval is what posts the credit, so this is the name behind the money. |
ApprovedDateTime | TransDateTime | No | When the claim was approved, and therefore the date the credit ages from. |
WorkflowInstanceId | WorkflowInstanceId | No | The native workflow instance that carried this claim's approval. It is the second half of the idempotency key the integration operation uses, which is what makes a repeated approval call incapable of posting a second credit. |
ReversalRef | RefRecId | No | Links a reversed claim and the claim that later claims its money again. Earmark reverses a claim in place and puts its money back as new accumulated transactions, so the pair is completed when that money is claimed: on the reversed claim this names the first claim that took the money up again, and on that claim it names the reversed claim it replaces. Empty on a reversed claim until its money is claimed again, and on any claim that did not reuse reversed money. |
TotalAmountCur | MGCEarmarkClaimAmount | No | The total the claim asks for, in the deal currency, being the sum of its lines. It is what was ASKED FOR at generation - it is not what is still open on the credit, which is read live and never stored. |
TotalAmountMST | AmountMST | No | The claim total in the accounting currency. Each line carries the exchange rate that produced its own accounting amount; this total is the sum of those amounts, not a re-conversion of the transaction-currency total, so the claim and the ledger agree to the cent. |
ReturnFlagBadge | NoYesId | No | Whether any line on this claim carries a return that arrived after the claim was made and has not yet been accepted or rejected. Rolled up from the lines, never entered - it exists so a queue can show at a glance which claims need a human decision before they are submitted. |
Direction | MGCEarmarkAccrualDirection | No | Whether this claim's AP proposal posts as a debit (a receivable shape - supplier rebate, mirror) or a credit (the payable shape - third-party accrual) to the vendor. Owned by the vendor-shapes package (EAR-005); blank for a customer claim. |
SettlementRun | RefRecId | No | The vendor settlement run that generated this claim, when it was generated by one rather than manually. |