Last reviewed: 2026-08-02
Accepted decisions:
- ../decisions/accepted/0028-standard-cost-inventory-period-summaries.md
- ../decisions/accepted/0029-cross-workflow-accounting-event-identity.md
Inventory Period Summary Fact Contract
Purpose and ownership
This contract defines the provider-agnostic Inventory Summary boundary used to validate, explain, prepare, and later persist standard-cost period results.
The operational inventory system owns product, movement, warehouse, production, cost-version, snapshot-detail, and perpetual-valuation records. BooksPlus owns the accepted accounting event, reconciliation, review, posting template, period control, audit, and ledger result.
BooksPlus does not persist the operational product or movement subledger. Product-level quantity, unit-cost, source-movement, and cost-version detail remains in a versioned operational manifest referenced by Source Documents.
Canonical objects
- InventoryPeriodSummaryFact
- InventoryValuationSnapshot
- InventoryPeriodMovementTotals
- InventoryPeriodAccountingComponent
- InventoryPeriodReconciliation
- InventoryStandardCostRevisionAdjustmentFact
- InventoryPurchasePriceVarianceFact
- InventoryPurchasePriceVarianceAllocation
- InventoryPurchasePriceVarianceReconciliationResult
Fact types and source-event stages
| Fact type | Source-event stage | Meaning |
|---|---|---|
inventory_period_summary |
period_summary_completed |
One completed operational standard-cost run for one BooksPlus company and financial period. |
inventory_standard_cost_revision_adjustment |
standard_cost_revision_effective |
A prospective on-hand revaluation caused by one versioned standard-cost change. |
inventory_purchase_price_variance |
purchase_price_variance_calculated |
A nonzero Inventory-owned variance supported by allocated Purchasing acquisition and receipt evidence. |
Each fact is owned by inventory_summary. Provider journal codes, account
codes, descriptions, product names, movement labels, or equal amounts cannot
select the fact type, stage, owning workflow, component meaning, account, or
posting template.
The ordinary Inventory workflow accepts only original facts. Correction and
reversal facts remain held for the Corrections workflow.
InventoryPeriodSummaryFact
Required concepts:
- stable fact id and company id
- source system and source-system instance when applicable
- source object type, external object id, and external event or version id
- idempotency key and normalized meaning hash
- fact type, source-event stage, owning workflow, and original change type
- target FinancialPeriod id, start date, and inclusive end date
- source time-zone id
- half-open cutoff start instant and exclusive end instant
- operational run id and version
- costing method
standard_cost - company currency
- beginning and ending InventoryValuationSnapshot
- explicit initial-boundary flag and reviewed reason when no accepted adjacent predecessor exists
- InventoryPeriodMovementTotals
- InventoryPeriodAccountingComponent children
- InventoryPeriodReconciliation
- active primary Source Document id
- supporting Source Document ids and evidence references
- prepared posting date equal to the target period end date
- source completed time and BooksPlus acceptance time
Rules:
- one fact covers exactly one company, source system, operational run, and BooksPlus financial period;
- the source-world business-date range equals the target FinancialPeriod's inclusive start and end dates;
- the cutoff starts at local midnight on the period start and ends at local midnight immediately after the inclusive period end;
- the cutoff uses the company accounting time zone under the Business Time Contract; a separately preserved source time zone must agree with that accounting boundary or remain held for explicit mapping rather than silently overriding it;
- the resolved instants must agree with the local boundaries, and the exclusive end must follow the start;
- the costing method is exactly
standard_cost; weighted-average, FIFO, LIFO, provider-maintained average cost, or an unspecified method remains held; - the currency equals the company's launch reporting currency;
- the fact contains aggregate values and manifest identities, not product, warehouse, lot, or individual movement rows;
- one operational movement contributes to one accepted period run according to the referenced operational manifest;
- an accepted run cannot overlap another accepted run for the same company and source inventory boundary;
- exact source identity and idempotency replay requires exact normalized meaning; changed reuse conflicts;
- a different original run for an already accepted period is not a replacement original and remains held for supersession or Corrections truth; and
- preparation creates no persistence, Summary batch, audit mutation, journal entry, posting result, or ledger effect.
Import and preparation boundary
File or machine preparation accepts an AccountingImportIdentifiedCandidate only when:
- candidate company and source system equal the fact and request context;
- verified currency is present and equals the company currency;
- the explicit route is
inventory_summary; - identity outcome is
ready_for_workflow; - change type is
originalwith no related-original identity; - import-run, source-group, source object, external object, external event, idempotency, and normalized meaning identity are complete;
- candidate posting date equals the target FinancialPeriod end date;
- candidate source reference identifies the active primary Source Document; and
- fact type and source-event stage are the accepted pair.
Strict route isolation applies. A Purchasing, Sales, Banking and Finance, Opening Balance, Correction/Reversal, Unclassified, missing, or ambiguous route cannot prepare through Inventory Summary.
Import-run and source-event provenance remains visible in the preparation result. Provider journal, description, account, product, movement, or source reference text cannot establish the Inventory route, fact type, stage, component, account, cost method, or relationship.
InventoryValuationSnapshot
Required concepts:
- snapshot kind:
beginningorending - stable operational snapshot id and version
- as-of business boundary and resolved instant
- costing method
standard_cost - total standard-cost value and company currency
- detail-manifest identity, version, SHA-256 digest, and row count
- product-level reconciliation status
- product-level exception count
- source run and Source Document evidence references
Rules:
- ordinary preparation requires a completed product-level reconciliation and zero unresolved product-level exceptions;
- manifest identity and digest preserve exact evidence without importing the product-level valuation rows into BooksPlus;
- the beginning snapshot boundary equals the period cutoff start;
- the ending snapshot boundary equals the period cutoff exclusive end;
- when a prior accepted adjacent period exists, its ending snapshot identity, version, value, currency, manifest digest, and boundary equal the current beginning snapshot;
- the first managed Inventory period is explicitly identified as an initial boundary and its beginning snapshot must reconcile to active Source Document evidence and the ledger inventory-control balance at that boundary; and
- missing, ambiguous, changed, gapped, or conflicting predecessor evidence is a blocking issue, not an inferred zero beginning balance.
InventoryPeriodMovementTotals
Required concepts:
- operational movement-manifest identity, version, SHA-256 digest, and row count
- earliest and latest included source instants when rows exist
- completed quantity-reconciliation status and exception count
- standard-cost inflow value
- standard-cost outflow value
- signed ordinary adjustment value
- signed standard-cost revision value linked to distinct accepted revision facts when nonzero
- company currency
- movement-category reconciliation and evidence references
Rules:
- inflow and outflow values are nonnegative; increases are positive and decreases are represented through the declared field or signed adjustment;
- inflow and outflow exclude ordinary adjustments and standard-cost revision effects that are declared separately;
- different units of measure are not added into a false company-wide quantity; per-product quantity equations remain in the operational manifest;
- the manifest proves product-level
beginning quantity + net movement quantity = ending quantity; - Purchasing-owned inventory acquisitions may contribute to standard-cost inflow and ending valuation only through complete same-company support relationship proposals during preparation and later resolved relationships; they do not create another acquisition posting;
- Sales-owned shipment or fulfillment evidence may support Inventory consumption only through complete same-company support relationship proposals during preparation and later resolved relationships; it does not move COGS posting ownership to Sales;
- same-company internal transfers are reconciliation-only when their total standard-cost value is unchanged;
- source categories requiring production, work-in-process, manufacturing overhead, landed cost, use tax, foreign-currency conversion, or another unaccepted policy remain held; and
clearing.inventory_fallbackidentifies unresolved review output only. Its presence never converts an unknown movement into a ready accounting component.
InventoryPeriodAccountingComponent
Allowed ordinary period-summary component types:
inventory_consumptioninventory_adjustment_increaseinventory_adjustment_decrease
Required concepts:
- stable component reference unique within the fact
- component type
- positive amount and company currency
- reviewed evidence reference
- related movement-manifest category or control-total reference
- required relationship references when another workflow supplies evidence
- resolved immutable BooksPlus account ids selected through canonical roles
Posting templates:
| Component | Debit | Credit |
|---|---|---|
inventory_consumption |
expense.cost_of_goods_sold |
inventory.output |
inventory_adjustment_increase |
inventory.general |
expense.inventory_adjustment |
inventory_adjustment_decrease |
expense.inventory_adjustment |
inventory.general |
Rules:
- component amounts are positive; direction comes from the component type;
- a consumption component requires a complete proposed
supports_inventory_consumptionrelationship from each accepted Sales-owned supporting event to the current Inventory source identity for the summarized amount; - a Purchasing acquisition or receipt may use
supports_inventory_valuationas reconciliation evidence but never becomes an ordinary Inventory acquisition component; - one source accounting event has at most one ordinary posting result;
- cost revision and PPV amounts do not use an ordinary period component; they use their distinct fact types;
- internal transfers and Purchasing-linked acquisition inflows produce no period-summary journal lines;
- zero-value components are omitted rather than converted into journal lines;
- unresolved fallback, unsupported movement, unexplained residual, or provider accounting line remains a blocking issue and produces no fallback-clearing posting; and
- account resolution returns immutable account ids. Codes and names are display and evidence values only.
InventoryPeriodReconciliation
Required exact values:
- normalized external-line debit and credit totals
- identified-candidate debit and credit totals
- candidate-to-line debit and credit differences
- beginning standard-cost value
- standard-cost inflow value
- standard-cost outflow value
- signed ordinary adjustment value
- signed standard-cost revision value
- calculated ending standard-cost value
- reviewed ending snapshot value
- snapshot difference
- reviewed operational posting-control debit and credit totals
- prepared-preview debit and credit totals
- posting-control debit and credit differences
- initial-boundary ledger inventory-control balance through the day immediately preceding the period start, when the fact declares an initial boundary
- initial-boundary snapshot-to-ledger difference, when applicable
- pre-preview ledger inventory-control balance through the period end
- prepared-preview net inventory-control effect
- expected post-preview inventory-control balance
- ledger-to-ending difference
- company currency
Required equations:
identified-candidate debit total
- normalized external-line debit total
= candidate-to-line debit difference = 0
identified-candidate credit total
- normalized external-line credit total
= candidate-to-line credit difference = 0
beginning standard-cost value
+ standard-cost inflow value
- standard-cost outflow value
+ signed ordinary adjustment value
+ signed standard-cost revision value
= calculated ending standard-cost value
calculated ending standard-cost value
- reviewed ending snapshot value
= snapshot difference = 0
For an initial boundary:
beginning standard-cost value
- ledger inventory-control balance through the day immediately preceding the
period start
= initial-boundary snapshot-to-ledger difference = 0
prepared-preview debit total
- reviewed operational posting-control debit total
= debit difference = 0
prepared-preview credit total
- reviewed operational posting-control credit total
= credit difference = 0
pre-preview ledger inventory-control balance
+ prepared-preview net inventory-control effect
= expected post-preview inventory-control balance
expected post-preview inventory-control balance
- reviewed ending snapshot value
= ledger-to-ending difference = 0
The ledger inventory-control balance deduplicates immutable account ids
resolved by inventory.general, inventory.input, and inventory.output.
One account assigned to several roles contributes once.
All differences must be exactly zero at Money precision before the result is ready for preview. Rounding or residual handling cannot be inferred from a provider line or posted to fallback clearing.
Consumption components sum exactly to the supported consumption outflow. Adjustment-increase amounts less adjustment-decrease amounts equal the signed ordinary adjustment value. Every supported posting-control amount appears once in a component and every component appears once in the posting-control total.
InventoryStandardCostRevisionAdjustmentFact
Required concepts:
- the common fact identity and provenance
- effective source-world boundary
- product and cost-version detail-manifest identity and digest
- prior and new standard-cost version identities
- on-hand quantity and explicit unit of measure
- prior and new standard unit cost
- signed calculated valuation adjustment
- company currency
- actor, reviewed reason, and active Source Document evidence
- target FinancialPeriod and posting date
Required calculation:
on-hand quantity
× (new standard unit cost - prior standard unit cost)
= signed valuation adjustment
Posting templates use the absolute amount:
| Result | Debit | Credit |
|---|---|---|
| positive increase | inventory.general |
expense.inventory_adjustment |
| negative decrease | expense.inventory_adjustment |
inventory.general |
Rules:
- the revision is prospective and does not rewrite a prior accepted snapshot;
- the effective cost versions and on-hand quantity come from reviewed operational evidence;
- a zero calculation is preserved as reconciliation evidence and creates no journal lines; and
- late, backdated, correction, reversal, closed-period, unsupported-unit, and foreign-currency cases follow the held behavior below.
InventoryPurchasePriceVarianceFact
Required concepts:
- the common fact identity and provenance
- InventoryPurchasePriceVarianceAllocation children
- positive unfavorable or negative favorable calculated variance
- company currency
- target FinancialPeriod and posting date
- active Source Document and reconciliation evidence
- required accepted relationship references
- optional linked posted GRNI accrual when the variance adjusts GRNI
InventoryPurchasePriceVarianceAllocation required concepts:
- stable allocation id
- accepted Purchasing inventory-acquisition event and stable component reference
- authoritative receipt identity
- net received quantity and normalized unit of measure
- explicit unit-conversion identity and calculation when conversion is needed
- allocated Purchasing inventory-acquisition amount after accepted discounts and returns
- calculated purchase unit price
- applicable standard-cost version and standard unit cost
- calculated signed PPV amount
- company currency
- receipt, price, allocation, unit, and cost-version evidence references
Required calculation:
net received quantity
× (purchase unit price - applicable standard unit cost)
= signed PPV
Posting templates use the absolute amount:
| Prior acquisition state | Unfavorable positive PPV | Favorable negative PPV |
|---|---|---|
| no posted GRNI accrual | debit expense.purchase_price_variance; credit inventory.general |
debit inventory.general; credit expense.purchase_price_variance |
| posted GRNI accrual | debit expense.purchase_price_variance; credit liability.goods_received_not_invoiced |
debit liability.goods_received_not_invoiced; credit expense.purchase_price_variance |
Rules:
- allocations sum exactly to the fact PPV amount and do not overlap Purchasing acquisition components, receipt quantities, or GRNI balances;
supports_purchase_price_variancepoints from each supporting Purchasing event to the Inventory PPV event;- when GRNI is involved,
adjusts_accrualpoints from the Inventory PPV event to each posted GRNI accrual it changes; - the allocated posted GRNI carrying amount plus the signed PPV adjustment equals the supported invoice inventory-acquisition allocation;
- the GRNI accrual is posted before PPV becomes ready, and PPV is posted before a dependent Purchasing settlement becomes ready;
- a zero result is an
InventoryPurchasePriceVarianceReconciliationResult, not a zero-value PPV
fact, journal entry, or
adjusts_accrualrelationship; - unsupported freight, tax, landed cost, unit conversion, allocation, currency, or relationship meaning remains held; and
- Purchasing never selects a PPV posting template.
Source evidence and relationships
- Every fact references one active same-company primary Source Document.
- Snapshot, manifest, cost-version, receipt, price, allocation, reason, and reconciliation evidence remains linked through active Source Documents or stable references owned by those documents.
- Superseded evidence cannot support new routine preparation.
supports_inventory_consumption,supports_inventory_valuation,supports_purchase_price_variance, andadjusts_accrualuse the directions accepted by ADR 0029.- Relationship amounts use company currency; quantities use an explicit unit.
- A non-persistent preparation may validate a complete relationship proposal whose source is an accepted same-company event and whose target identity is the current Inventory candidate. The relationship remains unresolved until the Inventory workflow record exists.
- Required relationships must resolve before the later Summary batch may
become
ready_to_post; unresolved or invalid relationships never authorize posting. - Relationships preserve evidence and ordering but never authorize posting, change workflow ownership, or create another posting result.
Held behavior
Preparation returns visible blocking issues and no prepared preview for:
- missing, ambiguous, inactive, superseded, or cross-company Source Documents;
- missing or mismatched company, source system, source identity, idempotency, fact type, source stage, route, original change type, period, posting date, time zone, cutoff, costing method, or company currency;
- missing, overlapping, gapped, ambiguous, or changed predecessor snapshots;
- missing or unreconciled snapshot, movement, category, cost-version, quantity, unit, price, allocation, relationship, operational-control, or ledger-control evidence;
- nonzero manifest exception counts or incomplete operational reconciliation;
- missing, ambiguous, inactive, retired, non-posting, or wrong-company account role targets;
- a provider code, name, description, journal, line, or fallback mapping used to select accounting meaning;
- duplicate source movement coverage or a conflicting run for an accepted period;
- a nonzero exact reconciliation difference;
- unsupported production, work-in-process, manufacturing overhead, landed cost, use-tax, foreign-currency, prepaid-inventory, or fallback-clearing treatment;
- correction, reversal, late, backdated, or changed finalized-period meaning not accepted by the Corrections workflow; and
- any case that would duplicate a Sales, Purchasing, or prior Inventory posting result.
Held evidence remains explainable and must not create a Summary batch, ready reservation, journal entry, posting result, or ledger effect.
Slice boundaries
Slice 1 may implement only non-persistent inventory_period_summary
preparation and exact reconciliation. It holds a nonzero standard-cost revision
amount, PPV indicator, or PPV amount until the applicable later preparation
slice is implemented.
Later accepted implementation slices own:
- standard-cost revision adjustment preparation;
- PPV and GRNI-adjustment preparation;
- Summary review and posting orchestration;
- persistence, replay recovery, supersession, and company backup; and
- provider-specific adapter behavior.
Corrections, reversals, foreign currency, production accounting, UI, direct provider delivery, and close orchestration remain outside this contract's initial implementation boundary.
Related binding truth
account-role.contract.mdaccounting-import-candidate.contract.mdfinancial-period.contract.mdbusiness-time.contract.mdmoney.contract.mdpurchasing-and-payables-summary-fact.contract.mdsource-document.contract.mdsummary-accounting-batch.contract.md../accounting/close.md../accounting/posting-and-reversal.md../accounting/summary-accounting.md