Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.
TypeScript ai-agentsbill-of-materialserpinventory-managementleanmanufacturingmanufacturing-execution-systemmcp-servermesmrpopen-source-erppostgresqlproduction-planningqmsquality-management-systemreact-routerself-hostedsupabasetraceabilitytypescript
fix(production): resolve outside-op supplier from process on job release (#1674)
Brad Barbind0d427fa82ce
diff --git a/.ai/playbooks/release-job-outside-processing-po.md b/.ai/playbooks/release-job-outside-processing-po.mdnew file mode 100644index 0000000000..7bf1c9d1da--- /dev/null+++ b/.ai/playbooks/release-job-outside-processing-po.md@@ -0,0 +1,51 @@+# Release Job — Outside Processing PO modal++Last tested: 2026-09-18+Route: /x/job/$jobId/details (also the per-job Release button on+/x/sales-order/$orderId/details — renders the same `JobStartModal`)++## Prerequisites+- A **Draft** job with at least one `Outside Processing` operation.+- The operation's process has a `supplierProcess` (a supplier configured for it,+ e.g. AstroMill Machining → Clean Room Assembly). The operation's OWN+ `operationSupplierProcessId` may be NULL — the modal falls back to the process's+ sole supplier.++## Steps+### 1. Navigate — open the job details page. Header shows a "Release" button+ (enabled only while status = Draft).+### 2. Click "Release" — opens the `JobStartModal` ("Release Job JNNNNNN").+### 3. Verify the modal (the fix):+ - Shows "Purchase orders required" + the supplier name (e.g. "AstroMill+ Machining") with a "Create New" PO dropdown.+ - Does NOT show "Missing Suppliers".+ - "Release Job" button is ENABLED.+ - **Multiple suppliers on the process:** an extra "These operations use a+ process with multiple suppliers. Choose a supplier for each." section+ appears with a per-operation supplier dropdown (defaulted to the first+ candidate). Changing it re-resolves the PO row to that supplier. On release+ the chosen supplier is stamped onto `jobOperation.operationSupplierProcessId`+ and the PO is created for that supplier.+### 4. Click "Release Job" — plain `fetcher.Form` submit button, a click works+ (not a ValidatedForm; no requestSubmit needed). Modal closes, page reloads.+### 5. Verify results (DB or UI):+ - job.status = "Ready"+ - a Draft `purchaseOrder` (purchaseOrderType "Outside Processing") for the+ supplier, `jobId` set+ - a `purchaseOrderLine` with `jobOperationId` = the outside operation++## Selector Notes+- Release button: header button labelled "Release" (disabled unless Draft).+- Supplier row inside the modal is an avatar + name; the PO picker is a combobox+ defaulting to "Create New" (disabled when no existing draft POs for the supplier).++## Common Failures / History+- Before the fix: an outside operation with a NULL `operationSupplierProcessId`+ showed "Missing Suppliers" + disabled Release, even when the process had exactly+ one supplier. Fixed by resolving effective supplier = op's own+ `operationSupplierProcessId` ?? the process's sole `supplierProcess`, in both+ `JobHeader.tsx` (modal) and `create/index.ts` `purchaseOrderFromJob` (PO build).+- A process with 2+ suppliers shows a per-operation supplier picker defaulting+ to the first candidate; Release stays ENABLED and stamps the chosen (or+ defaulted) supplier on release. Release is blocked only when an operation's+ process has NO suppliers at all (genuine "Missing Suppliers").diff --git a/apps/erp/app/modules/people/people.models.ts b/apps/erp/app/modules/people/people.models.tsindex ca2b833296..176c072ebf 100644--- a/apps/erp/app/modules/people/people.models.ts+++ b/apps/erp/app/modules/people/people.models.ts@@ -40,7 +40,7 @@ export const departmentValidator = z.object({export const employeeJobValidator = z.object({title: zfd.text(z.string().optional()),startDate: zfd.text(z.string().optional()),- locationId: zfd.text(z.string().optional()),+ locationId: z.string().min(1, { message: "Location is required" }),shiftId: zfd.text(z.string().optional()),departmentId: zfd.text(z.string().optional()),managerId: zfd.text(z.string().optional())diff --git a/apps/erp/app/modules/people/people.service.ts b/apps/erp/app/modules/people/people.service.tsindex 44af91bf38..d6a46a62b0 100644--- a/apps/erp/app/modules/people/people.service.ts+++ b/apps/erp/app/modules/people/people.service.ts@@ -536,7 +536,7 @@ export async function insertEmployeeJob(job: {id: string;companyId: string;- locationId?: string;+ locationId: string;}) {return client.from("employeeJob").insert(job).select("*").single();@@ -611,10 +611,19 @@ export async function updateEmployeeJob(// sync no longer silently no-ops for users without people_create/// people_delete — the route's people_update check is the auth gate.try {+ // sanitize() turns any absent field into null, and locationId is NOT NULL,+ // so a caller that omits it (the API/MCP tool leaves it optional) would+ // otherwise wipe a set location. Never write a falsy locationId — drop it+ // from the payload so the existing value is preserved.+ const updatePayload = sanitize(employeeJob);+ if (!updatePayload.locationId) {+ delete (updatePayload as { locationId?: unknown }).locationId;+ }+await db.transaction().execute(async (trx) => {await trx.updateTable("employeeJob")- .set(sanitize(employeeJob))+ .set(updatePayload).where("id", "=", employeeId).where("companyId", "=", employeeJob.companyId).execute();diff --git a/apps/erp/app/modules/production/ui/Jobs/JobHeader.tsx b/apps/erp/app/modules/production/ui/Jobs/JobHeader.tsxindex 959ac93207..a8b02b973b 100644--- a/apps/erp/app/modules/production/ui/Jobs/JobHeader.tsx+++ b/apps/erp/app/modules/production/ui/Jobs/JobHeader.tsx@@ -82,6 +82,7 @@ import {useRouteData,useUser} from "~/hooks";+import { useSuppliers } from "~/stores";import { generateBomIds } from "~/utils/bom";import { path } from "~/utils/path";import { isJobLocked, jobCompleteValidator } from "../../production.models";@@ -594,6 +595,7 @@ export function JobStartModal({onClose: () => void;}) {const { carbon } = useCarbon();+ const [suppliers] = useSuppliers();const [loading, setLoading] = useState(true);const [missingOperationAssemblies, setMissingOperationAssemblies] = useState<{ bomId: string; description: string }[]@@ -611,8 +613,22 @@ export function JobStartModal({selectedPurchaseOrdersBySupplierId,setSelectedPurchaseOrdersBySupplierId] = useState<Record<string, string>>({});+ // Outside operations whose process offers MORE THAN ONE supplier — the user+ // picks which one (defaulting to the first). Single-supplier and explicitly+ // assigned operations never appear here; they resolve automatically.+ const [outsideOperationChoices, setOutsideOperationChoices] = useState<+ {+ id: string;+ description: string;+ options: { supplierProcessId: string; supplierId: string }[];+ }[]+ >([]);+ const [+ selectedSupplierProcessByOperationId,+ setSelectedSupplierProcessByOperationId+ ] = useState<Record<string, string>>({});- const validate = async () => {+ const validate = async (choicesOverride?: Record<string, string>) => {if (!carbon || !job) return;const [makeMethod, materials, operations, methodTree] = await Promise.all([carbon@@ -649,28 +665,126 @@ export function JobStartModal({existingPurchaseOrderLines.data?.map((pol) => pol.jobOperationId) ?? []);- // Filter out operations that already have purchase order lines- const operationsNeedingPurchaseOrders = outsideOperations.filter(- (op) =>- !existingJobOperationIds.has(op.id) && op.operationSupplierProcessId+ // Outside operations that still need handling (no existing purchase order line)+ const outsideOperationsWithoutPurchaseOrders = outsideOperations.filter(+ (op) => !existingJobOperationIds.has(op.id));- const uniqueOutsideProcessIds = operationsNeedingPurchaseOrders.map(- (op) => op.operationSupplierProcessId!+ // Resolve each operation's supplier: its own supplier process, or — when the+ // operation has none — the sole supplier configured for its process. A process+ // with exactly one supplier is unambiguous, so it counts as assigned; a process+ // with zero or multiple suppliers still requires an explicit per-operation pick.+ type SupplierProcessRef = {+ id: string;+ supplierId: string;+ processId: string;+ };++ const outsideProcessIds = Array.from(+ new Set(+ outsideOperationsWithoutPurchaseOrders+ .map((op) => op.processId)+ .filter(Boolean) as string[]+ )+ );+ const explicitSupplierProcessIds = Array.from(+ new Set(+ outsideOperationsWithoutPurchaseOrders+ .map((op) => op.operationSupplierProcessId)+ .filter(Boolean) as string[]+ ));- const supplierProcesses =- uniqueOutsideProcessIds.length > 0+ const supplierProcessesByProcess =+ outsideProcessIds.length > 0? await carbon.from("supplierProcess")- .select("supplierId")- .in("id", uniqueOutsideProcessIds)- : { data: [] };+ .select("id, supplierId, processId")+ .in("processId", outsideProcessIds)+ : { data: [] as SupplierProcessRef[] };+ const supplierProcessesById =+ explicitSupplierProcessIds.length > 0+ ? await carbon+ .from("supplierProcess")+ .select("id, supplierId, processId")+ .in("id", explicitSupplierProcessIds)+ : { data: [] as SupplierProcessRef[] };++ const supplierProcessById = new Map<string, SupplierProcessRef>();+ for (const sp of [+ ...(supplierProcessesByProcess.data ?? []),+ ...(supplierProcessesById.data ?? [])+ ]) {+ supplierProcessById.set(sp.id, sp);+ }+ const supplierProcessesByProcessId = new Map<+ string,+ SupplierProcessRef[]+ >();+ for (const sp of supplierProcessesByProcess.data ?? []) {+ const list = supplierProcessesByProcessId.get(sp.processId) ?? [];+ list.push(sp);+ supplierProcessesByProcessId.set(sp.processId, list);+ }++ // Resolve each operation's supplier: its own supplier process, the process's+ // sole supplier, or — when the process offers several — a user pick (defaulting+ // to the first candidate). Only a process with NO supplier at all is a genuine+ // "missing supplier". `choicesOverride` carries the picks on a re-run.+ const supplierProcessChoice =+ choicesOverride ?? selectedSupplierProcessByOperationId;+ const resolvedSupplierChoice: Record<string, string> = {};+ const operationChoices: {+ id: string;+ description: string;+ options: { supplierProcessId: string; supplierId: string }[];+ }[] = [];++ const resolveSupplierProcess = (op: {+ id: string;+ description: string | null;+ operationSupplierProcessId: string | null;+ processId: string | null;+ }): SupplierProcessRef | null => {+ if (op.operationSupplierProcessId) {+ return supplierProcessById.get(op.operationSupplierProcessId) ?? null;+ }+ const candidates = op.processId+ ? (supplierProcessesByProcessId.get(op.processId) ?? [])+ : [];+ if (candidates.length === 0) return null;+ if (candidates.length === 1) return candidates[0];+ // Multiple suppliers for the process — the user chooses which one.+ operationChoices.push({+ id: op.id,+ description: op.description ?? op.id,+ options: candidates.map((c) => ({+ supplierProcessId: c.id,+ supplierId: c.supplierId+ }))+ });+ const chosenId =+ supplierProcessChoice[op.id] &&+ candidates.some((c) => c.id === supplierProcessChoice[op.id])+ ? supplierProcessChoice[op.id]+ : candidates[0].id;+ resolvedSupplierChoice[op.id] = chosenId;+ return supplierProcessById.get(chosenId) ?? null;+ };++ const operationsWithSupplier = outsideOperationsWithoutPurchaseOrders.map(+ (op) => ({ op, supplierProcess: resolveSupplierProcess(op) })+ );const uniqueSupplierIds = new Set(- supplierProcesses.data?.map((sp) => sp.supplierId) ?? []+ operationsWithSupplier+ .map((entry) => entry.supplierProcess?.supplierId)+ .filter(Boolean) as string[]);+ setOutsideOperationChoices(operationChoices);+ setSelectedSupplierProcessByOperationId(resolvedSupplierChoice);+if (uniqueSupplierIds.size) {const draftPurchaseOrders = await carbon.from("purchaseOrder")@@ -692,10 +806,10 @@ export function JobStartModal({);}- setSelectedPurchaseOrdersBySupplierId(+ setSelectedPurchaseOrdersBySupplierId((prev) =>Array.from(uniqueSupplierIds).reduce<Record<string, string>>((acc, supplierId) => {- acc[supplierId] = "new";+ acc[supplierId] = prev[supplierId] ?? "new";return acc;},{}@@ -757,14 +871,18 @@ export function JobStartModal({flushSync(() => {setMissingOperationAssemblies(missingAssemblies);- // Only show purchase order UI if there are outside operations that need purchase orders- setHasOutsideOperations(operationsNeedingPurchaseOrders.length > 0);+ // Show the release UI whenever there are outside operations still needing handling,+ // whether or not they have a supplier yet+ setHasOutsideOperations(+ outsideOperationsWithoutPurchaseOrders.length > 0+ );- // Check if all outside operations that need purchase orders have suppliers+ // An outside operation "has a supplier" when it resolves to one — either its+ // own supplier process or its process's sole supplier.setEachOutsideOperationHasASupplier(- operationsNeedingPurchaseOrders.length === 0 ||- operationsNeedingPurchaseOrders.every(- (op) => op.operationSupplierProcessId !== null+ operationsWithSupplier.length === 0 ||+ operationsWithSupplier.every(+ (entry) => entry.supplierProcess !== null));});@@ -838,6 +956,49 @@ export function JobStartModal({</Trans></AlertDescription></Alert>+ {outsideOperationChoices.length > 0 && (+ <div className="flex flex-col gap-2 w-full">+ <p className="text-sm text-muted-foreground">+ <Trans>+ These operations use a process with multiple+ suppliers. Choose a supplier for each.+ </Trans>+ </p>+ {outsideOperationChoices.map((operation) => (+ <div+ key={operation.id}+ className="flex justify-between items-center gap-4 text-sm rounded-lg border p-4 w-full"+ >+ <span className="font-medium">+ {operation.description}+ </span>+ <Select+ size="sm"+ value={+ selectedSupplierProcessByOperationId[+ operation.id+ ] ?? ""+ }+ options={operation.options.map((option) => ({+ value: option.supplierProcessId,+ label:+ suppliers.find(+ (s) => s.id === option.supplierId+ )?.name ?? option.supplierId+ }))}+ onChange={(value) => {+ const next = {+ ...selectedSupplierProcessByOperationId,+ [operation.id]: value as string+ };+ setSelectedSupplierProcessByOperationId(next);+ validate(next);+ }}+ />+ </div>+ ))}+ </div>+ )}{Object.entries(selectedPurchaseOrdersBySupplierId).map(([supplierId, purchaseOrderId]) => {const purchaseOrders =@@ -944,6 +1105,11 @@ export function JobStartModal({name="selectedPurchaseOrdersBySupplierId"value={JSON.stringify(selectedPurchaseOrdersBySupplierId)}/>+ <input+ type="hidden"+ name="selectedSupplierProcessByOperationId"+ value={JSON.stringify(selectedSupplierProcessByOperationId)}+ /><ButtonisLoading={fetcher.state !== "idle" &&diff --git a/apps/erp/app/routes/api+/mcp+/lib/tool-manifest.digest.json b/apps/erp/app/routes/api+/mcp+/lib/tool-manifest.digest.jsonindex f72297facc..6efb14d2cc 100644--- a/apps/erp/app/routes/api+/mcp+/lib/tool-manifest.digest.json+++ b/apps/erp/app/routes/api+/mcp+/lib/tool-manifest.digest.json@@ -586,7 +586,7 @@{"name":"people_getDepartmentsList","classification":"READ","paramCount":0,"schema":"efddc7bd8bbc","response":"ce08332e0ce6","injectAuth":"companyId","permission":"people:view","paginates":false},{"name":"people_getDepartmentsTree","classification":"READ","paramCount":0,"schema":"efddc7bd8bbc","response":"8476e48a3c04","injectAuth":"companyId","permission":"people:view","paginates":false},{"name":"people_getEmployeeDepartments","classification":"READ","paramCount":0,"schema":"efddc7bd8bbc","response":"94b797b98edf","injectAuth":"companyId","permission":"people:view","paginates":false},- {"name":"people_getEmployeeJob","classification":"READ","paramCount":1,"schema":"3d90cb5d0437","response":"34566072edc2","injectAuth":"companyId","permission":"people:view","paginates":false},+ {"name":"people_getEmployeeJob","classification":"READ","paramCount":1,"schema":"3d90cb5d0437","response":"4a3b9b98079b","injectAuth":"companyId","permission":"people:view","paginates":false},{"name":"people_getEmployeeShifts","classification":"READ","paramCount":0,"schema":"efddc7bd8bbc","response":"68279ed68276","injectAuth":"companyId","permission":"people:view","paginates":false},{"name":"people_getEmployeeSummary","classification":"READ","paramCount":1,"schema":"3d90cb5d0437","response":"afd28b3efe9e","injectAuth":"companyId","permission":"people:view","paginates":false},{"name":"people_getHoliday","classification":"READ","paramCount":1,"schema":"9189cc10f756","response":"8d2b62b6a13b","injectAuth":"companyId","permission":"people:view","paginates":false},@@ -606,11 +606,11 @@{"name":"people_getWeeklyHoursForEmployees","classification":"READ","paramCount":1,"schema":"392d5681b870","response":"96915ea19193","injectAuth":"companyId","permission":"people:view","paginates":false},{"name":"people_insertAttribute","classification":"WRITE","paramCount":5,"schema":"a9cc1aa15a69","response":"3797626bd17e","injectAuth":"companyId+createdBy+updatedBy","permission":"people:create","paginates":false},{"name":"people_insertAttributeCategory","classification":"WRITE","paramCount":3,"schema":"0f2b5b298e7f","response":"3797626bd17e","injectAuth":"companyId+createdBy+updatedBy","permission":"people:create","paginates":false},- {"name":"people_insertEmployeeJob","classification":"WRITE","paramCount":2,"schema":"98c5e52f7c8e","response":"34566072edc2","injectAuth":"companyId+createdBy+updatedBy","permission":"people:create","paginates":false},+ {"name":"people_insertEmployeeJob","classification":"WRITE","paramCount":2,"schema":"8518dfd7feec","response":"4a3b9b98079b","injectAuth":"companyId+createdBy+updatedBy","permission":"people:create","paginates":false},{"name":"people_updateAttribute","classification":"WRITE","paramCount":4,"schema":"f66dbb270538","response":"bcde375ebd4c","injectAuth":"companyId+updatedBy","permission":"people:update","paginates":false},{"name":"people_updateAttributeCategory","classification":"WRITE","paramCount":4,"schema":"7bf8c03306de","response":"bcde375ebd4c","injectAuth":"companyId+updatedBy","permission":"people:update","paginates":false},{"name":"people_updateAttributeSortOrder","classification":"WRITE","paramCount":1,"schema":"d19d08f2d129","response":"ce209a810cd2","injectAuth":"companyId+updatedBy","permission":"people:update","paginates":false},- {"name":"people_updateEmployeeJob","classification":"DESTRUCTIVE","paramCount":2,"schema":"8319e6380b4a","response":"bcde375ebd4c","injectAuth":"companyId+updatedBy","permission":"people:update","paginates":false},+ {"name":"people_updateEmployeeJob","classification":"DESTRUCTIVE","paramCount":2,"schema":"fd3a2eef5bc2","response":"bcde375ebd4c","injectAuth":"companyId+updatedBy","permission":"people:update","paginates":false},{"name":"people_updateTimeCardEntry","classification":"WRITE","paramCount":4,"schema":"486c249ce3fa","response":"bcde375ebd4c","injectAuth":"companyId+updatedBy","permission":"people:update","paginates":false},{"name":"people_upsertDepartment","classification":"WRITE","paramCount":4,"schema":"0008ef42654d","response":"10600fcaa49e","injectAuth":"companyId+createdBy+updatedBy","permission":"people:create+update","paginates":false},{"name":"people_upsertHoliday","classification":"WRITE","paramCount":4,"schema":"d8ad23388542","response":"8d2b62b6a13b","injectAuth":"companyId+createdBy+updatedBy","permission":"people:create+update","paginates":false},diff --git a/apps/erp/app/routes/x+/job+/$jobId.status.tsx b/apps/erp/app/routes/x+/job+/$jobId.status.tsxindex 2d11e39d33..9296c8c7b1 100644--- a/apps/erp/app/routes/x+/job+/$jobId.status.tsx+++ b/apps/erp/app/routes/x+/job+/$jobId.status.tsx@@ -36,6 +36,9 @@ export async function action({ request, params }: ActionFunctionArgs) {const selectedPurchaseOrdersBySupplierId = formData.get("selectedPurchaseOrdersBySupplierId") as string | null;+ const selectedSupplierProcessByOperationId = formData.get(+ "selectedSupplierProcessByOperationId"+ ) as string | null;if (!status || !jobStatus.includes(status)) {throw redirect(@@ -138,6 +141,92 @@ export async function action({ request, params }: ActionFunctionArgs) {);const serviceRole = getCarbonServiceRole();++ // Persist any supplier the user chose in the release modal for an outside+ // operation whose process has multiple suppliers. Stamping it on the+ // operation lets purchaseOrderFromJob resolve it (below) and keeps the+ // choice on the operation. Must complete BEFORE the edge function reads.+ const operationSupplierChoices = Object.entries(+ JSON.parse(selectedSupplierProcessByOperationId ?? "{}") as Record<+ string,+ string+ >+ );+ if (operationSupplierChoices.length > 0) {+ // Both ids come from the form and drive a service-role (RLS-bypassing)+ // write that purchaseOrderFromJob later consumes, so validate them before+ // persisting: the operation must belong to THIS job, and the chosen+ // supplier process must belong to that operation's own process. Otherwise+ // a crafted submit could retarget another job or create a PO for an+ // unrelated supplier.+ const operationIds = operationSupplierChoices.map(+ ([operationId]) => operationId+ );+ const supplierProcessIds = operationSupplierChoices.map(([, sp]) => sp);++ const [+ { data: jobOperations, error: jobOperationsError },+ { data: supplierProcesses, error: supplierProcessesError }+ ] = await Promise.all([+ serviceRole+ .from("jobOperation")+ .select("id, processId")+ .eq("jobId", id)+ .eq("companyId", companyId)+ .in("id", operationIds),+ serviceRole+ .from("supplierProcess")+ .select("id, processId")+ .eq("companyId", companyId)+ .in("id", supplierProcessIds)+ ]);+ if (jobOperationsError) throw new Error(jobOperationsError.message);+ if (supplierProcessesError)+ throw new Error(supplierProcessesError.message);++ const operationProcessById = new Map(+ (jobOperations ?? []).map((op) => [op.id, op.processId])+ );+ const supplierProcessProcessById = new Map(+ (supplierProcesses ?? []).map((sp) => [sp.id, sp.processId])+ );++ for (const [+ operationId,+ supplierProcessId+ ] of operationSupplierChoices) {+ const operationProcessId = operationProcessById.get(operationId);+ if (!operationProcessId) {+ throw new Error(+ `Operation ${operationId} does not belong to this job`+ );+ }+ if (+ supplierProcessProcessById.get(supplierProcessId) !==+ operationProcessId+ ) {+ throw new Error(+ "Selected supplier does not belong to the operation's process"+ );+ }+ }++ const updateResults = await Promise.all(+ operationSupplierChoices.map(([operationId, supplierProcessId]) =>+ serviceRole+ .from("jobOperation")+ .update({+ operationSupplierProcessId: supplierProcessId,+ updatedBy: userId+ })+ .eq("id", operationId)+ .eq("companyId", companyId)+ )+ );+ const failedUpdate = updateResults.find((result) => result.error);+ if (failedUpdate?.error) throw new Error(failedUpdate.error.message);+ }+// Forecast-first scheduling regenerates the whole location the job is in.const { data: jobLocation } = await serviceRole.from("job")diff --git a/packages/database/src/swagger-docs-schema.ts b/packages/database/src/swagger-docs-schema.tsindex cb9198c9a1..0fbde61e5b 100644--- a/packages/database/src/swagger-docs-schema.ts+++ b/packages/database/src/swagger-docs-schema.ts@@ -90858,6 +90858,9 @@ export default {{$ref: "#/parameters/rowFilter.companySettings.returnPickedMaterialTiming"},+ {+ $ref: "#/parameters/rowFilter.companySettings.salesRuleNotificationGroup"+ },{$ref: "#/parameters/rowFilter.companySettings.showCurrencyTrailingZeros"},@@ -90867,9 +90870,6 @@ export default {{$ref: "#/parameters/rowFilter.companySettings.allowLowercaseItemIds"},- {- $ref: "#/parameters/rowFilter.companySettings.salesRuleNotificationGroup"- },{$ref: "#/parameters/select"},@@ -91064,6 +91064,9 @@ export default {{$ref: "#/parameters/rowFilter.companySettings.returnPickedMaterialTiming"},+ {+ $ref: "#/parameters/rowFilter.companySettings.salesRuleNotificationGroup"+ },{$ref: "#/parameters/rowFilter.companySettings.showCurrencyTrailingZeros"},@@ -91073,9 +91076,6 @@ export default {{$ref: "#/parameters/rowFilter.companySettings.allowLowercaseItemIds"},- {- $ref: "#/parameters/rowFilter.companySettings.salesRuleNotificationGroup"- },{$ref: "#/parameters/preferReturn"}@@ -91224,6 +91224,9 @@ export default {{$ref: "#/parameters/rowFilter.companySettings.returnPickedMaterialTiming"},+ {+ $ref: "#/parameters/rowFilter.companySettings.salesRuleNotificationGroup"+ },{$ref: "#/parameters/rowFilter.companySettings.showCurrencyTrailingZeros"},@@ -91233,9 +91236,6 @@ export default {{$ref: "#/parameters/rowFilter.companySettings.allowLowercaseItemIds"},- {- $ref: "#/parameters/rowFilter.companySettings.salesRuleNotificationGroup"- },{$ref: "#/parameters/body.companySettings"},@@ -137186,7 +137186,7 @@ export default {type: "object"},employeeJob: {- required: ["id", "companyId"],+ required: ["id", "locationId", "companyId"],properties: {id: {description:@@ -147900,10 +147900,10 @@ export default {"incompletePickingListPolicy","includeMaterialsOnTraveler","returnPickedMaterialTiming",+ "salesRuleNotificationGroup","showCurrencyTrailingZeros","requireMfa",- "allowLowercaseItemIds",- "salesRuleNotificationGroup"+ "allowLowercaseItemIds"],properties: {id: {@@ -148150,6 +148150,13 @@ export default {format: "text",type: "string"},+ salesRuleNotificationGroup: {+ format: "text[]",+ items: {+ type: "string"+ },+ type: "array"+ },showCurrencyTrailingZeros: {default: true,format: "boolean",@@ -148164,13 +148171,6 @@ export default {default: false,format: "boolean",type: "boolean"- },- salesRuleNotificationGroup: {- format: "text[]",- items: {- type: "string"- },- type: "array"}},type: "object"@@ -197227,6 +197227,12 @@ export default {in: "query",type: "string"},+ "rowFilter.companySettings.salesRuleNotificationGroup": {+ name: "salesRuleNotificationGroup",+ required: false,+ in: "query",+ type: "string"+ },"rowFilter.companySettings.showCurrencyTrailingZeros": {name: "showCurrencyTrailingZeros",required: false,@@ -197245,12 +197251,6 @@ export default {in: "query",type: "string"},- "rowFilter.companySettings.salesRuleNotificationGroup": {- name: "salesRuleNotificationGroup",- required: false,- in: "query",- type: "string"- },"body.part": {name: "part",description: "part",diff --git a/packages/database/src/types.ts b/packages/database/src/types.tsindex d953c9b157..a9d646130c 100644--- a/packages/database/src/types.ts+++ b/packages/database/src/types.ts@@ -13655,7 +13655,7 @@ export type Database = {customFields: Json | nulldepartmentId: string | nullid: string- locationId: string | null+ locationId: stringmanagerId: string | nullshiftId: string | nullstartDate: string | null@@ -13669,7 +13669,7 @@ export type Database = {customFields?: Json | nulldepartmentId?: string | nullid: string- locationId?: string | null+ locationId: stringmanagerId?: string | nullshiftId?: string | nullstartDate?: string | null@@ -13683,7 +13683,7 @@ export type Database = {customFields?: Json | nulldepartmentId?: string | nullid?: string- locationId?: string | null+ locationId?: stringmanagerId?: string | nullshiftId?: string | nullstartDate?: string | nulldiff --git a/packages/database/supabase/functions/create/index.ts b/packages/database/supabase/functions/create/index.tsindex 2cbc74290c..6dfc165e40 100644--- a/packages/database/supabase/functions/create/index.ts+++ b/packages/database/supabase/functions/create/index.ts@@ -464,24 +464,73 @@ serve(async (req: Request) => {.map((d) => d.operationSupplierProcessId).filter(Boolean));- const [supplierProcesses, existingPurchaseOrderLines] =- await Promise.all([- client- .from("supplierProcess")- .select("*")- .in("id", Array.from(supplierProcessIds)),- client- .from("purchaseOrderLine")- .select("*")- .eq("jobId", jobId)- .eq(- "jobOperationId",- outsideOperations.map((d) => d.id)- ),- ]);+ const outsideProcessIds = new Set(+ outsideOperations.map((d) => d.processId).filter(Boolean)+ );+ const [+ supplierProcesses,+ supplierProcessesByProcess,+ existingPurchaseOrderLines,+ ] = await Promise.all([+ supplierProcessIds.size > 0+ ? client+ .from("supplierProcess")+ .select("*")+ .in("id", Array.from(supplierProcessIds))+ : Promise.resolve({ data: [], error: null }),+ outsideProcessIds.size > 0+ ? client+ .from("supplierProcess")+ .select("*")+ .in("processId", Array.from(outsideProcessIds))+ : Promise.resolve({ data: [], error: null }),+ client+ .from("purchaseOrderLine")+ .select("*")+ .eq("jobId", jobId)+ .eq(+ "jobOperationId",+ outsideOperations.map((d) => d.id)+ ),+ ]);if (supplierProcesses.error)throw new Error(supplierProcesses.error.message);+ if (supplierProcessesByProcess.error)+ throw new Error(supplierProcessesByProcess.error.message);++ // Resolve an operation's supplier process: its own, or — when it has none+ // — the sole supplier configured for its process (a process with exactly+ // one supplier is unambiguous). Mirrors the release modal's resolution so+ // an operation the modal counted as "has a supplier" actually gets a PO.+ const allSupplierProcesses = [+ ...(supplierProcesses.data ?? []),+ ...(supplierProcessesByProcess.data ?? []),+ ];+ const supplierProcessById = new Map(+ allSupplierProcesses.map((sp) => [sp.id, sp])+ );+ const supplierProcessesByProcessId = new Map<+ string,+ typeof allSupplierProcesses+ >();+ for (const sp of supplierProcessesByProcess.data ?? []) {+ const list = supplierProcessesByProcessId.get(sp.processId) ?? [];+ list.push(sp);+ supplierProcessesByProcessId.set(sp.processId, list);+ }+ const resolveSupplierProcess = (oo: {+ operationSupplierProcessId: string | null;+ processId: string | null;+ }) => {+ if (oo.operationSupplierProcessId) {+ return supplierProcessById.get(oo.operationSupplierProcessId);+ }+ const candidates = oo.processId+ ? supplierProcessesByProcessId.get(oo.processId) ?? []+ : [];+ return candidates.length === 1 ? candidates[0] : undefined;+ };const outsideOperationsBySupplierId = outsideOperations.reduce<Record<@@ -491,9 +540,7 @@ serve(async (req: Request) => {})[]>>((acc, oo) => {- const supplierProcess = supplierProcesses.data?.find(- (d) => d.id === oo.operationSupplierProcessId- );+ const supplierProcess = resolveSupplierProcess(oo);if (existingPurchaseOrderLines.data?.find((d) => d.jobOperationId === oo.id@@ -698,9 +745,7 @@ serve(async (req: Request) => {const item = items.data?.find((d) => d.id === operation.jobMakeMethod?.itemId);- const supplierProcess = supplierProcesses.data?.find(- (d) => d.id === operation.operationSupplierProcessId- );+ const supplierProcess = resolveSupplierProcess(operation);if (item && supplierProcess) {const totalCostWithUnitPrice =diff --git a/packages/database/supabase/functions/lib/types.ts b/packages/database/supabase/functions/lib/types.tsindex d953c9b157..a9d646130c 100644--- a/packages/database/supabase/functions/lib/types.ts+++ b/packages/database/supabase/functions/lib/types.ts@@ -13655,7 +13655,7 @@ export type Database = {customFields: Json | nulldepartmentId: string | nullid: string- locationId: string | null+ locationId: stringmanagerId: string | nullshiftId: string | nullstartDate: string | null@@ -13669,7 +13669,7 @@ export type Database = {customFields?: Json | nulldepartmentId?: string | nullid: string- locationId?: string | null+ locationId: stringmanagerId?: string | nullshiftId?: string | nullstartDate?: string | null@@ -13683,7 +13683,7 @@ export type Database = {customFields?: Json | nulldepartmentId?: string | nullid?: string- locationId?: string | null+ locationId?: stringmanagerId?: string | nullshiftId?: string | nullstartDate?: string | nulldiff --git a/packages/database/supabase/migrations/20260918074635_employee-job-location-not-null.sql b/packages/database/supabase/migrations/20260918074635_employee-job-location-not-null.sqlnew file mode 100644index 0000000000..c067166f2a--- /dev/null+++ b/packages/database/supabase/migrations/20260918074635_employee-job-location-not-null.sql@@ -0,0 +1,36 @@+-- employeeJob.locationId was nullable with no default, so callers that omitted it+-- (notably the auto-generated people_insertEmployeeJob / people_updateEmployeeJob+-- API/MCP tools, where locationId is optional) could write or overwrite NULL.+-- Backfill existing NULLs to the company's first-created location, then enforce+-- NOT NULL so a location can no longer go missing.++UPDATE "employeeJob" AS ej+SET "locationId" = first_location."id"+FROM (+ SELECT DISTINCT ON ("companyId") "companyId", "id"+ FROM "location"+ ORDER BY "companyId", "createdAt" ASC, "id" ASC+) AS first_location+WHERE ej."locationId" IS NULL+ AND ej."companyId" = first_location."companyId";++-- Any row still NULL belongs to a company with no location at all. Every company+-- is created with one, but all of them can be deleted (there is no last-location+-- guard), so there is nothing to backfill from. Fail with an actionable message+-- naming the companies rather than a bare NOT NULL violation — the fix is to give+-- each company a location (or remove the orphaned employeeJob rows) and re-run.+DO $$+DECLARE+ orphan_companies text;+BEGIN+ SELECT string_agg(DISTINCT "companyId", ', ')+ INTO orphan_companies+ FROM "employeeJob"+ WHERE "locationId" IS NULL;++ IF orphan_companies IS NOT NULL THEN+ RAISE EXCEPTION 'Cannot set employeeJob.locationId NOT NULL: companies with employeeJob rows but no location: %', orphan_companies;+ END IF;+END $$;++ALTER TABLE "employeeJob" ALTER COLUMN "locationId" SET NOT NULL;diff --git a/packages/locale/locales/de/erp.po b/packages/locale/locales/de/erp.poindex 0741919fad..778354aa9e 100644--- a/packages/locale/locales/de/erp.po+++ b/packages/locale/locales/de/erp.po@@ -17698,6 +17698,9 @@ msgstr "Diese Fertigungsaufträge haben diesem Arbeitsplatz zugewiesene Arbeitsgmsgid "These journal entries are still Draft, so their debits and credits aren't in the ledger for this period. Post each one, or re-date it into a later open period."msgstr "Diese Buchungssätze sind noch Entwurf, sodass ihre Sollposten und Habenposten nicht im Sachkonto für diesen Zeitraum enthalten sind. Buchen Sie jeden einzelnen oder ändern Sie das Datum zu einem späteren offenen Zeitraum."+msgid "These operations use a process with multiple suppliers. Choose a supplier for each."+msgstr "Diese Arbeitsgänge nutzen ein Verfahren mit mehreren Lieferanten. Wählen Sie für jeden einen Lieferanten."+msgid "These parts are being replaced by this one. Each rule is set on the old part; open it to change the rule."msgstr "Diese Teile werden durch dieses Teil ersetzt. Jede Regel ist auf dem alten Teil konfiguriert; öffnen Sie es, um die Regel zu ändern."diff --git a/packages/locale/locales/en/erp.po b/packages/locale/locales/en/erp.poindex bd44a5328d..9007e5f2a9 100644--- a/packages/locale/locales/en/erp.po+++ b/packages/locale/locales/en/erp.po@@ -17698,6 +17698,9 @@ msgstr "These jobs have operations assigned to this work center:"msgid "These journal entries are still Draft, so their debits and credits aren't in the ledger for this period. Post each one, or re-date it into a later open period."msgstr "These journal entries are still Draft, so their debits and credits aren't in the ledger for this period. Post each one, or re-date it into a later open period."+msgid "These operations use a process with multiple suppliers. Choose a supplier for each."+msgstr "These operations use a process with multiple suppliers. Choose a supplier for each."+msgid "These parts are being replaced by this one. Each rule is set on the old part; open it to change the rule."msgstr "These parts are being replaced by this one. Each rule is set on the old part; open it to change the rule."diff --git a/packages/locale/locales/es/erp.po b/packages/locale/locales/es/erp.poindex 2b23200868..96e6f67186 100644--- a/packages/locale/locales/es/erp.po+++ b/packages/locale/locales/es/erp.po@@ -17698,6 +17698,9 @@ msgstr "Estas órdenes de trabajo tienen operaciones asignadas a este centro demsgid "These journal entries are still Draft, so their debits and credits aren't in the ledger for this period. Post each one, or re-date it into a later open period."msgstr "Estos asientos aún están en Borrador, por lo que sus debe y haber no están en el libro mayor para este período. Contabiliza cada uno, o cambia su fecha a un período abierto posterior."+msgid "These operations use a process with multiple suppliers. Choose a supplier for each."+msgstr "Estas operaciones utilizan un proceso con múltiples proveedores. Elija un proveedor para cada una."+msgid "These parts are being replaced by this one. Each rule is set on the old part; open it to change the rule."msgstr "Estas piezas están siendo reemplazadas por ésta. Cada regla se establece en la pieza anterior; ábrela para cambiar la regla."diff --git a/packages/locale/locales/fr/erp.po b/packages/locale/locales/fr/erp.poindex 2fbbb37421..c76ff0ef7a 100644--- a/packages/locale/locales/fr/erp.po+++ b/packages/locale/locales/fr/erp.po@@ -17698,6 +17698,9 @@ msgstr "Ces ordres de fabrication ont des opérations assignées à ce poste demsgid "These journal entries are still Draft, so their debits and credits aren't in the ledger for this period. Post each one, or re-date it into a later open period."msgstr "Ces écritures de journal sont encore Brouillon, de sorte que leurs débits et crédits ne se trouvent pas dans le grand livre pour cette période. Comptabilisez chacune ou redatez-la à une période ouverte ultérieure."+msgid "These operations use a process with multiple suppliers. Choose a supplier for each."+msgstr "Ces opérations utilisent un procédé avec plusieurs fournisseurs. Choisissez un fournisseur pour chacune."+msgid "These parts are being replaced by this one. Each rule is set on the old part; open it to change the rule."msgstr "Ces pièces sont remplacées par celle-ci. Chaque règle est définie sur l'ancienne pièce ; ouvrez-la pour modifier la règle."diff --git a/packages/locale/locales/hi/erp.po b/packages/locale/locales/hi/erp.poindex 58ff8acc9b..863509a3d3 100644--- a/packages/locale/locales/hi/erp.po+++ b/packages/locale/locales/hi/erp.po@@ -17698,6 +17698,9 @@ msgstr "ये जॉब इस वर्क सेंटर को असाइmsgid "These journal entries are still Draft, so their debits and credits aren't in the ledger for this period. Post each one, or re-date it into a later open period."msgstr "ये जर्नल प्रविष्टियां अभी भी ड्राफ्ट हैं, इसलिए उनके नामे और जमा इस अवधि के लिए खाता बही में नहीं हैं। प्रत्येक को पोस्ट करें, या इसे बाद की खुली अवधि में फिर से दिनांकित करें।"+msgid "These operations use a process with multiple suppliers. Choose a supplier for each."+msgstr "ये ऑपरेशन कई आपूर्तिकर्ताओं के साथ एक प्रक्रिया का उपयोग करते हैं। प्रत्येक के लिए एक आपूर्तिकर्ता चुनें।"+msgid "These parts are being replaced by this one. Each rule is set on the old part; open it to change the rule."msgstr "ये पार्ट्स इसके द्वारा प्रतिस्थापित किए जा रहे हैं। प्रत्येक नियम पुराने पार्ट पर सेट है; नियम बदलने के लिए इसे खोलें।"diff --git a/packages/locale/locales/it/erp.po b/packages/locale/locales/it/erp.poindex 7c40b8fceb..4f0a17d03b 100644--- a/packages/locale/locales/it/erp.po+++ b/packages/locale/locales/it/erp.po@@ -17698,6 +17698,9 @@ msgstr "Questi ordini di produzione hanno operazioni assegnate a questo centro dmsgid "These journal entries are still Draft, so their debits and credits aren't in the ledger for this period. Post each one, or re-date it into a later open period."msgstr "Queste voci di prima nota sono ancora Bozza, quindi i loro dare e avere non sono nel registro per questo periodo. Registra ognuno, o ri-datalo in un periodo aperto successivo."+msgid "These operations use a process with multiple suppliers. Choose a supplier for each."+msgstr "Queste operazioni utilizzano un processo con più fornitori. Scegli un fornitore per ciascuna operazione."+msgid "These parts are being replaced by this one. Each rule is set on the old part; open it to change the rule."msgstr "Questi componenti sono sostituiti da questo. Ogni regola è impostata sul vecchio componente; aprilo per modificare la regola."diff --git a/packages/locale/locales/ja/erp.po b/packages/locale/locales/ja/erp.poindex d97a6640f1..37fafcc073 100644--- a/packages/locale/locales/ja/erp.po+++ b/packages/locale/locales/ja/erp.po@@ -17698,6 +17698,9 @@ msgstr "これらの製造指図には、この作業区に割り当てられたmsgid "These journal entries are still Draft, so their debits and credits aren't in the ledger for this period. Post each one, or re-date it into a later open period."msgstr "これらの仕訳はまだ下書きであるため、それらの借方と貸方は当期の元帳に含まれていません。各仕訳を転記するか、後の開いている期間に再度日付を付け直してください。"+msgid "These operations use a process with multiple suppliers. Choose a supplier for each."+msgstr "これらの工程は複数の仕入先に対応可能な工法を使用しています。各工程について仕入先を選択してください。"+msgid "These parts are being replaced by this one. Each rule is set on the old part; open it to change the rule."msgstr "これらの部品はこの部品で置き換わっています。各ルールは旧部品に設定されています;ルールを変更するには旧部品を開いてください。"diff --git a/packages/locale/locales/ko/erp.po b/packages/locale/locales/ko/erp.poindex f6ef35c983..ad65569079 100644--- a/packages/locale/locales/ko/erp.po+++ b/packages/locale/locales/ko/erp.po@@ -17698,6 +17698,9 @@ msgstr "이 작업장에 할당된 공정이 있는 작업 지시:"msgid "These journal entries are still Draft, so their debits and credits aren't in the ledger for this period. Post each one, or re-date it into a later open period."msgstr "이 전표들은 아직 초안 상태이므로 이 기간에 차변 및 대변이 원장에 없습니다. 각 전표를 전기하거나 이후 미결 기간으로 다시 날짜를 지정하십시오."+msgid "These operations use a process with multiple suppliers. Choose a supplier for each."+msgstr "이 공정들은 여러 공급업체에서 처리 가능합니다. 각 공정마다 공급업체를 선택하세요."+msgid "These parts are being replaced by this one. Each rule is set on the old part; open it to change the rule."msgstr "이 부품들이 이 부품으로 대체됩니다. 각 규칙은 기존 부품에 설정되어 있으니 규칙을 변경하려면 해당 부품을 열어주세요."diff --git a/packages/locale/locales/pl/erp.po b/packages/locale/locales/pl/erp.poindex 1f3c6bcd4e..cd708f8bc6 100644--- a/packages/locale/locales/pl/erp.po+++ b/packages/locale/locales/pl/erp.po@@ -17698,6 +17698,9 @@ msgstr "Te zlecenia produkcyjne mają operacje przypisane do tego stanowiska robmsgid "These journal entries are still Draft, so their debits and credits aren't in the ledger for this period. Post each one, or re-date it into a later open period."msgstr "Te dowody księgowe są wciąż w wersji roboczej, dlatego ich wpisy Winien i Ma nie znajdują się w księdze dla tego okresu. Zaksięguj każdy z nich lub przesyć go do późniejszego otwartego okresu."+msgid "These operations use a process with multiple suppliers. Choose a supplier for each."+msgstr "Te operacje korzystają z procesu z wieloma dostawcami. Wybierz dostawcę dla każdej."+msgid "These parts are being replaced by this one. Each rule is set on the old part; open it to change the rule."msgstr "Te części są zastępowane przez ten artykuł. Każda reguła jest ustawiona na starej części; otwórz ją, aby zmienić regułę."diff --git a/packages/locale/locales/pt/erp.po b/packages/locale/locales/pt/erp.poindex 4831cd496a..d178c38c2a 100644--- a/packages/locale/locales/pt/erp.po+++ b/packages/locale/locales/pt/erp.po@@ -17698,6 +17698,9 @@ msgstr "Estas ordens de produção têm operações atribuídas a este centro demsgid "These journal entries are still Draft, so their debits and credits aren't in the ledger for this period. Post each one, or re-date it into a later open period."msgstr "Estes lançamentos de diário ainda estão em Rascunho, portanto seus débitos e créditos não estão no livro-razão para este período. Lance cada um, ou redatē-o para um período aberto posterior."+msgid "These operations use a process with multiple suppliers. Choose a supplier for each."+msgstr "Essas operações usam um processo com múltiplos fornecedores. Selecione um fornecedor para cada uma."+msgid "These parts are being replaced by this one. Each rule is set on the old part; open it to change the rule."msgstr "Essas peças estão sendo substituídas por esta. Cada regra é definida na peça antiga; abra-a para alterar a regra."diff --git a/packages/locale/locales/ru/erp.po b/packages/locale/locales/ru/erp.poindex 1b99dd4a90..f199767ff6 100644--- a/packages/locale/locales/ru/erp.po+++ b/packages/locale/locales/ru/erp.po@@ -17698,6 +17698,9 @@ msgstr "Эти производственные заказы имеют оперmsgid "These journal entries are still Draft, so their debits and credits aren't in the ledger for this period. Post each one, or re-date it into a later open period."msgstr "Эти операции по-прежнему находятся в режиме Черновик, поэтому их дебеты и кредиты не включены в главную книгу для этого периода. Проведите каждый из них или переведите его в более поздний открытый период."+msgid "These operations use a process with multiple suppliers. Choose a supplier for each."+msgstr "Эти операции выполняются по процессу с несколькими поставщиками. Выберите поставщика для каждой операции."+msgid "These parts are being replaced by this one. Each rule is set on the old part; open it to change the rule."msgstr "Эти детали заменяются на эту. Каждое правило установлено на старой детали; откройте ее, чтобы изменить правило."diff --git a/packages/locale/locales/tr/erp.po b/packages/locale/locales/tr/erp.poindex a299986054..c12af95503 100644--- a/packages/locale/locales/tr/erp.po+++ b/packages/locale/locales/tr/erp.po@@ -17698,6 +17698,9 @@ msgstr "Bu iş emirlerinin bu iş merkezine atanmış operasyonları vardır:"msgid "These journal entries are still Draft, so their debits and credits aren't in the ledger for this period. Post each one, or re-date it into a later open period."msgstr "Bu Muhasebe fişi girişleri hala Taslak durumundadır, bu nedenle Borçları ve Alacakları bu dönem için defteri kebire dahil edilmemiştir. Her birini Muhasebeleştirin veya daha sonraki bir Açık döneme yeniden tarihleyin."+msgid "These operations use a process with multiple suppliers. Choose a supplier for each."+msgstr "Bu operasyonlar birden fazla tedarikçili bir proses kullanır. Her biri için bir tedarikçi seçin."+msgid "These parts are being replaced by this one. Each rule is set on the old part; open it to change the rule."msgstr "Bu parçalar bu birim tarafından değiştiriliyor. Her kural eski parçaya ayarlanmış; kuralı değiştirmek için açın."diff --git a/packages/locale/locales/zh/erp.po b/packages/locale/locales/zh/erp.poindex 6ca30982d2..3c02b7bd84 100644--- a/packages/locale/locales/zh/erp.po+++ b/packages/locale/locales/zh/erp.po@@ -17698,6 +17698,9 @@ msgstr "这些工单在此工作中心分配了工序:"msgid "These journal entries are still Draft, so their debits and credits aren't in the ledger for this period. Post each one, or re-date it into a later open period."msgstr "这些凭证仍是草稿,所以其借方和贷方不在此期间的账簿中。过账每一个,或将其重新标注日期到更后的未结期间。"+msgid "These operations use a process with multiple suppliers. Choose a supplier for each."+msgstr "这些工序使用的工艺支持多个供应商。请为每个工序选择一个供应商。"+msgid "These parts are being replaced by this one. Each rule is set on the old part; open it to change the rule."msgstr "这些零件被此零件替代。每个规则都在旧零件上设置;打开它来更改规则。"