Skip to main content

MGCEarmarkClaimLine

One line of a claim - the grain of the customer credit, of the approval voucher and of the claim statement, and the only thing in Earmark that points at an accrual transaction as claimed money. Evidence: never deleted, and append-only apart from the approval stamps and the return review. Exactly one claim line may exist per accrual transaction, and the database enforces it rather than the generator.

Fields​

NameTypeMandatoryDescription
ClaimRefRecIdYesThe claim this line belongs to. Frozen from insert - a line cannot be moved between claims, because its reference has already been printed under this claim's id.
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.
AccrualInstanceRefRecIdNoThe accrual instance the claimed transaction belongs to - the frozen commitment that says what rate and what unit this money accrued at.
AccrualTransRefRecIdYesThe accrual transaction this line claims, held by record id. A unique index sits on this column, so a second claim line on the same transaction is impossible rather than merely checked for - which is what makes the already-claimed verdict a statement about a race that cannot be lost.
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.
DealRefRecIdNoThe deal the claimed money came from, held by record id. Recorded for trace only - deal status is never part of any predicate on the claim path, so an aborted deal's accrual claims and settles normally.
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.
CustVendTransRecIdRefRecIdNoThe customer or vendor transaction the approval credit created. This is the handle the claim line open view follows to read what is still open on the credit, live, every time it is asked.
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.