Skip to main content

MGCEarmarkClaimLineEntity

The read-only export of Earmark claim lines - the grain of the credit and of the claim statement. It is keyed on the claim ID and the line number, which together are the reference quoted to the counterparty; the line number is immutable after insert so that a reference already printed on a statement, and already written as the text of a posted journal line, keeps resolving. The statement's own columns - customer purchase order, sales order, invoice, invoice date, packing slip and ship date - are carried on the line because they are copied from the accrual transaction when the claim is generated, which is what lets the companion export and the accounts-receivable working list be a single query. There is deliberately no remaining or settled amount here: a claim ends at the credit, the remaining amount is always read live, and a stored copy would be stale the moment accounts receivable settled anything. Implements requirement D1.

  • Public collection name: MGCEarmarkClaimLines
  • Primary key: ClaimId, LineNum

Fields​

NameTypeMandatoryDescription
ClaimIdMGCEarmarkClaimIdYesThe 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.
LineNumLineNumYesThe line's number within its claim, and the second half of the reference the customer quotes. IT IS IMMUTABLE ONCE THE LINE EXISTS. Renumbering would change a reference already printed on a statement and already used as journal text, so our copy and the customer's would disagree with nothing to say which is right.
ClaimReferenceMGCEarmarkClaimLineRefNoThe customer-facing reference for one claim line, composed as the claim ID, a hyphen and the line number. It is computed on read and never stored, because a stored copy would be a third place the string lives and the one that would eventually disagree with the two columns it was built from. Both halves are immutable, so the reference cannot change once it has been quoted. This is the string a counterparty reads back over the telephone and the string written as the text of the credit's journal line, so it is composed in exactly one place in the product and every surface that shows it shows the same characters.
ClaimStatusMGCEarmarkClaimStatusNoWhere 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.
CounterpartyTypeMGCEarmarkClaimCounterpartyTypeNoWhether 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.
CounterpartyAccountMGCEarmarkAccountRelationNoThe 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.
InvoiceAccountMGCEarmarkAccountRelationYesThe 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.
CurrencyCodeCurrencyCodeYesThe 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.
AccrualTransIdMGCEarmarkAccrualTransIdYesThe accrual transaction's natural key, stored beside its record id because a record id alone is useless in an export, a data-management load or after a migration.
AccrualInstanceIdMGCEarmarkAccrualInstanceIdYesThe identifier of this commitment, drawn from the accrual instance number sequence when the instance was created. It is the readable key every downstream surface quotes - the accrual transaction chain, the claim statement, the reconciliation tie-out and the migration certificate - and it is the primary key of the accrual instance data entity, so it survives an export, a lake load and a migration where a record ID would not. It is assigned once and never changes.
DealIdMGCEarmarkDealIdNoThe deal's natural key, copied at generation so the line remains readable in an export and after a migration.
DealGroupIdMGCEarmarkDealGroupIdNoThe deal group the deal belonged to at generation, copied so a statement can be grouped by program without joining back to the deal.
ItemIdItemIdNoThe item the claimed money accrued on, copied from the accrual transaction at generation.
QtyMGCEarmarkDealQtyNoThe quantity the claimed accrual was calculated on, in the unit beside it, copied at generation. The statement shows it so a customer can check the arithmetic.
QtyUnitUnitOfMeasureSymbolNoThe unit the claimed quantity is expressed in. The conversion factor that produced it was snapshotted on the accrual instance when it was built, so the figure cannot drift if a unit conversion is later changed.
RateMGCEarmarkAllowanceAmountNoThe deal rate applied to produce the claimed amount, copied at generation. Shown on the statement beside the quantity so the customer can see how the figure was arrived at.
RateUnitUnitOfMeasureSymbolNoThe unit the rate is per. A rate without its unit is not a rate a customer can check.
ClaimAmountCurMGCEarmarkClaimAmountNoThe credit this line asks for, in the deal currency. Taken from the accrual transaction rather than recalculated, so a claim and the accrual behind it cannot disagree by a rounding residue.
ClaimAmountMSTAmountMSTNoThe claim amount in the accounting currency, carried from the accrual transaction together with the exchange rate that produced it.
CustomerPOCustPurchaseOrderNoThe customer's own purchase order reference, copied from the accrual transaction at generation. It is on the statement because it is usually the only reference the customer's accounts payable department recognizes.
SalesIdSalesIdBaseNoThe sales order the claimed movement came from, copied at generation. Held as a plain value rather than a live lookup, because a claim outlives the order it came from and a dangling lookup would be worse than a recorded number.
InvoiceIdInvoiceIdNoThe customer invoice the claimed movement was accrued against, copied at generation.
InvoiceDateTransDateNoThe date of that invoice, copied at generation and shown on the statement.
PackingSlipIdPackingSlipIdNoThe packing slip the claimed movement came from, copied at generation.
ShipDateTransDateNoThe date the goods moved, copied at generation. On a claim accrued at shipment this is the date the money was earned.
ApprovalJournalNumLedgerJournalIdNoThe journal that carried this line's approval credit. It cannot exist when the line is generated, so it is filled in once when the approval posts and can never be changed afterwards.
ApprovalVoucherVoucherNoThe voucher of this line's approval credit - one voucher per claim line, not one per journal, so a customer transaction can be traced back to a single claim line. Filled in once when the posting commits; a re-stamped voucher would silently re-point the audit trail at a different posting.
PostingStatusMGCEarmarkClaimPostingStatusNoWhether this line's approval credit has posted. The credit does not exist until it is posted, and the statement excludes the line until then - there is deliberately no phantom transaction.
ReturnFlagNoYesIdNoWhether a return arrived against this line's source document after the claim was made. It is a flag for a human, not an automatic adjustment: what should happen to a claim whose goods came back is a commercial decision, and the parameter decides whether an unresolved flag blocks submission.
ReturnFlagAcceptedNoYesIdNoWhether the return flag on this line has been reviewed and accepted. An accepted flag stops blocking submission; an unresolved one may still do so, depending on the parameter.
ReturnFlagReasonMGCEarmarkReasonNoteNoWhy the return flag was accepted or rejected. Kept because the decision is commercial and will be asked about later.

