Work Order: Materials, Labor, and Overhead Roll-Up

Three Accruals rolled into one completion Anticipation and an inventory transfer

The scenario

Precision Parts Manufacturing runs work order WO-2026-500: 500 widget assemblies for AutoTech Industries. Direct materials (25,000), direct labor (18,200), and applied overhead (4,300) roll up to an expected 47,500 USD transfer to finished goods.

How FORAY models it

Each cost pool is its own Accrual with its own formula block; the completion Anticipation references all three through its accrual references (F23); the inventory-transfer Action settles the expectation in full. The Action carries no payment method — F16 is optional, and an internal inventory transfer has none.

What to observe in the record

  • One Anticipation referencing three Accruals: references are many-to-many arrays.
  • Yield assumptions, scrap counts, and unit costs are residue — scenario truth, not catalog facts.
  • The transfer Action allocates the full 47,500 against the completion expectation, exactly.

Wire 4.2 record

This record is a teaching example, emitted by the FORAY generator (template manufacturing) — not hand-written. No blockchain anchoring has occurred or is implied; anchor-related fields are placeholders. Parties, amounts, and dates are illustrative. Wire keys are catalog codes (F-codes); the readable names used in the prose above are the implementer register, which never appears in hashed bytes.

{
  "F1": "MFG_WO_2026_Q1_WIDGET_500",
  "F2": "MFG_WO_2026_Q1_WIDGET_500",
  "F3": "Precision Parts Manufacturing",
  "F7": 47500,
  "F8": "USD",
  "F15": "completed",
  "F25": {
    "compliance_flags": [
      "ISO_9001",
      "GAAP",
      "Cost_Accounting_Standards"
    ]
  },
  "F26": "work_order",
  "schema_version": "4.2",
  "timestamp": "2026-01-20T08:00:00Z",
  "arrangements": [
    {
      "F4": "production_work_order",
      "F5": [
        {
          "jurisdiction": "US-MI",
          "name": "Precision Parts Manufacturing",
          "role": "manufacturer"
        },
        {
          "jurisdiction": "US-OH",
          "name": "AutoTech Industries",
          "role": "customer"
        }
      ],
      "F7": 50000,
      "F11": "2026-01-15T00:00:00Z",
      "F25": {
        "delivery_date": "2026-01-25",
        "description": "Work Order WO-2026-500: Premium Widget Assembly (500 units)",
        "product_code": "PWA-1000",
        "quality_standard": "ISO 9001",
        "quantity_ordered": 500,
        "unit_price": 100
      },
      "id": "ARR_WORK_ORDER_500"
    }
  ],
  "accruals": [
    {
      "F4": "direct_material_cost",
      "F17": "Calculated",
      "F18": "hash_3c6e9a2d5f8b10474829c6d5e8f1a3b7",
      "F19": {
        "aluminum_cost_per_kg": 45,
        "aluminum_kg": 250,
        "electronics_cost": 25,
        "electronics_units": 500,
        "fasteners_cost": 2.5,
        "fasteners_sets": 500
      },
      "F20": 25000,
      "F22": [
        "ARR_WORK_ORDER_500"
      ],
      "F25": {
        "accounting_entry": {
          "credit": {
            "account": "1200-Raw Materials",
            "amount": 25000
          },
          "debit": {
            "account": "1310-WIP Inventory",
            "amount": 25000
          }
        },
        "description": "BOM materials consumed - aluminum, electronics, fasteners",
        "fiscal_period": {
          "month": 1,
          "quarter": 1,
          "year": 2026
        }
      },
      "id": "ACC_DIRECT_MATERIALS"
    },
    {
      "F4": "direct_labor_cost",
      "F17": "Calculated",
      "F18": "hash_5d8f1b4e7a0c30585920d7e6f9a2b4c8",
      "F19": {
        "avg_hourly_rate": 35,
        "benefits_rate": 0.3,
        "labor_hours": 400
      },
      "F20": 18200,
      "F22": [
        "ARR_WORK_ORDER_500"
      ],
      "F25": {
        "accounting_entry": {
          "credit": {
            "account": "2300-Wages Payable",
            "amount": 14000
          },
          "credit2": {
            "account": "2310-Benefits Payable",
            "amount": 4200
          },
          "debit": {
            "account": "1310-WIP Inventory",
            "amount": 18200
          }
        },
        "description": "Production labor - assembly line workers",
        "fiscal_period": {
          "month": 1,
          "quarter": 1,
          "year": 2026
        }
      },
      "id": "ACC_DIRECT_LABOR"
    },
    {
      "F4": "manufacturing_overhead",
      "F17": "Calculated",
      "F18": "hash_7f0a3c6e9b2d50696031e8f7a0b3c5d9",
      "F19": {
        "machine_hours": 200,
        "overhead_rate_per_hour": 21.5
      },
      "F20": 4300,
      "F22": [
        "ARR_WORK_ORDER_500"
      ],
      "F25": {
        "accounting_entry": {
          "credit": {
            "account": "5100-Applied Overhead",
            "amount": 4300
          },
          "debit": {
            "account": "1310-WIP Inventory",
            "amount": 4300
          }
        },
        "description": "Applied overhead - machine hours basis",
        "fiscal_period": {
          "month": 1,
          "quarter": 1,
          "year": 2026
        }
      },
      "id": "ACC_MANUFACTURING_OVERHEAD"
    }
  ],
  "anticipations": [
    {
      "F4": "production_completion",
      "F10": 47500,
      "F22": [
        "ARR_WORK_ORDER_500"
      ],
      "F23": [
        "ACC_DIRECT_MATERIALS",
        "ACC_DIRECT_LABOR",
        "ACC_MANUFACTURING_OVERHEAD"
      ],
      "F25": {
        "assumptions": {
          "cost_per_unit": 95,
          "expected_good_units": 490,
          "yield_rate": 0.98
        },
        "description": "Expected completion and transfer to finished goods"
      },
      "F27": "2026-01-24",
      "F28": 0.95,
      "id": "ANT_PRODUCTION_COMPLETE"
    }
  ],
  "actions": [
    {
      "F4": "inventory_transfer",
      "F9": 47500,
      "F12": "2026-01-24T16:00:00Z",
      "F15": "completed",
      "F21": [
        {
          "allocation_type": "full",
          "amount": 47500,
          "currency": "USD",
          "ref": "ANT_PRODUCTION_COMPLETE",
          "ref_type": "anticipation",
          "remaining_balance": 0
        }
      ],
      "F22": [
        "ARR_WORK_ORDER_500"
      ],
      "F23": [
        "ACC_DIRECT_MATERIALS",
        "ACC_DIRECT_LABOR",
        "ACC_MANUFACTURING_OVERHEAD"
      ],
      "F24": [
        "ANT_PRODUCTION_COMPLETE"
      ],
      "F25": {
        "description": "Transfer completed units to finished goods inventory",
        "production": {
          "scrap_value": 45,
          "unit_cost": 95.52,
          "units_completed": 497,
          "units_scrapped": 3
        },
        "variance": {
          "actual": 47500,
          "difference": 0,
          "expected": 47500
        }
      },
      "id": "ACT_PRODUCTION_COMPLETE"
    }
  ],
  "component_hashes": {
    "accruals": "sha256:PLACEHOLDER",
    "actions": "sha256:PLACEHOLDER",
    "anticipations": "sha256:PLACEHOLDER",
    "arrangements": "sha256:PLACEHOLDER"
  },
  "merkle_root": "sha256:PLACEHOLDER",
  "blockchain_anchor": {
    "anchored_at": null,
    "block_height": null,
    "confirmation_time_ms": null,
    "kaspa_tx_id": null
  }
}

