MGCEarmarkLinePrice
The built price of one order line - the decomposition base plus over-basis plus deal money that produced the invoiced unit price, with one row per build. The native price on the line stays the INVOICED truth; this row is the BUILD-UP truth, and nothing rewrites the native value except the price build orchestrator at an actor's request. Rows are permanent evidence: they are never edited except through the stale lifecycle, are never deleted, and are retained even when the order line they describe is deleted, which is why the readable order number and line number are stored beside the record reference.
Fields
| Name | Type | Mandatory | Description |
|---|---|---|---|
AcknowledgeReasonCode | ReasonCode | No | The reason code recorded when the stale state was accepted, so that a later reader can tell a considered decision from a cleared inbox. |
AcknowledgedBy | UserId | No | Who accepted that this build is still the right price even though its line has changed. Acknowledging keeps the price and clears the stale flag; it does not rebuild and does not touch the fingerprint. |
AcknowledgedDateTime | TransDateTime | No | When the stale state of this build was accepted, in coordinated universal time. It is written together with the actor: half an acknowledgement is what a form leaves behind when it fails partway, and it would sit in the stale list looking answered. |
AllowanceCur | MGCEarmarkAllowanceAmount | No | The total deal money held off the invoice, per price unit, in the transaction currency. It is a commitment to the customer that was never added into the price they were charged, so it is NOT part of the built unit price - adding it would count the liability twice. |
AllowanceMST | MGCEarmarkAllowanceAmount | No | The off-invoice allowance converted to the accounting currency using the rate stored on this build. |
BasePriceCur | MGCEarmarkUnitPriceAmount | No | The base price the build started from, per price unit, in the transaction currency. It is the commodity price before any margin over the basis and before any deal money. |
BasePriceMST | MGCEarmarkUnitPriceAmount | No | The base price converted to the accounting currency using the rate stored on this build. It is a snapshot, not a live conversion - the rate that produced it is stored beside it so the figure can always be explained. |
BuildExchRate | ExchRate | No | The exchange rate that produced every accounting-currency figure on this build. It is stored rather than re-derived because a rate that has since moved would make the stored figures unexplainable, and an amount nobody can reproduce is not evidence. |
BuildNumber | MGCEarmarkBuildNumber | Yes | The ordinal of this build within this line's history, starting at 1. Together with the line reference it is the alternate key, so two builds of one line can never share a number. |
BuildRateDate | TransDate | No | The date the build's exchange rate was taken for, stored beside the rate and the rate type so the figure can be reproduced exactly. |
BuildRateType | ExchangeRateTypeName | No | The exchange rate type the build's rate was taken from, stored beside the rate so the figure can be reproduced exactly. |
BuildSource | MGCEarmarkBuildSource | No | Which door this build came through - the price builder form, the Conduit service, or an inbound pricing policy. It is recorded as provenance and nothing branches on it: a build made by an integration is governed by exactly the same rules as one made by an order taker. |
BuildState | MGCEarmarkBuildState | No | Where this build stands. Built is a price that still matches its line; Stale is one whose line has moved underneath it, with a reason row for each thing that changed; Unbuilt is a build that was withdrawn, which is terminal. There is no "not built" state - a line that was never built simply has no current row. |
BuiltBy | UserId | No | Who built this price. Stamped rather than supplied, because it is the fact an auditor asks for and the fact a caller has no reason to provide. |
BuiltDateTime | TransDateTime | No | When this price was built, in coordinated universal time. Stamped rather than supplied, for the same reason as the actor. |
Current | NoYesId | No | Whether this is the build the line is priced at now. Exactly one build per line may be current, which the platform cannot express as an index and which the table therefore enforces on every write. |
CurrentLineRecId | RefRecId | No | The line reference while this build is current, and zero otherwise. It is a derived join key, stamped on every write from the current flag so the two can never disagree, and it exists so that the sales order line entity can hang the Earmark columns off a plain outer join with no filter - a filter that landed in the wrong half of the query would make every unpriced order line disappear from that entity, and a join without one would duplicate every line that had ever been priced twice. |
DealMoneyCur | MGCEarmarkDealMoneyAmount | No | The total trade-deal money grossed into the invoiced price, per price unit, in the transaction currency. This is the liability inside the price: the customer is invoiced it and will claim it back. Off-invoice allowances are excluded and are carried separately. |
DealMoneyMST | MGCEarmarkDealMoneyAmount | No | The deal money converted to the accounting currency using the rate stored on this build. |
FpCurrencyCode | CurrencyCode | No | The transaction currency every amount on this build is expressed in. It is the build's own currency column as well as part of the fingerprint, deliberately stored once rather than twice. A change to it is the SPECIAL stale reason: the built price is arithmetic in a currency the order no longer uses, so the natively re-derived price stands and the build is void in the new currency. Immutable. |
FpEligibilityDate | TransDate | No | The date the deals on this build were judged eligible against, taken from whichever line date the eligibility date basis parameter names. Compared after every change; a difference flags the build stale, because a deal's validity window may no longer cover the new date. Immutable. |
FpInventDimId | InventDimId | No | The inventory dimensions the line carried when this price was built. Compared after every change; a difference flags the build stale with a Dimensions reason. Immutable. |
FpInvoiceAccount | MGCEarmarkAccountRelation | No | The account the line was to be invoiced to when this price was built. Compared after every change - including a change made on the order header - because a deal is targeted at a counterparty and a different invoice account may qualify for different deals entirely. Immutable. |
FpItemId | ItemId | No | The item the line carried when this price was built. It is one of the eight facts the stale detector compares after every change; if it differs, the build is flagged stale with an Item reason. It is immutable, because a fingerprint that could be updated would be compared with itself and nothing would ever be stale. |
FpPriceUnit | PriceUnit | No | The price unit the line carried when this price was built. Compared after every change; a difference flags the build stale, because every amount on the build is expressed per this many units. Immutable. |
FpQty | MGCEarmarkDealQty | No | The quantity the line carried when this price was built. Compared after every change; a difference flags the build stale with a Quantity reason, because a deal's qualifying quantity and its per-transaction limits are both quantity-sensitive. Immutable. |
FpSalesUnit | UnitOfMeasureSymbol | No | The unit the line was sold in when this price was built. Compared after every change; a difference flags the build stale, because every deal amount on the build was converted into this unit. Immutable. |
IdempotencyKey | MGCEarmarkIdempotencyKey | No | The caller-supplied key that makes a repeated build request incapable of building twice. A non-blank key that has been seen before is refused. It is blank for a build raised from the price builder form, which has no caller to supply one, and blanks are never compared with each other. |
InventTransId | InventTransId | No | The inventory transaction identifier of the line, stored as the second half of the key and as the join to the accrual instances this build froze. It is what lets a movement posted months later be traced back to the price that promised it. |
LineNum | LineNum | No | The line number on the order, in readable form, stored for the same reason as the order number: it is what makes a build meaningful to a person, and what still identifies it after the line has been deleted. |
LineRecId | RefRecId | Yes | The record reference of the order line this build belongs to. It is half of the key and is not enough on its own: it says nothing to a person reading an export and it points at nothing once the line is deleted, which is why the order number and line number are stored as well. |
LineTableId | RefTableId | Yes | Which kind of order line this build belongs to. The build table serves the sales line today and the purchase line through the vendor-shape package, and a record reference alone cannot say which of the two it came from, so the table is stored beside it and every index leads on the pair. |
OrderId | MGCEarmarkNaturalKey | No | The order number, in readable form. It exists because a record reference is unreadable in an export, unusable in a data-management load and worthless after a migration - and above all because a build survives the deletion of its line, after which this and the line number are the only things left that say what the build was about. |
OverBasisCur | MGCEarmarkOverBasisAmount | No | The amount added over the base price, per price unit, in the transaction currency. It may be negative, because a line may be sold under its basis; the built unit price as a whole may not fall below zero. |
OverBasisMST | MGCEarmarkOverBasisAmount | No | The over-basis converted to the accounting currency using the rate stored on this build. |
PreBuildUnitPrice | MGCEarmarkUnitPriceAmount | No | The unit price the order line carried immediately before this build wrote its own value over it. It is what Unbuild restores, which is the only reason it exists - without it, withdrawing a build would leave the line at a price nobody chose. |
PriceModeSummary | MGCEarmarkPriceMode | No | The price mode of the invoiced half of this build - the mode that actually shaped the price on the order line. When a build carries both grossed-up deal money and an off-invoice allowance, the surfaces that show this column display "Mixed", which is computed from the two amounts rather than stored: there is no Mixed value in the price mode enumeration and there must not be one, because that enumeration also governs accrual instances, where Mixed would mean nothing. Company default is refused on any build that moved deal money, because every included deal's mode is resolved at build time and an unresolved mode would be silently grossed into an invoiced price. |
PriceUnit | PriceUnit | No | The number of units every amount on this build is expressed per. A price of 250 means nothing until you know whether it is per each or per hundred, which is why the price unit is stored on the build rather than read from the line, where it may since have changed. |
UnitPriceCur | MGCEarmarkUnitPriceAmount | No | The unit price this build produced - base plus over-basis plus deal money - per price unit, in the transaction currency. It is the value written back to the order line, and it excludes off-invoice allowances. |
UnitPriceMST | MGCEarmarkUnitPriceAmount | No | The built unit price converted to the accounting currency using the rate stored on this build. |