Skip to main content

MGCEarmarkClaimStatementLineEntity

The read-only export of the available lines on the Earmark claim statement - approved claim lines whose credit still has an open amount. This is the companion spreadsheet that goes out beside the statement and the working list accounts receivable applies cash from, and it is built from the same live data the statement itself is built from, so the two can never disagree. The remaining amount is read live from the open-lines view rather than stored, which is what makes a re-run reflect settlements made since the last statement without anything being recalculated or archived. The statement itself carries no document number and is never archived; a run identifier exists for the internal run log and is not a number a customer can quote. Implements requirements D14, D15 and D16.

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

Fields​

NameTypeMandatoryDescription
ClaimIdMGCEarmarkClaimIdNoThe identifier of an Earmark claim document. It is allocated from the Claim ID number sequence held on the Earmark parameters record, with a generated fallback while sequences are unconfigured; a claim ID that reads as a generated value tells an accounts-receivable clerk at a glance that the number sequences have not been set up yet. Because the claim ID is quoted to the counterparty on the claim statement and printed on the credit, its number sequence may never be lowered. Implements requirement D1.
LineNumLineNumNo
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.
CounterpartyTypeMGCEarmarkClaimCounterpartyTypeNo
CounterpartyAccountMGCEarmarkAccountRelationNoThe customer, vendor, customer group or vendor group that a deal targeting row or a posting profile row selects, read according to that row's account code and the deal's module. It is sixty characters, matching the item relation type rather than the twenty-character standard relation type, so that the two halves of a selector pair behave identically and neither truncates a value the other would keep. It is mandatory for every account code except All, which must leave it blank. Implements requirements A5 and A10.
InvoiceAccountMGCEarmarkAccountRelationNoThe customer, vendor, customer group or vendor group that a deal targeting row or a posting profile row selects, read according to that row's account code and the deal's module. It is sixty characters, matching the item relation type rather than the twenty-character standard relation type, so that the two halves of a selector pair behave identically and neither truncates a value the other would keep. It is mandatory for every account code except All, which must leave it blank. Implements requirements A5 and A10.
CurrencyCodeCurrencyCodeNo
DealIdMGCEarmarkDealIdNoThe identifier of the Earmark deal. It is allocated from the Deal ID number sequence registered on the Earmark parameters record, or typed by the deal author when no sequence is configured. The deal ID is the deal's natural key: it is quoted on claim statements, carried on every accrual instance frozen from the deal, and copied into migrated records, so it is stored on every dependent row alongside the record ID rather than being re-derived. Implements requirement A3.
DealGroupIdMGCEarmarkDealGroupIdNoThe code of the deal group a deal belongs to. It is a short code typed by the implementer rather than a value allocated from a number sequence, which is why it is twenty characters where every Earmark identifier is sixty: people read it, quote it and group reports by it. The group code is stored on the group row, on every deal that belongs to the group and on an amendment's proposed value, so a claim statement can print the group as the caption of a subtotal band without reading the group record itself. Implements requirement A3.
AccrualTransIdMGCEarmarkAccrualTransIdNoThe identifier of a single accrual transaction, which is one movement produced by the movement engine: an accumulation, a reversal, a claim, a claim reversal, a claim approval, an adjustment or a return reversal. It is allocated from the Accrual transaction ID number sequence, with a generated fallback while sequences are unconfigured. Every transaction points at its parent, and because reversals and downstream movements take their amounts from the parent rather than recalculating them, a chain identified by these IDs always nets to exactly zero. Implements requirements C5 and C6.
ItemIdItemIdNo
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 a claim or claim line asks for, in the deal currency the money accrued in. It is fixed at generation and never recalculated: a reversal or a downstream movement takes its amount from the parent so that a chain nets to exactly zero rather than leaving a rounding residue. This is what was ASKED FOR, which is not the same question as what is still open on the credit - see the remaining amount.
ClaimAmountMSTAmountMSTNo
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.
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.
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.
ApprovedDateTimeTransDateTimeNo
ApprovalJournalNumLedgerJournalIdNo
ApprovalVoucherVoucherNo
TransDateTransDateNo
TransCurrencyCodeCustCurrencyCodeNo
TransAmountCurAmountCurDebCredNo
SettledAmountAmountCurNo
SettledAmountMSTAmountMSTNo
RemainingrealNo
RemainingMSTrealNo
LastSettlementDateTransDateNo
ClosedTransDateNo

Mappings​

Entity fieldData sourceField
ClaimIdMGCEarmarkClaimLineOpenViewClaimId
LineNumMGCEarmarkClaimLineOpenViewLineNum
CounterpartyTypeMGCEarmarkClaimLineOpenViewCounterpartyType
CounterpartyAccountMGCEarmarkClaimLineOpenViewCounterpartyAccount
InvoiceAccountMGCEarmarkClaimLineOpenViewInvoiceAccount
CurrencyCodeMGCEarmarkClaimLineOpenViewCurrencyCode
DealIdMGCEarmarkClaimLineOpenViewDealId
DealGroupIdMGCEarmarkClaimLineOpenViewDealGroupId
AccrualTransIdMGCEarmarkClaimLineOpenViewAccrualTransId
ItemIdMGCEarmarkClaimLineOpenViewItemId
QtyClaimLineQty
QtyUnitClaimLineQtyUnit
RateClaimLineRate
RateUnitClaimLineRateUnit
ClaimAmountCurMGCEarmarkClaimLineOpenViewClaimAmountCur
ClaimAmountMSTMGCEarmarkClaimLineOpenViewClaimAmountMST
CustomerPOClaimLineCustomerPO
SalesIdClaimLineSalesId
InvoiceIdClaimLineInvoiceId
InvoiceDateClaimLineInvoiceDate
PackingSlipIdClaimLinePackingSlipId
ShipDateClaimLineShipDate
ReturnFlagClaimLineReturnFlag
ReturnFlagAcceptedClaimLineReturnFlagAccepted
PostingStatusClaimLinePostingStatus
ApprovedDateTimeMGCEarmarkClaimLineOpenViewApprovedDateTime
ApprovalJournalNumMGCEarmarkClaimLineOpenViewApprovalJournalNum
ApprovalVoucherMGCEarmarkClaimLineOpenViewApprovalVoucher
TransDateMGCEarmarkClaimLineOpenViewTransDate
TransCurrencyCodeMGCEarmarkClaimLineOpenViewTransCurrencyCode
TransAmountCurMGCEarmarkClaimLineOpenViewTransAmountCur
SettledAmountMGCEarmarkClaimLineOpenViewSettledAmount
SettledAmountMSTMGCEarmarkClaimLineOpenViewSettledAmountMST
RemainingMGCEarmarkClaimLineOpenViewRemaining
RemainingMSTMGCEarmarkClaimLineOpenViewRemainingMST
LastSettlementDateMGCEarmarkClaimLineOpenViewLastSettlementDate
ClosedMGCEarmarkClaimLineOpenViewClosed