Canonical form — the hashed bytes

The canonical byte form is a single line: F-coded members in ascending numeric order, envelope members in their ruled enumeration, one legal spelling per number. The hash below is computed over exactly the bytes shown — copy the line into any SHA-256 tool to reproduce it.

{"F1":"MFG_WO_2026_Q1_WIDGET_500","F2":"MFG_WO_2026_Q1_WIDGET_500","F3":"Precision Parts Manufacturing","F7":47500,"F8":"USD","F15":"completed","F25":{"compliance_flags":["ISO_9001","GAAP","Cost_Accounting_Standards"]},"F26":"work_order","schema_version":"4.2","timestamp":"2026-01-20T08:00:00Z","arrangements":[{"F4":"production_work_order","F5":[{"jurisdiction":"US-MI","name":"Precision Parts Manufacturing","role":"manufacturer"},{"jurisdiction":"US-OH","name":"AutoTech Industries","role":"customer"}],"F7":50000,"F11":"2026-01-15T00:00:00Z","F25":{"delivery_date":"2026-01-25","description":"Work Order WO-2026-500: Premium Widget Assembly (500 units)","product_code":"PWA-1000","quality_standard":"ISO 9001","quantity_ordered":500,"unit_price":100},"id":"ARR_WORK_ORDER_500"}],"accruals":[{"F4":"direct_material_cost","F17":"Calculated","F18":"hash_3c6e9a2d5f8b10474829c6d5e8f1a3b7","F19":{"aluminum_cost_per_kg":45,"aluminum_kg":250,"electronics_cost":25,"electronics_units":500,"fasteners_cost":2.5,"fasteners_sets":500},"F20":25000,"F22":["ARR_WORK_ORDER_500"],"F25":{"accounting_entry":{"credit":{"account":"1200-Raw Materials","amount":25000},"debit":{"account":"1310-WIP Inventory","amount":25000}},"description":"BOM materials consumed - aluminum, electronics, fasteners","fiscal_period":{"month":1,"quarter":1,"year":2026}},"id":"ACC_DIRECT_MATERIALS"},{"F4":"direct_labor_cost","F17":"Calculated","F18":"hash_5d8f1b4e7a0c30585920d7e6f9a2b4c8","F19":{"avg_hourly_rate":35,"benefits_rate":0.3,"labor_hours":400},"F20":18200,"F22":["ARR_WORK_ORDER_500"],"F25":{"accounting_entry":{"credit":{"account":"2300-Wages Payable","amount":14000},"credit2":{"account":"2310-Benefits Payable","amount":4200},"debit":{"account":"1310-WIP Inventory","amount":18200}},"description":"Production labor - assembly line workers","fiscal_period":{"month":1,"quarter":1,"year":2026}},"id":"ACC_DIRECT_LABOR"},{"F4":"manufacturing_overhead","F17":"Calculated","F18":"hash_7f0a3c6e9b2d50696031e8f7a0b3c5d9","F19":{"machine_hours":200,"overhead_rate_per_hour":21.5},"F20":4300,"F22":["ARR_WORK_ORDER_500"],"F25":{"accounting_entry":{"credit":{"account":"5100-Applied Overhead","amount":4300},"debit":{"account":"1310-WIP Inventory","amount":4300}},"description":"Applied overhead - machine hours basis","fiscal_period":{"month":1,"quarter":1,"year":2026}},"id":"ACC_MANUFACTURING_OVERHEAD"}],"anticipations":[{"F4":"production_completion","F10":47500,"F22":["ARR_WORK_ORDER_500"],"F23":["ACC_DIRECT_MATERIALS","ACC_DIRECT_LABOR","ACC_MANUFACTURING_OVERHEAD"],"F25":{"assumptions":{"cost_per_unit":95,"expected_good_units":490,"yield_rate":0.98},"description":"Expected completion and transfer to finished goods"},"F27":"2026-01-24","F28":0.95,"id":"ANT_PRODUCTION_COMPLETE"}],"actions":[{"F4":"inventory_transfer","F9":47500,"F12":"2026-01-24T16:00:00Z","F15":"completed","F21":[{"allocation_type":"full","amount":47500,"currency":"USD","ref":"ANT_PRODUCTION_COMPLETE","ref_type":"anticipation","remaining_balance":0}],"F22":["ARR_WORK_ORDER_500"],"F23":["ACC_DIRECT_MATERIALS","ACC_DIRECT_LABOR","ACC_MANUFACTURING_OVERHEAD"],"F24":["ANT_PRODUCTION_COMPLETE"],"F25":{"description":"Transfer completed units to finished goods inventory","production":{"scrap_value":45,"unit_cost":95.52,"units_completed":497,"units_scrapped":3},"variance":{"actual":47500,"difference":0,"expected":47500}},"id":"ACT_PRODUCTION_COMPLETE"}],"component_hashes":{"accruals":"sha256:PLACEHOLDER","actions":"sha256:PLACEHOLDER","anticipations":"sha256:PLACEHOLDER","arrangements":"sha256:PLACEHOLDER"},"merkle_root":"sha256:PLACEHOLDER","blockchain_anchor":{"anchored_at":null,"block_height":null,"confirmation_time_ms":null,"kaspa_tx_id":null}}

Canonical-bytes SHA-256: 7ff84fef70f593463146cfc3de3fad47bd6a7b080ed820ac0ac3626141444cd8

Validated against the live validator (POST /api/validate-foray): 0 errors, 0 warnings.