Rivane

Accounting
made smart

ERP Use CasesTier 1Published April 30, 2026

Weighted-Average Cost Recalculation on Receipt

Weighted-Average Cost Recalculation on Receipt for US and UK finance teams: ERP requirements, controls, audit evidence, data model, APIs, state transitions, and implementation checks.

Inventory Valuation is where ERP discipline either begins or breaks.

Weighted-Average Cost Recalculation on Receipt looks operational from far away. In a real finance team, it is a chain of assertions: the right actor started the work, the required records existed, the control policy was applied, the state change was preserved, and the outcome can be explained later without rebuilding the transaction from emails and spreadsheets.

The expected business outcome is specific: Inventory on BS always reflects current weighted-average cost; COGS variance minimized; no manual cost reentry.

The control flow a finance team actually needs.

Workflow map showing control steps, exceptions, and evidence for this ERP process.Atomic Read-Modi...Start conditionFormula: New Avg...Required checksFunctional Curre...Owner and SLAHistorical Avera...System updateCost Revaluation...Exception handlingAudit packetEvidence trailException loopInventory Valuation should preserve every override and rejection.
Workflow map for this ERP process, including exception handling and audit evidence.

Step 1

Atomic Read-Modify-Write Of Average Cost

Step 2

Formula: New Avg = /

Step 3

Functional Currency Used For Blending

Step 4

Historical Average Cost Preserved Per...

Step 5

Cost Revaluation Journal Auto-Posted...

The ERP surface involved.

Module

Inventory Valuation

Actors

Cost Accountant, Platform API, GL Integration

Tier

Tier 1

Finance area

Inventory & Warehouse Management

Region lens

US and UK finance teams

Publication date

April 30, 2026

Atomic read-modify-write of average cost (SERIALIZABLE isolation, no race condition); formula: new_avg = (existing_qty × existing_avg + recv_qty × recv_unit_cost) / (existing_qty + recv_qty); functional currency used for blending; historical average cost preserved per period for audit; cost revaluation journal auto-posted when average changes on existing inventory; zero-quantity guard (division-by-zero if all stock issued before receipt posts); report: average cost history by item by period.

US and UK teams have different compliance hooks, but the same control problem.

US teams usually care about clean evidence for audit support, vendor records, payment controls, tax reporting, and management review. UK teams usually care about VAT-ready records, approval evidence, digital-record discipline, and traceable postings. The country-specific details differ, but the operating pattern is the same: the ERP needs controlled records, explicit ownership, defensible state changes, and evidence that survives beyond the person who completed the task.

The control matrix.

