Skip to content

Last amended: 2026-07-29 Audience: product, accounting, developer

ADR 0028: Standard-Cost Inventory Period Summaries

Context

The operational system owns product quantities, stock movements, product cost maintenance, and perpetual-inventory detail. BooksPlus needs period-level inventory accounting results without recreating that operational subledger.

Weighted-average cost changes with purchase history and can reduce period-to- period comparability. The intended initial policy instead uses a reviewed, user-maintained standard cost for each product.

Decision

Operational ownership

The operational inventory system owns:

  • product and stock-movement detail;
  • the user-maintained product standard cost and its change evidence;
  • period movement extraction;
  • beginning and ending inventory snapshots;
  • quantity and standard-cost extension;
  • purchase-price variance calculation; and
  • the detailed reconciliation that supports each Inventory Summary.

BooksPlus accepts provider-agnostic period summaries, evidence, exception results, and durable source-event relationships. BooksPlus validates, reconciles, reviews, and posts accepted accounting results; it does not recalculate a perpetual weighted-average cost or import the operational inventory subledger.

Standard-cost valuation

The initial Inventory Summary costing method is standard_cost.

Each product has a user-maintained standard unit cost. The operational system extends inventory quantities using that cost to produce valued inventory movements and balances. Dolibarr's system-maintained weighted-average cost is not the BooksPlus valuation basis.

Each valued result preserves:

  • product and source-movement identity in operational evidence;
  • quantity and unit of measure;
  • standard unit cost;
  • standard-cost version or effective identity;
  • extended amount and currency;
  • movement category and source-world date;
  • period and cutoff identity; and
  • the operational run, snapshot, and reconciliation references.

Historical finalized results retain the cost version and extended amounts used at the time. A later standard-cost revision must not silently recompute a prior finalized period.

The initial release uses one company-wide standard cost per product. A movement uses the version effective at its source-world movement time. Location- or valuation-group-specific standard costs require later accepted truth.

Period summary and cutoff

Inventory transactions are summarized for one financial period from the period start through the period-end cutoff. The run preserves the exact inclusive business-date boundary and corresponding timestamp interval and time zone used to select movements.

The cutoff uses company-local business dates. The inclusive period is represented as a half-open timestamp interval from local midnight at the period start through local midnight immediately after the inclusive period-end date. The source time zone and resolved instants are preserved.

The prior finalized period's ending inventory snapshot becomes the next period's beginning inventory snapshot. Beginning and ending snapshots preserve quantity, standard unit cost, extended value, source run, as-of boundary, and cost-version evidence.

An ending snapshot must reconcile:

beginning quantity
+ period net movement quantity
= ending quantity

Valued movement, cost-revision adjustment, COGS, PPV, and other supported variance results must reconcile to the ending standard-cost valuation without posting the Purchasing-owned acquisition twice.

Provider-agnostic fact and preparation boundary

The canonical Inventory boundary contains three distinct fact types:

  • inventory_period_summary at period_summary_completed;
  • inventory_standard_cost_revision_adjustment at standard_cost_revision_effective; and
  • nonzero inventory_purchase_price_variance at purchase_price_variance_calculated.

All three are owned by inventory_summary. The ordinary Inventory workflow accepts only original facts. Provider journals, accounts, descriptions, movement labels, products, or equal amounts cannot select fact meaning, workflow ownership, components, accounts, or templates.

The period fact retains aggregate beginning, movement, adjustment, ending, posting-control, and ledger-control values plus identities, versions, hashes, row counts, and Source Document references for operational detail manifests. BooksPlus does not persist product, warehouse, lot, or individual movement rows as an Inventory subledger.

The first managed Inventory period requires an explicit reviewed initial boundary. Its beginning snapshot reconciles to active evidence and the ledger inventory-control balance at that boundary. Every later adjacent period uses the prior accepted ending snapshot as its exact beginning snapshot. Missing, gapped, overlapping, ambiguous, or changed predecessor evidence is held and is never inferred as zero.

The accepted ordinary period-summary posting components are:

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

