MGCEarmarkClaimsAvailableByCustomerEntity
The read-only export of the Earmark credit available to each counterparty account, aggregated from the open claim lines - the balance, the age of the oldest approved claim behind it, how many claim lines make it up, and how many settlement preferences are still outstanding. It is one row per invoice account, counterparty type and currency rather than one row per claim line, so it is safe to publish to a data lake or a reporting warehouse at a cadence a line-level export could not sustain, and every row is a figure a business reader can act on without a join. The balance is computed from live settlement data every time it is read; nothing here is stored, so two reads on the same day can legitimately differ and neither is a ledger. The date a customer was last sent a statement is deliberately not a column here: the statement run log holds one row per run per account, and joining it into this aggregate would multiply every claim line by the number of statements that account has ever received and overstate the balance. Read the statement run export beside this one and join on the invoice account. Implements requirements D9, D14 and D16.
- Public collection name:
MGCEarmarkClaimsAvailableByCustomers
- Primary key:
InvoiceAccount, CounterpartyType, CurrencyCode
Fields
| Name | Type | Mandatory | Description |
|---|
InvoiceAccount | MGCEarmarkAccountRelation | No | The 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. |
CounterpartyType | MGCEarmarkClaimCounterpartyType | No | |
CurrencyCode | CurrencyCode | No | |
AvailableBalance | real | No | |
AvailableBalanceMST | real | No | |
OldestApprovalDate | TransDateTime | No | |
OpenLineCount | int64 | No | |
PreferencesOutstanding | int | No | |
Mappings
| Entity field | Data source | Field |
|---|
InvoiceAccount | MGCEarmarkClaimsAvailableByCustomerView | InvoiceAccount |
CounterpartyType | MGCEarmarkClaimsAvailableByCustomerView | CounterpartyType |
CurrencyCode | MGCEarmarkClaimsAvailableByCustomerView | CurrencyCode |
AvailableBalance | MGCEarmarkClaimsAvailableByCustomerView | AvailableBalance |
AvailableBalanceMST | MGCEarmarkClaimsAvailableByCustomerView | AvailableBalanceMST |
OldestApprovalDate | MGCEarmarkClaimsAvailableByCustomerView | OldestApprovalDate |
OpenLineCount | MGCEarmarkClaimsAvailableByCustomerView | OpenLineCount |
PreferencesOutstanding | MGCEarmarkClaimsAvailableByCustomerView | PreferencesOutstanding |