Control areaRequirementAcceptance proof
Control 1Atomic read-modify-write of average cost (SERIALIZABLE isolation, no race conditionGiven an item with weighted-average costing and existing on-hand qty and average cost
Control 2formula: new_avg = (existing_qty × existing_avg + recv_qty × recv_unit_cost) / (existing_qty + recv_qtywhen a goods receipt posts at a different unit cost
Control 3functional currency used for blendingthen new average is computed atomically as (existing_qty × existing_avg + recv_qty × recv_unit_cost) / (existing_qty + recv_qty), stored on the item cost record, and a revaluation GL journal is posted
Control 4historical average cost preserved per period for auditnegative) when a receipt would cause division-by-zero (zero existing qty pre-receipt, immediately consumed) then system applies recv_unit_cost as the new average without division.
Control 5cost revaluation journal auto-posted when average changes on existing inventoryInventory on BS always reflects current weighted-average cost; COGS variance minimized; no manual cost reentry.
Control 6zero-quantity guard (division-by-zero if all stock issued before receipt postsInventory on BS always reflects current weighted-average cost; COGS variance minimized; no manual cost reentry.

Audit evidence is a chain, not a folder.

Evidence layerWhat should be preserved
Business eventWhen a goods receipt is posted, the system calculates the new weighted-average unit cost by blending the existing on-hand quantity and value with the incoming quantity and cost. The new average cost is stored on the item master's cost record and applied to all subsequent issues. Any open sales order cost estimates are recalculated at the new average. A GL entry records the inventory value increase at the new average cost for the received quantity.
Control rulesAtomic read-modify-write of average cost (SERIALIZABLE isolation, no race condition); formula: new_avg = (existing_qty × existing_avg + recv_qty × recv_unit_cost) / (existing_qty + recv_qty); functional currency used for blending; historical average cost preserved per period for audit; cost revaluation journal auto-posted when average changes on existing inventory; zero-quantity guard (division-by-zero if all stock issued before receipt posts); report: average cost history by item by period.
Acceptance proofGiven an item with weighted-average costing and existing on-hand qty and average cost; when a goods receipt posts at a different unit cost; then new average is computed atomically as (existing_qty × existing_avg + recv_qty × recv_unit_cost) / (existing_qty + recv_qty), stored on the item cost record, and a revaluation GL journal is posted; (negative) when a receipt would cause division-by-zero (zero existing qty pre-receipt, immediately consumed) then system applies recv_unit_cost as the new average without division.
Data record
item_cost_record { item_id: string, entity_id: string, period: string, avg_unit_cost_minor: int64, currency_code: char(3), on_hand_qty: int, as_of: timestamp };
cost_history { item_id, period, avg_unit_cost_minor, currency_code, changed_at: timestamp };
(reference, product may differ).
System event
POST /v1/goods-receipt-notes/{id}/confirm triggers weighted-avg recalculation -> 200 { new_avg_unit_cost_minor, currency_code };
GET /v1/inventory-items/{id}/cost-history;
emits inventory.weighted_avg_updated event;
recalculation uses SERIALIZABLE isolation.
Lifecycle statecost record is continuously updated on each receipt; historical snapshots preserved per period immutably; guard: concurrent receipts serialized to prevent race; zero-quantity guard applied before division.

The useful version of this workflow is not only fast. It is inspectable. A controller, auditor, or operator should be able to move from source event to system record to state transition to final business outcome without guessing.

Implementation contracts.

Reference data model

`item_cost_record` { item_id: string, entity_id: string, period: string, avg_unit_cost_minor: int64, currency_code: char(3), on_hand_qty: int, as_of: timestamp }; `cost_history` { item_id, period, avg_unit_cost_minor, currency_code, changed_at: timestamp }; (reference, product may differ).

API and events

`POST /v1/goods-receipt-notes/{id}/confirm` triggers weighted-avg recalculation -> 200 { new_avg_unit_cost_minor, currency_code }; `GET /v1/inventory-items/{id}/cost-history`; emits `inventory.weighted_avg_updated` event; recalculation uses SERIALIZABLE isolation.

State transitions

cost record is continuously updated on each receipt; historical snapshots preserved per period immutably; guard: concurrent receipts serialized to prevent race; zero-quantity guard applied before division.

Common implementation traps.

Treating the workflow as data entry

If the ERP only stores the final record, the team loses the decision trail that explains how the record became valid.

Hiding exception logic

Exceptions need owners, reason codes, and time stamps. A vague pending state is not a control.

Posting without recovery design

Retries, duplicate submissions, and partial failures must be explicit so the system does not create inconsistent records.

Skipping evidence design

A workflow that cannot produce evidence on demand will eventually push finance teams back into manual screenshots and spreadsheets.

Where Rivane fits.

Rivane is built for finance workflows where automation must stay tied to source documents, approvals, state transitions, ledger impact, reporting, and audit evidence. Use this guide as a checklist for evaluating whether an ERP workflow is merely digitized or actually controlled.

References and source basis.

These sources provide the standards, regulatory, or government context around the flow. They are included so the guide is useful to finance operators, auditors, and implementation teams, not only buyers reading software copy.

Back to ERP use cases