Purchasing-linked acquisition inflows and value-neutral internal transfers are reconciliation-only in the Inventory period fact. They produce no duplicate Inventory acquisition lines. Unknown movement, fallback-clearing, production, work-in-process, manufacturing-overhead, prepaid-inventory, landed-cost, use-tax, and foreign-currency treatment remains held until separately accepted truth defines it.

The ending operational snapshot must reconcile both to the aggregate standard-cost rollforward and to the expected ledger inventory-control balance after the prepared preview. Inventory-control balance aggregation deduplicates immutable account ids resolved by inventory.general, inventory.input, and inventory.output.

Non-persistent preparation may validate complete relationship proposals whose supporting source is already accepted and whose target is the current Inventory source identity. Required relationships resolve only after the Inventory workflow record exists and must resolve before a Summary batch becomes ready to post.

Standard-cost revisions

A standard-cost revision is prospective and versioned. When a revision changes the value of quantity already on hand, the valuation change is a distinct Inventory-owned adjustment event:

quantity on hand at the revision boundary
× (new standard unit cost - prior standard unit cost)
= inventory valuation adjustment

The adjustment posts through central Accounting using the applicable inventory and inventory-adjustment roles. It preserves the old and new cost versions, effective boundary, on-hand quantity, calculation, actor, reason, and evidence.

Purchase-price variance

Purchase-price variance is an Inventory-owned later valuation event linked to the Purchasing-owned acquisition evidence. It does not recreate the purchase, payable, receipt, or inventory acquisition.

The supported purchase unit price is derived from the Purchasing-owned inventory-acquisition amount allocated to net received units after discounts and returns. Only amounts explicitly classified into inventory acquisition are included. Unit-of-measure conversion must be explicit. Unsupported freight, tax, landed-cost, or allocation meaning remains held.

For an allocation with net received quantity:

net received quantity
× (purchase unit price - applicable standard unit cost)
= purchase-price variance

A positive amount is unfavorable and a negative amount is favorable. Inventory owns both supported PPV posting templates:

Prior acquisition state Unfavorable PPV Favorable 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

When GRNI exists, the Inventory PPV event adjusts that specific accrual before the Purchasing invoice may settle it. The adjusted GRNI carrying amount must equal the supported invoice inventory-acquisition amount allocated to the accrual:

posted GRNI carrying amount
+ Inventory-owned PPV adjustment
= supported invoice inventory-acquisition allocation

The ordered path is:

  1. the uninvoiced-inventory accrual is accepted and posted;
  2. authoritative receipt, invoice-price, standard-cost, and allocation evidence resolves to the same-company events;
  3. any nonzero Inventory-owned PPV adjustment is accepted and posted;
  4. the later Purchasing invoice settles the adjusted GRNI carrying amount to payable.trade.

Zero variance produces a preserved reconciliation result but no zero-value PPV journal entry. Purchasing may then settle the unchanged GRNI amount.

For example, an unfavorable case with a 100 GRNI accrual and a supported invoice inventory amount of 120 posts:

GRNI accrual:       Dr Inventory 100   Cr GRNI 100
Inventory PPV:      Dr PPV 20          Cr GRNI 20
Purchasing invoice: Dr GRNI 120        Cr Accounts Payable 120

A favorable case with the same 100 GRNI accrual and a supported invoice inventory amount of 90 posts:

GRNI accrual:       Dr Inventory 100   Cr GRNI 100
Inventory PPV:      Dr GRNI 10          Cr PPV 10
Purchasing invoice: Dr GRNI 90          Cr Accounts Payable 90

In both cases GRNI clears, inventory remains at standard cost, the variance has one Inventory-owned posting result, and Purchasing records only the payable settlement.

Partial receipts, partial invoices, and many-to-many matches use explicit workflow-owned allocations. Allocations must sum exactly to the affected receipt, invoice inventory-acquisition amount, GRNI carrying amount, and PPV adjustment as applicable. Returns use signed net receipt quantity and explicit source-event relationships. Corrections and reversals remain held until the Corrections workflow accepts their posting treatment.

