diff --git a/docs/PHASES.md b/docs/PHASES.md
index 6f05e2e..fef9e85 100644
--- a/docs/PHASES.md
+++ b/docs/PHASES.md
@@ -39,8 +39,9 @@ Customer and administration screens are implemented, with recovery, pricing, sto
- Production batches support draft planning, start, completion, cancellation, and exact planned material quantities. Staff can log consumption and waste and reconcile the results against the plan.
- Completed batches support packaging runs, production and packaging material debits, and receipt of good finished pieces into warehouse stock.
- Costing supports immutable material rate revisions, current-rate BOM estimates, and completed-batch cost snapshots with exact totals and saved rate revisions.
-- Warehouse transfers and adjustments remain open.
+- Material warehouse transfers post matched debits and credits. Authorized adjusters can record signed corrections with reasons, including positive corrections for materials with no balance at the selected warehouse.
- Live acceptance requires an organization and procurement test users. Exercise read-only and manage roles, inactive suppliers and materials, mixed currencies, below-minimum quantities, price snapshots and purchase order state conflicts.
- Supplier document UAT requires an uploader, an independent reviewer, and a read-only account. Through the deployed ingress, upload a valid PDF near the 2 MiB limit, verify that the uploader cannot decide on it, and check that a reader can download it only after approval.
- BOM UAT should activate a second revision and confirm the previous revision becomes superseded. Repeat for the other BOM type and verify its active revision is independent. Check that inactive materials and stale drafts are rejected.
- Costing UAT should revise a material rate and verify that future BOM estimates use the new revision while an existing batch snapshot retains its original amounts and rates. Test missing rates, missing usage, and fully rejected output.
+- Warehouse movement UAT should verify both ledgers and unchanged combined stock after a transfer, rejection of insufficient stock, and one ledger entry for a retried adjustment.
diff --git a/src/App.tsx b/src/App.tsx
index e38cee0..22610d7 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -73,6 +73,10 @@ function Router() {
{() => }{() => }
+ {() => }
+
+ {(params) => }
+
{(params) => }
diff --git a/src/components/WarehousePostingForm.tsx b/src/components/WarehousePostingForm.tsx
index 696ae31..a81ca04 100644
--- a/src/components/WarehousePostingForm.tsx
+++ b/src/components/WarehousePostingForm.tsx
@@ -1,29 +1,37 @@
-import { useState } from "react";
+import { useState, type ReactNode } from "react";
import Alert from "@mui/material/Alert";
import { z } from "zod";
import { ActionForm, Field, Pager, QueryView, readText, usePrivateQuery } from "@/components/WorkspaceTools";
import { warehouse } from "@/lib/commerce";
-export function WarehousePostingForm({ label, instruction, warehouseLabel = "Warehouse", submit }: {
+export function WarehousePostingForm({ label, instruction, warehouseLabel = "Warehouse", excludeWarehouseId, read, children, reset = false, submit }: {
label: string;
instruction: string;
warehouseLabel?: string;
+ excludeWarehouseId?: string;
+ read?: (data: FormData) => unknown;
+ children?: ReactNode;
+ reset?: boolean;
submit: (input: unknown) => Promise;
}) {
const [offset, setOffset] = useState(0);
const query = usePrivateQuery(`/inventory/warehouses?limit=25&offset=${offset}`, z.array(warehouse));
- return {(rows) => <>
- {rows.length ? ({ warehouseId: readText(data, "warehouseId") })} submit={submit}>
+ return {(rows) => {
+ const options = rows.filter((row) => row.id !== excludeWarehouseId);
+ return <>
+ {options.length ? ({ warehouseId: readText(data, "warehouseId") }))} submit={submit}>