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
| Name | Type | Mandatory | Description |
|---|---|---|---|
Claim | RefRecId | Yes | The 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. |
LineNum | LineNum | Yes | The 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. |
AccrualInstance | RefRecId | No | The accrual instance the claimed transaction belongs to - the frozen commitment that says what rate and what unit this money accrued at. |
AccrualTrans | RefRecId | Yes | The 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. |
AccrualTransId | MGCEarmarkAccrualTransId | Yes | The 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. |
Deal | RefRecId | No | The 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. |
DealId | MGCEarmarkDealId | No | The deal's natural key, copied at generation so the line remains readable in an export and after a migration. |
DealGroupId | MGCEarmarkDealGroupId | No | The deal group the deal belonged to at generation, copied so a statement can be grouped by program without joining back to the deal. |
ItemId | ItemId | No | The item the claimed money accrued on, copied from the accrual transaction at generation. |
Qty | MGCEarmarkDealQty | No | The 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. |
QtyUnit | UnitOfMeasureSymbol | No | The 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. |
Rate | MGCEarmarkAllowanceAmount | No | The 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. |
RateUnit | UnitOfMeasureSymbol | No | The unit the rate is per. A rate without its unit is not a rate a customer can check. |
ClaimAmountCur | MGCEarmarkClaimAmount | No | The 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. |
ClaimAmountMST | AmountMST | No | The claim amount in the accounting currency, carried from the accrual transaction together with the exchange rate that produced it. |
CustomerPO | CustPurchaseOrder | No | The 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. |
SalesId | SalesIdBase | No | The 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. |
InvoiceId | InvoiceId | No | The customer invoice the claimed movement was accrued against, copied at generation. |
InvoiceDate | TransDate | No | The date of that invoice, copied at generation and shown on the statement. |
PackingSlipId | PackingSlipId | No | The packing slip the claimed movement came from, copied at generation. |
ShipDate | TransDate | No | The date the goods moved, copied at generation. On a claim accrued at shipment this is the date the money was earned. |
ApprovalJournalNum | LedgerJournalId | No | The 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. |
ApprovalVoucher | Voucher | No | The 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. |
CustVendTransRecId | RefRecId | No | The 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. |
PostingStatus | MGCEarmarkClaimPostingStatus | No | Whether 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. |
ReturnFlag | NoYesId | No | Whether 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. |
ReturnFlagAccepted | NoYesId | No | Whether 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. |
ReturnFlagReason | MGCEarmarkReasonNote | No | Why the return flag was accepted or rejected. Kept because the decision is commercial and will be asked about later. |