Skip to main content

MGCEarmarkLinePriceComponentEntity

Read-only. Deal money and allowance per deal per line - the feed that nets deal money out of gross revenue. It joins its parent build for the order, line and build number, so those facts are read from the one place they are true. The price mode on each row decides where the money went: a grossed-up component was added into the invoiced price and will be claimed back, while an off-invoice allowance never entered the price at all, and a model that summed both would count the liability twice.

  • Public collection name: MGCEarmarkLinePriceComponents
  • Primary key: LinePriceComponentRecId, OrderId, LineNum, BuildNumber, ComponentType, DealId

Fields​

NameTypeMandatoryDescription
LinePriceComponentRecIdRefRecIdNo
OrderIdMGCEarmarkNaturalKeyNoThe 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.
LineNumLineNumNoThe 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.
BuildNumberMGCEarmarkBuildNumberYesThe 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.
CurrentNoYesIdNoWhether 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.
BuildStateMGCEarmarkBuildStateNoWhere 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.
InventTransIdInventTransIdNoThe 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.
CurrencyCodeCurrencyCodeNoThe 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.
ComponentTypeMGCEarmarkComponentTypeNoWhich 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.
DealIdMGCEarmarkDealIdNoThe 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.
ResolvedPriceModeMGCEarmarkPriceModeNoWhether 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.
AccrualInstanceRefRecIdNoThe 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.
AmountPerDealUnitCurMGCEarmarkAccrualAmountNoThe 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.
AmountPerDealUnitMSTMGCEarmarkAccrualAmountMSTNoThe amount per deal unit converted to the accounting currency using the rate stored on the parent build.
AmountPerSalesUnitCurMGCEarmarkAccrualAmountNoThe amount in the unit the LINE is sold in, in the transaction currency, after the deal unit factor has been applied.
AmountPerSalesUnitMSTMGCEarmarkAccrualAmountMSTNoThe amount per sales unit converted to the accounting currency using the rate stored on the parent build.
AmountPerPriceUnitCurMGCEarmarkAccrualAmountNoThe 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.
AmountPerPriceUnitMSTMGCEarmarkAccrualAmountMSTNoThe amount per price unit converted to the accounting currency using the rate stored on the parent build.
DealUnitFactorMGCEarmarkConversionFactorNoThe 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.
SalesUnitFactorMGCEarmarkSalesUnitFactorNoThe 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.
AmountEditedNoYesIdNoWhether 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.
OriginalAmountMGCEarmarkAccrualAmountNoThe 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.

Mappings​

Entity fieldData sourceField
LinePriceComponentRecIdMGCEarmarkLinePriceComponentRecId
OrderIdLinePriceOrderId
LineNumLinePriceLineNum
BuildNumberLinePriceBuildNumber
CurrentLinePriceCurrent
BuildStateLinePriceBuildState
InventTransIdLinePriceInventTransId
CurrencyCodeLinePriceFpCurrencyCode
ComponentTypeMGCEarmarkLinePriceComponentComponentType
DealIdMGCEarmarkLinePriceComponentDealId
ResolvedPriceModeMGCEarmarkLinePriceComponentResolvedPriceMode
AccrualInstanceMGCEarmarkLinePriceComponentAccrualInstance
AmountPerDealUnitCurMGCEarmarkLinePriceComponentAmountPerDealUnitCur
AmountPerDealUnitMSTMGCEarmarkLinePriceComponentAmountPerDealUnitMST
AmountPerSalesUnitCurMGCEarmarkLinePriceComponentAmountPerSalesUnitCur
AmountPerSalesUnitMSTMGCEarmarkLinePriceComponentAmountPerSalesUnitMST
AmountPerPriceUnitCurMGCEarmarkLinePriceComponentAmountPerPriceUnitCur
AmountPerPriceUnitMSTMGCEarmarkLinePriceComponentAmountPerPriceUnitMST
DealUnitFactorMGCEarmarkLinePriceComponentDealUnitFactor
SalesUnitFactorMGCEarmarkLinePriceComponentSalesUnitFactor
AmountEditedMGCEarmarkLinePriceComponentAmountEdited
OriginalAmountMGCEarmarkLinePriceComponentOriginalAmount