Mappings​

Entity fieldData sourceField
ClaimIdClaimClaimId
LineNumMGCEarmarkClaimLineLineNum
ClaimStatusClaimStatus
CounterpartyTypeClaimCounterpartyType
CounterpartyAccountClaimCounterpartyAccount
InvoiceAccountClaimInvoiceAccount
CurrencyCodeClaimCurrencyCode
AccrualTransIdMGCEarmarkClaimLineAccrualTransId
AccrualInstanceIdAccrualInstanceAccrualInstanceId
DealIdMGCEarmarkClaimLineDealId
DealGroupIdMGCEarmarkClaimLineDealGroupId
ItemIdMGCEarmarkClaimLineItemId
QtyMGCEarmarkClaimLineQty
QtyUnitMGCEarmarkClaimLineQtyUnit
RateMGCEarmarkClaimLineRate
RateUnitMGCEarmarkClaimLineRateUnit
ClaimAmountCurMGCEarmarkClaimLineClaimAmountCur
ClaimAmountMSTMGCEarmarkClaimLineClaimAmountMST
CustomerPOMGCEarmarkClaimLineCustomerPO
SalesIdMGCEarmarkClaimLineSalesId
InvoiceIdMGCEarmarkClaimLineInvoiceId
InvoiceDateMGCEarmarkClaimLineInvoiceDate
PackingSlipIdMGCEarmarkClaimLinePackingSlipId
ShipDateMGCEarmarkClaimLineShipDate
ApprovalJournalNumMGCEarmarkClaimLineApprovalJournalNum
ApprovalVoucherMGCEarmarkClaimLineApprovalVoucher
PostingStatusMGCEarmarkClaimLinePostingStatus
ReturnFlagMGCEarmarkClaimLineReturnFlag
ReturnFlagAcceptedMGCEarmarkClaimLineReturnFlagAccepted
ReturnFlagReasonMGCEarmarkClaimLineReturnFlagReason