PPV must reconcile to authoritative receipt and purchase-price evidence, the standard-cost version used, and any linked GRNI adjustment. All posting and relationship amounts use the company currency under ADR 0026. Foreign-currency evidence is preserved, but conversion or exchange-difference cases remain held.

Validation rules

  • Missing standard cost, cost version, movement identity, cutoff identity, or beginning snapshot produces a visible exception.
  • Weighted-average cost must not be substituted when standard cost is missing.
  • One operational movement contributes to one accepted period run.
  • The selected movement interval must not overlap an adjacent finalized run.
  • A prior ending snapshot and next beginning snapshot must agree or expose an explicit supersession or correction.
  • Late or backdated movements affecting a finalized period must not silently alter its snapshot or a later beginning balance.
  • Cost revisions and PPV are distinct events with their own identity, calculation, evidence, and posting result.
  • Inventory relationships to Sales and Purchasing events do not authorize reposting those workflows' accounting events.
  • Inventory is the sole PPV posting owner. A Purchasing template never posts PPV.
  • A GRNI-related PPV event resolves to and adjusts one or more specifically allocated posted GRNI accruals before dependent invoice settlement.
  • The PPV calculation, GRNI change, and invoice inventory-acquisition allocation reconcile exactly in the company currency.
  • Missing or conflicting receipt, price, standard-cost, unit, allocation, currency, or relationship evidence produces a visible held result.
  • A dependent Purchasing invoice remains held until required GRNI and PPV relationships resolve and the adjusted GRNI carrying amount equals its settlement allocation.

Late and backdated movements

Before hard close, a changed Inventory run is handled through explicit supersession and traceable reversal or replacement accounting in an eligible period. After hard close, a late or backdated movement remains a visible exception and its accounting difference routes through Corrections, normally in the current open period. Reopening the affected period requires the authority, reason, and audit trail required by canonical Close truth.

Neither a point-in-time report using a product's current cost nor a provider rule that adds tax or other amounts to standard cost overrides this decision. Historical results use the effective cost version. Tax, freight, or landed cost enters PPV only when accepted Purchasing truth explicitly classifies and allocates it to inventory acquisition.

Consequences

  • Standard cost provides a stable basis for comparison across periods.
  • Operational inventory detail remains outside BooksPlus.
  • Cost changes become visible accounting events rather than historical rewrites.
  • Step 8 may preserve receipt and purchase-price evidence without treating PPV as a second acquisition.
  • GRNI settlement remains balanced without giving Purchasing a second PPV posting path.

Acceptance record

Accepted with these confirmations:

  • Inventory Summary uses company-wide, versioned standard cost per product.
  • Movement-time cost versions and prospective on-hand revaluation preserve historical finalized results.
  • Company-local dates use the half-open cutoff interval defined above.
  • Late and backdated movements follow explicit supersession before hard close and Corrections or authorized reopen after hard close.
  • PPV purchase price uses explicitly allocated inventory-acquisition amounts after discounts and returns, with explicit unit conversion.
  • Inventory alone posts PPV, including the GRNI-adjustment path and ordering accepted above.
  • ADR 0024 and the Purchasing fact contract were amended concurrently to remove Purchasing-owned PPV.
  • The canonical Inventory fact contract accepts aggregate manifest-backed period facts, explicit initial-boundary handling, the three ordinary period-summary templates above, exact operational and ledger reconciliation, and distinct later facts for cost revisions and nonzero PPV.
  • 0020-initial-release-scope-and-financial-workflow-taxonomy.md
  • 0023-booksplus-starter-chart-and-dolibarr-account-crosswalk.md
  • 0024-operational-summary-workflow-boundaries-and-purchasing-facts.md
  • 0026-initial-release-single-currency-boundary.md
  • 0029-cross-workflow-accounting-event-identity.md
  • ../../contracts/purchasing-and-payables-summary-fact.contract.md
  • ../../contracts/inventory-period-summary-fact.contract.md
  • ../../accounting/posting-and-reversal.md
  • ../../accounting/close.md