MRP / Subcontracting MRP

Subcontracting MRP - Domain Invariants & Business Rules

Invariants governing custody retention, backflushing, BOM lock, and atomic receipt for subcontracting and toll manufacturing.

Domain Invariants & Business Rules (“The Law”)

Domain invariants represent absolute truths that the Subcontracting domain enforces. Any transaction violating these invariants is aborted, ensuring that assets, costs, and commitments remain consistent across the ERP ecosystem.


1. Asset Retention on Component Dispatch

Transferring raw materials, packaging, or semi-finished goods to a subcontractor location is strictly an internal location movement. It does not constitute an expense, sale, disposal, or consumption.

The Law

A Component Transfer Note from a principal warehouse to a Subcontractor Virtual Location:

  • Reduces the quantity available in the source warehouse.
  • Increases the quantity recorded in the subcontractor virtual location.
  • Leaves the total company-owned inventory value unchanged.
  • Generates no revenue, no cost of goods sold, and no accounts payable.

Structural Consequence

Treating a component dispatch as an expense would prematurely reduce assets and misstate profitability. It would also break cost traceability because the finished goods could not later be capitalized from the original component values.

Audit Rationale

This invariant is essential for accurate balance-sheet reporting, insurance valuation, and tax compliance. Subcontractor-held stock must remain visible as an owned asset in inventory registers and physical count schedules.


2. Non-Negative Custody Rule

Receiving finished goods cannot trigger backflushing if the required component quantities exceed current balances in the designated subcontractor location.

The Law

Before a Subcontracting Goods Received Note (GRN) can be confirmed:

$$ \text{Required Component Quantity} \le \text{Available Balance in Subcontractor Virtual Location} $$

Where:

$$ \text{Required Component Quantity} = \text{Accepted Finished Quantity} \times \text{BOM Component Quantity per FG Unit} $$

Exception Handling

If the inequality is violated, the receipt is blocked and one of the following resolutions must be applied:

  • Additional components are dispatched to the subcontractor virtual location to cover the shortfall.
  • The BOM conversion ratio or yield assumption is formally revised and re-approved for the SCO.
  • A scrap or variance adjustment is recorded with explicit authorization to explain the imbalance.
  • A partial receipt is accepted for the quantity that can be supported by available component balances.

Structural Consequence

Without this rule, the system could create negative inventory at the subcontractor location, hiding shrinkage, unauthorized consumption, or data entry errors. It also prevents the capitalization of finished goods from components that were never physically dispatched.


3. Mandatory BOM Lock

A Subcontracting Order cannot be confirmed without an approved, versioned Bill of Materials and explicit conversion/yield rates.

The Law

At the point of SCO confirmation:

  • The BOM revision must be in an Approved status.
  • The BOM version must be explicitly linked to the SCO and frozen for the duration of the order.
  • Conversion ratios and planned yield rates must be populated for every material component line.
  • If a new BOM version is approved after SCO confirmation, it does not automatically apply to active SCOs unless a formal change order is executed.

Validation Rules

AttributeRule
BOM StatusMust be Approved. Draft, rejected, or obsolete BOMs are blocked.
BOM VersionMust be explicit and frozen on the SCO header.
Component LinesEvery material component required for the finished SKU must be present.
Conversion RatioMust be greater than zero and within configured tolerance bands.
Service LineTolling fee and setup charge references must be populated from the service PO.

Structural Consequence

Without a locked BOM, backflushing would use ambiguous or changing conversion factors, leading to incorrect consumption, misstated inventory costs, and unreconciled subcontractor balances.


4. Atomic Receipt & Backflushing

Registering finished goods receipt and deducting consumed raw components must occur as an atomic transactional unit. One cannot succeed without the other.

The Law

A Subcontracting GRN confirmation consists of inseparable operations:

  1. Finished goods receipt: Accepted finished quantity is added to quarantine or sellable finished stock.
  2. Component backflushing: Equivalent component quantities are deducted from the subcontractor virtual location.
  3. Cost capitalization: Material and service costs are combined into the finished inventory value.
  4. Event emission: Completion events are emitted only after the preceding three steps succeed.

If any step fails, the entire GRN confirmation is rolled back. The system must never record finished stock without consuming components, nor consume components without recording finished stock.

Business Validation Rules

StepValidation
Finished ReceiptAccepted quantity must be non-zero and within SCO tolerance.
Quality InspectionInspection results must be recorded before quarantine release.
BackflushingRequired component balances must be available (Non-Negative Custody Rule).
Cost CapitalizationComponent costs and tolling fees must be determinable and non-negative.
Event EmissionAll prior steps committed before downstream consumers are notified.

Structural Consequence

Atomicity guarantees that inventory balances, component costs, and financial capitalization remain perfectly aligned. A partial or split transaction would create phantom stock, missing consumption, or unreconciled work-in-process balances.

Our Premium Sponsors

Obelaw is proudly open-source. Continued development, bug fixes, and community support are made possible by the generosity of our sponsors.

Sponsor Obelaw