LinePriceComponentRecId | RefRecId | No | |
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. |
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. |
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. |
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. |
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. |
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. |
CurrencyCode | 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. |
ComponentType | MGCEarmarkComponentType | No | Which term of the equation this row is. Base and Over-basis are the line's own price and name no deal; Deal money and Allowance are one deal's contribution, name that deal and resolve a price mode. |
DealId | MGCEarmarkDealId | No | The deal identifier in readable form, stamped from the deal reference at insert. A record reference is unreadable in an export and worthless after a migration, and the component entity - the feed that nets deal money out of gross revenue - groups on this rather than on the reference. |
ResolvedPriceMode | MGCEarmarkPriceMode | No | Whether this deal's money was grossed into the invoiced price or held off the invoice as an allowance. It is RESOLVED at build time on every row that names a deal, and Company default is refused there: that value means "ask the company parameters", so a stored Company default is an unresolved component that would be silently grossed into an invoiced price. Base and Over-basis rows name no deal and legitimately leave it unset, because the money was never a deal's. |
AccrualInstance | RefRecId | No | The accrual instance this component became. Basis creates the commitment and the Tally package accrues it, so this reference is the join between a price and the money that will eventually move against it. It may be stamped once, from empty, and may never afterwards be pointed at a different instance: a component that could be re-pointed could silently move a commitment from one deal's ledger to another's. |
AmountPerDealUnitCur | MGCEarmarkAccrualAmount | No | The amount in the unit the DEAL states its rate in, in the transaction currency. It is the figure a person reading the deal would recognize, kept so that the conversion can be checked rather than trusted. |
AmountPerDealUnitMST | MGCEarmarkAccrualAmountMST | No | The amount per deal unit converted to the accounting currency using the rate stored on the parent build. |
AmountPerSalesUnitCur | MGCEarmarkAccrualAmount | No | The amount in the unit the LINE is sold in, in the transaction currency, after the deal unit factor has been applied. |
AmountPerSalesUnitMST | MGCEarmarkAccrualAmountMST | No | The amount per sales unit converted to the accounting currency using the rate stored on the parent build. |
AmountPerPriceUnitCur | MGCEarmarkAccrualAmount | No | The amount as it enters the price equation - per price unit, in the transaction currency. This is the figure that sums to the build's total, and the one a reconciliation compares. |
AmountPerPriceUnitMST | MGCEarmarkAccrualAmountMST | No | The amount per price unit converted to the accounting currency using the rate stored on the parent build. |
DealUnitFactor | MGCEarmarkConversionFactor | No | The factor that converted this component from the deal's unit to the line's unit, snapshotted at build. If no conversion path had existed the component would never have been written: the unit converter returns the verdict Unit not convertible and the deal is excluded as ineligible, which is how a silent mis-scale is made impossible. |
SalesUnitFactor | MGCEarmarkSalesUnitFactor | No | The factor that converted this component from the line's sales unit to the price unit the amounts are quoted in, snapshotted at build alongside the deal unit factor. |
AmountEdited | NoYesId | No | Whether an order taker changed the amount the resolver proposed. It travels with the original amount, and one without the other is refused: an edit flag with no original loses the only fact the audit exists for, and an original with no flag claims a change that never happened. |
OriginalAmount | MGCEarmarkAccrualAmount | No | The amount the resolver proposed before an order taker changed it. Zero means no edit was made; it cannot legitimately be zero on an edited row, because a zero-amount deal is excluded as ineligible before it ever becomes a component. |