Skip to content

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.

Support inbound inspection for non-serial tracked items (#906)

Brad Barbineb0e2446d3a3
diff --git a/apps/erp/app/modules/inventory/inventory.models.ts b/apps/erp/app/modules/inventory/inventory.models.ts
index 7408c72a50..ce5a14cd9e 100644
--- a/apps/erp/app/modules/inventory/inventory.models.ts
+++ b/apps/erp/app/modules/inventory/inventory.models.ts
@@ -269,6 +269,56 @@ export function isWarehouseTransferLocked(
return status !== null && status !== undefined && status !== "Draft";
}
+export type ReceiptSerialEntity = {
+ id: string;
+ index: number | undefined;
+ hasSerial: boolean;
+ createdAt?: string | null;
+};
+
+/**
+ * Posting a serial-tracked receipt line consumes exactly one serial per index
+ * in [0, receivedQuantity). Reducing the received quantity (orphaned indices
+ * >= received) or editing a serial value (a duplicate at the same index) leaves
+ * stale tracked entities behind. This is the single source of truth for both
+ * sides of that invariant, so the post-time validation and the pre-post cleanup
+ * can never disagree on which serials count:
+ * - `missingIndexes` — required indices with no serial yet (post validation)
+ * - `surplusEntityIds` — orphan/duplicate entities to delete before posting,
+ * keeping the earliest-created entity for each in-range index.
+ */
+export function reconcileReceiptLineSerials(
+ entities: ReceiptSerialEntity[],
+ receivedQuantity: number
+): { missingIndexes: number[]; surplusEntityIds: string[] } {
+ const received = Math.max(0, receivedQuantity);
+
+ const serializedIndexes = new Set(
+ entities.filter((e) => e.hasSerial).map((e) => e.index)
+ );
+ const missingIndexes = Array.from(
+ { length: received },
+ (_, index) => index
+ ).filter((index) => !serializedIndexes.has(index));
+
+ const keptIndexes = new Set<number>();
+ const surplusEntityIds: string[] = [];
+ const ordered = [...entities].sort((a, b) =>
+ (a.createdAt ?? "").localeCompare(b.createdAt ?? "")
+ );
+ for (const entity of ordered) {
+ const index = entity.index;
+ const inRange = typeof index === "number" && index >= 0 && index < received;
+ if (inRange && !keptIndexes.has(index)) {
+ keptIndexes.add(index);
+ } else {
+ surplusEntityIds.push(entity.id);
+ }
+ }
+
+ return { missingIndexes, surplusEntityIds };
+}
+
export const warehouseTransferValidator = z
.object({
id: zfd.text(z.string().optional()),
diff --git a/apps/erp/app/modules/inventory/inventory.service.ts b/apps/erp/app/modules/inventory/inventory.service.ts
index fd96f57e3b..0ca317d139 100644
--- a/apps/erp/app/modules/inventory/inventory.service.ts
+++ b/apps/erp/app/modules/inventory/inventory.service.ts
@@ -1,5 +1,6 @@
import type { Database, Json } from "@carbon/database";
import { fetchAllFromTable } from "@carbon/database";
+import type { TrackedEntityAttributes } from "@carbon/utils";
import { getLocalTimeZone, now, today } from "@internationalized/date";
import type { PostgrestError, SupabaseClient } from "@supabase/supabase-js";
import { nanoid } from "nanoid";
@@ -26,7 +27,10 @@ import type {
storageUnitValidator,
warehouseTransferValidator
} from "./inventory.models";
-import { isPickingListLocked } from "./inventory.models";
+import {
+ isPickingListLocked,
+ reconcileReceiptLineSerials
+} from "./inventory.models";
export async function deleteBatchProperty(
client: SupabaseClient<Database>,
@@ -471,6 +475,65 @@ export async function getReceiptLineTracking(
.eq("companyId", companyId);
}
+/**
+ * Deletes stale serial tracked entities for a receipt's serial-tracked lines
+ * before posting. Post-receipt flips one serial per index in
+ * [0, receivedQuantity) to Available; orphaned (reduced quantity) or duplicate
+ * (edited serial) entities would otherwise become phantom Available serials.
+ * The keep/delete decision is owned by `reconcileReceiptLineSerials` so it
+ * stays in lockstep with the post-time validation in ReceiptPostModal.
+ */
+export async function reconcileReceiptSerialEntities(
+ client: SupabaseClient<Database>,
+ args: {
+ receiptId: string;
+ companyId: string;
+ lines: {
+ id: string;
+ receivedQuantity: number | null;
+ requiresSerialTracking?: boolean | null;
+ }[];
+ }
+) {
+ const serialLines = args.lines.filter((line) => line.requiresSerialTracking);
+ if (serialLines.length === 0) return;
+
+ const { data: serialEntities } = await client
+ .from("trackedEntity")
+ .select("id, attributes, createdAt, readableId")
+ .eq("attributes ->> Receipt", args.receiptId)
+ .eq("companyId", args.companyId);
+
+ const idsToDelete = serialLines.flatMap((line) => {
+ const entities = (serialEntities ?? [])
+ .filter(
+ (e) =>
+ (e.attributes as TrackedEntityAttributes)?.["Receipt Line"] ===
+ line.id
+ )
+ .map((e) => ({
+ id: e.id,
+ index: (e.attributes as TrackedEntityAttributes)?.[
+ "Receipt Line Index"
+ ],
+ hasSerial: !!e.readableId,
+ createdAt: e.createdAt
+ }));
+ return reconcileReceiptLineSerials(
+ entities,
+ Number(line.receivedQuantity ?? 0)
+ ).surplusEntityIds;
+ });
+
+ if (idsToDelete.length > 0) {
+ await client
+ .from("trackedEntity")
+ .delete()
+ .in("id", idsToDelete)
+ .eq("companyId", args.companyId);
+ }
+}
+
export async function getReceiptFiles(
client: SupabaseClient<Database>,
companyId: string,
diff --git a/apps/erp/app/modules/inventory/ui/Receipts/ReceiptPostModal.tsx b/apps/erp/app/modules/inventory/ui/Receipts/ReceiptPostModal.tsx
index be75684cdb..89496cf6d2 100644
--- a/apps/erp/app/modules/inventory/ui/Receipts/ReceiptPostModal.tsx
+++ b/apps/erp/app/modules/inventory/ui/Receipts/ReceiptPostModal.tsx
@@ -26,6 +26,7 @@ import { useNavigation, useParams } from "react-router";
import { useUser } from "~/hooks";
import { useItems } from "~/stores";
import { path } from "~/utils/path";
+import { reconcileReceiptLineSerials } from "../../inventory.models";
import { getReceiptTracking } from "../../inventory.service";
import type { ReceiptLine } from "../../types";
@@ -112,21 +113,35 @@ const ReceiptPostModal = ({ onClose }: { onClose: () => void }) => {
}
if (line.requiresSerialTracking) {
- if (line.receivedQuantity === 0) return;
- const trackedEntities = receiptLineTracking.data?.filter((tracking) => {
- const attributes = tracking.attributes as TrackedEntityAttributes;
- return attributes["Receipt Line"] === line.id;
- });
-
- const quantityWithSerial = trackedEntities?.reduce((acc, tracking) => {
- const serialNumber = tracking.readableId;
- return acc + (serialNumber ? 1 : 0);
- }, 0);
-
- if (quantityWithSerial !== line.receivedQuantity) {
+ const receivedQuantity = line.receivedQuantity ?? 0;
+ if (receivedQuantity === 0) return;
+
+ // post-receipt consumes one serial per index in [0, receivedQuantity);
+ // extra or duplicate entities are ignored at post time. Validate that
+ // every required index has a serial via the same reconciliation the
+ // post route uses, rather than comparing a raw count.
+ const entities = (receiptLineTracking.data ?? [])
+ .filter((tracking) => {
+ const attributes = tracking.attributes as TrackedEntityAttributes;
+ return attributes["Receipt Line"] === line.id;
+ })
+ .map((tracking) => ({
+ id: tracking.id,
+ index: (tracking.attributes as TrackedEntityAttributes)[
+ "Receipt Line Index"
+ ],
+ hasSerial: !!tracking.readableId
+ }));
+
+ const { missingIndexes } = reconcileReceiptLineSerials(
+ entities,
+ receivedQuantity
+ );
+
+ if (missingIndexes.length > 0) {
errors.push({
itemReadableId: getItemReadableId(items, line.itemId) ?? null,
- receivedQuantity: line.receivedQuantity ?? 0,
+ receivedQuantity,
receivedQuantityError: "Serial numbers are missing"
});
}
diff --git a/apps/erp/app/modules/items/ui/Consumables/ConsumableProperties.tsx b/apps/erp/app/modules/items/ui/Consumables/ConsumableProperties.tsx
index 3c017e9995..6752ff767d 100644
--- a/apps/erp/app/modules/items/ui/Consumables/ConsumableProperties.tsx
+++ b/apps/erp/app/modules/items/ui/Consumables/ConsumableProperties.tsx
@@ -446,8 +446,7 @@ const ConsumableProperties = ({ data }: ConsumablePropertiesProps) => {
}}
/>
</ValidatedForm>
- {(routeData?.consumableSummary?.itemTrackingType === "Serial" ||
- routeData?.consumableSummary?.itemTrackingType === "Batch") && (
+ {routeData?.consumableSummary?.replenishmentSystem?.includes("Buy") && (
<ValidatedForm
defaultValues={{
requiresInspection:
diff --git a/apps/erp/app/modules/items/ui/Item/BillOfMaterial.tsx b/apps/erp/app/modules/items/ui/Item/BillOfMaterial.tsx
index fa88765b96..4865630633 100644
--- a/apps/erp/app/modules/items/ui/Item/BillOfMaterial.tsx
+++ b/apps/erp/app/modules/items/ui/Item/BillOfMaterial.tsx
@@ -771,6 +771,11 @@ function MaterialForm({
name="storageUnitIds"
value={JSON.stringify(itemData.storageUnitIds)}
/>
+ {/* methodType and sourcingType are item-level properties; the fields
+ above are read-only mirrors. They're still submitted to satisfy
+ methodMaterialValidator, but upsertMethodMaterial re-derives both
+ from the component item, so the submitted values are display-only —
+ don't treat them as the source of truth. */}
{itemData.itemReplenishmentSystem !== "Buy and Make" && (
<Hidden name="sourcingType" value={itemData.sourcingType} />
)}
diff --git a/apps/erp/app/modules/items/ui/Materials/MaterialProperties.tsx b/apps/erp/app/modules/items/ui/Materials/MaterialProperties.tsx
index 9d0bda218a..c46ec1ee42 100644
--- a/apps/erp/app/modules/items/ui/Materials/MaterialProperties.tsx
+++ b/apps/erp/app/modules/items/ui/Materials/MaterialProperties.tsx
@@ -708,8 +708,7 @@ const MaterialProperties = ({ data }: MaterialPropertiesProps) => {
}}
/>
</ValidatedForm>
- {(routeData?.materialSummary?.itemTrackingType === "Serial" ||
- routeData?.materialSummary?.itemTrackingType === "Batch") && (
+ {routeData?.materialSummary?.replenishmentSystem?.includes("Buy") && (
<ValidatedForm
defaultValues={{
requiresInspection:
diff --git a/apps/erp/app/modules/items/ui/Parts/PartProperties.tsx b/apps/erp/app/modules/items/ui/Parts/PartProperties.tsx
index f903a20519..60ed92d7c0 100644
--- a/apps/erp/app/modules/items/ui/Parts/PartProperties.tsx
+++ b/apps/erp/app/modules/items/ui/Parts/PartProperties.tsx
@@ -586,8 +586,7 @@ const PartProperties = ({ data }: PartPropertiesProps) => {
}}
/>
</ValidatedForm>
- {(routeData?.partSummary?.itemTrackingType === "Serial" ||
- routeData?.partSummary?.itemTrackingType === "Batch") && (
+ {routeData?.partSummary?.replenishmentSystem?.includes("Buy") && (
<ValidatedForm
defaultValues={{
requiresInspection:
diff --git a/apps/erp/app/modules/items/ui/Tools/ToolProperties.tsx b/apps/erp/app/modules/items/ui/Tools/ToolProperties.tsx
index 60d89d8987..0351b2a349 100644
--- a/apps/erp/app/modules/items/ui/Tools/ToolProperties.tsx
+++ b/apps/erp/app/modules/items/ui/Tools/ToolProperties.tsx
@@ -549,8 +549,7 @@ const ToolProperties = ({ data }: ToolPropertiesProps) => {
}}
/>
</ValidatedForm>
- {(routeData?.toolSummary?.itemTrackingType === "Serial" ||
- routeData?.toolSummary?.itemTrackingType === "Batch") && (
+ {routeData?.toolSummary?.replenishmentSystem?.includes("Buy") && (
<ValidatedForm
defaultValues={{
requiresInspection:
diff --git a/apps/erp/app/modules/quality/quality.models.ts b/apps/erp/app/modules/quality/quality.models.ts
index 0b41e030b1..fecafc9dfc 100644
--- a/apps/erp/app/modules/quality/quality.models.ts
+++ b/apps/erp/app/modules/quality/quality.models.ts
@@ -757,7 +757,9 @@ export const inboundInspectionValidator = z.object({
export const inboundInspectionSampleValidator = z.object({
inspectionId: z.string().min(1, { message: "Inspection is required" }),
- trackedEntityId: z.string().min(1, { message: "Tracked entity is required" }),
+ // Optional: serial parts scan a discrete tracked entity; batch / inventory /
+ // non-inventory parts record pass/fail without one.
+ trackedEntityId: zfd.text(z.string().optional()),
status: z.enum(["Passed", "Failed"], {
errorMap: () => ({ message: "Status is required" })
}),
diff --git a/apps/erp/app/modules/quality/quality.server.ts b/apps/erp/app/modules/quality/quality.server.ts
index 975b4a8b01..f7f1e8b9cd 100644
--- a/apps/erp/app/modules/quality/quality.server.ts
+++ b/apps/erp/app/modules/quality/quality.server.ts
@@ -55,15 +55,21 @@ export async function upsertInboundInspectionSample(
.executeTakeFirst();
if (!inspection) throw new Error("Inspection not found");
- const existing = await trx
- .selectFrom("inboundInspectionSample")
- .select(["id"])
- .where("trackedEntityId", "=", sample.trackedEntityId)
- .executeTakeFirst();
+ // Serial parts carry a tracked entity that may only be sampled once, so we
+ // upsert by it. Batch / inventory / non-inventory parts have no entity —
+ // each recorded result is a fresh anonymous sample.
+ const trackedEntityId = sample.trackedEntityId || null;
+ const existing = trackedEntityId
+ ? await trx
+ .selectFrom("inboundInspectionSample")
+ .select(["id"])
+ .where("trackedEntityId", "=", trackedEntityId)
+ .executeTakeFirst()
+ : undefined;
const samplePayload = {
inboundInspectionId: sample.inspectionId,
- trackedEntityId: sample.trackedEntityId,
+ trackedEntityId,
status: sample.status,
notes: sample.notes ?? null,
inspectedBy: sample.inspectedBy,
@@ -93,53 +99,58 @@ export async function upsertInboundInspectionSample(
sampleId = inserted.id;
}
- const trackedEntityStatus =
- sample.status === "Passed" ? "Available" : "Rejected";
- await trx
- .updateTable("trackedEntity")
- .set({ status: trackedEntityStatus })
- .where("id", "=", sample.trackedEntityId)
- .where("companyId", "=", sample.companyId)
- .execute();
+ // Entity-level side effects only apply when a tracked entity is present
+ // (serial parts). For anonymous samples the lot's disposition handles any
+ // status changes.
+ if (trackedEntityId) {
+ const trackedEntityStatus =
+ sample.status === "Passed" ? "Available" : "Rejected";
+ await trx
+ .updateTable("trackedEntity")
+ .set({ status: trackedEntityStatus })
+ .where("id", "=", trackedEntityId)
+ .where("companyId", "=", sample.companyId)
+ .execute();
- const activity = await trx
- .insertInto("trackedActivity")
- .values({
- type: "Inspect",
- sourceDocument: "Inbound Inspection",
- sourceDocumentId: sample.inspectionId,
- attributes: {
- Result: sample.status,
- Receipt: inspection.receiptId,
- Inspector: sample.inspectedBy,
- ...(sample.notes ? { Notes: sample.notes } : {})
- },
- companyId: sample.companyId,
- createdBy: sample.inspectedBy
- })
- .returning(["id"])
- .executeTakeFirstOrThrow();
+ const activity = await trx
+ .insertInto("trackedActivity")
+ .values({
+ type: "Inspect",
+ sourceDocument: "Inbound Inspection",
+ sourceDocumentId: sample.inspectionId,
+ attributes: {
+ Result: sample.status,
+ Receipt: inspection.receiptId,
+ Inspector: sample.inspectedBy,
+ ...(sample.notes ? { Notes: sample.notes } : {})
+ },
+ companyId: sample.companyId,
+ createdBy: sample.inspectedBy
+ })
+ .returning(["id"])
+ .executeTakeFirstOrThrow();
- await trx
- .insertInto("trackedActivityInput")
- .values({
- trackedActivityId: activity.id,
- trackedEntityId: sample.trackedEntityId,
- quantity: 0,
- companyId: sample.companyId,
- createdBy: sample.inspectedBy
- })
- .execute();
- await trx
- .insertInto("trackedActivityOutput")
- .values({
- trackedActivityId: activity.id,
- trackedEntityId: sample.trackedEntityId,
- quantity: 0,
- companyId: sample.companyId,
- createdBy: sample.inspectedBy
- })
- .execute();
+ await trx
+ .insertInto("trackedActivityInput")
+ .values({
+ trackedActivityId: activity.id,
+ trackedEntityId,
+ quantity: 0,
+ companyId: sample.companyId,
+ createdBy: sample.inspectedBy
+ })
+ .execute();
+ await trx
+ .insertInto("trackedActivityOutput")
+ .values({
+ trackedActivityId: activity.id,
+ trackedEntityId,
+ quantity: 0,
+ companyId: sample.companyId,
+ createdBy: sample.inspectedBy
+ })
+ .execute();
+ }
const isTerminal =
inspection.status === "Passed" ||
@@ -202,6 +213,7 @@ export async function dispositionInboundInspection(
"receiptLineId",
"receiptId",
"itemId",
+ "status",
"supplierId",
"samplingStandard",
"severity",
@@ -215,6 +227,20 @@ export async function dispositionInboundInspection(
.executeTakeFirst();
if (!inspection) throw new Error("Inspection not found");
+ const item = await trx
+ .selectFrom("item")
+ .select(["itemTrackingType"])
+ .where("id", "=", inspection.itemId)
+ .where("companyId", "=", args.companyId)
+ .executeTakeFirst();
+
+ const receiptLine = await trx
+ .selectFrom("receiptLine")
+ .select(["locationId"])
+ .where("id", "=", inspection.receiptLineId)
+ .where("companyId", "=", args.companyId)
+ .executeTakeFirst();
+
const lotEntities = await trx
.selectFrom("trackedEntity")
.select(["id"])
@@ -272,6 +298,35 @@ export async function dispositionInboundInspection(
.execute();
}
+ // Non-tracked (Inventory) items have no tracked entities to flip, so the
+ // received quantity sits in itemLedger with no per-row status to exclude
+ // it from on-hand. Rejecting the lot must post a compensating
+ // Negative Adjmt. to reverse the full received quantity. Tracked items
+ // are already handled by the status flip above; Non-Inventory items never
+ // posted a ledger entry at receipt, so neither needs this.
+ if (
+ args.decision === "Reject" &&
+ inspection.status !== "Failed" &&
+ item?.itemTrackingType === "Inventory" &&
+ inspection.lotSize > 0
+ ) {
+ await trx
+ .insertInto("itemLedger")
+ .values({
+ itemId: inspection.itemId,
+ locationId: receiptLine?.locationId ?? null,
+ entryType: "Negative Adjmt.",
+ documentType: "Inbound Inspection",
+ documentId: inspection.id,
+ quantity: -inspection.lotSize,
+ trackedEntityId: null,
+ companyId: args.companyId,
+ createdBy: args.dispositionedBy,
+ comment: "Inbound inspection lot rejected"
+ })
+ .execute();
+ }
+
const updated = await trx
.updateTable("inboundInspection")
.set({
diff --git a/apps/erp/app/modules/quality/quality.service.ts b/apps/erp/app/modules/quality/quality.service.ts
index 6193495db7..fade8a5ed5 100644
--- a/apps/erp/app/modules/quality/quality.service.ts
+++ b/apps/erp/app/modules/quality/quality.service.ts
@@ -2838,7 +2838,7 @@ export async function getInboundInspection(
return (client as any)
.from("inboundInspection")
.select(
- "*, item(readableId, name, type), receipt(receiptId, supplierId, createdBy), supplier(name), inboundInspectionSample(*, trackedEntity(id, readableId, attributes, status, sourceDocumentReadableId))"
+ "*, item(readableId, name, type, itemTrackingType), receipt(receiptId, supplierId, createdBy), supplier(name), inboundInspectionSample(*, trackedEntity(id, readableId, attributes, status, sourceDocumentReadableId))"
)
.eq("id", id)
.single();
diff --git a/apps/erp/app/modules/quality/ui/InboundInspections/InboundInspectionLotView.tsx b/apps/erp/app/modules/quality/ui/InboundInspections/InboundInspectionLotView.tsx
index f16095f0b3..ee19b2e08d 100644
--- a/apps/erp/app/modules/quality/ui/InboundInspections/InboundInspectionLotView.tsx
+++ b/apps/erp/app/modules/quality/ui/InboundInspections/InboundInspectionLotView.tsx
@@ -5,6 +5,7 @@ import {
Badge,
BarProgress,
Button,
+ Checkbox,
HStack,
Label,
Modal,
@@ -58,6 +59,7 @@ export type InboundInspectionLotViewProps = {
receiptReadableId: string | null;
receiverId: string | null;
itemName: string;
+ itemTrackingType: string | null;
supplierName: string | null;
samples: InboundInspectionSample[];
lotEntities: InspectionTrackedEntity[];
@@ -72,6 +74,7 @@ export default function InboundInspectionLotView({
receiptReadableId,
receiverId,
itemName,
+ itemTrackingType,
supplierName,
samples,
lotEntities,
@@ -86,6 +89,11 @@ export default function InboundInspectionLotView({
const canUpdate = permissions.can("update", "quality");
const [items] = useItems();
+ // Serial parts are inspected by scanning a discrete tracked entity. Batch /
+ // inventory / non-inventory parts record pass/fail for each sampled item
+ // without a tracked entity.
+ const isSerial = itemTrackingType === "Serial";
+
const scannerDisclosure = useDisclosure();
const rejectConfirmDisclosure = useDisclosure();
const acceptConfirmDisclosure = useDisclosure();
@@ -266,14 +274,16 @@ export default function InboundInspectionLotView({
</td>
</tr>
)}
- {samples.map((s) => {
+ {samples.map((s, idx) => {
const readable = s.trackedEntity?.readableId ?? null;
return (
<tr key={s.id} className="border-t">
<td className="px-3 py-2">
<div className="flex flex-col">
<span className="font-mono text-sm">
- {readable ?? s.trackedEntityId}
+ {readable ??
+ s.trackedEntityId ??
+ t`Sample ${idx + 1}`}
</span>
{readable && (
<span className="text-xs text-muted-foreground">
@@ -355,7 +365,12 @@ export default function InboundInspectionLotView({
{scannerDisclosure.isOpen && (
<ScanInspectionSample
inspectionId={inspection.id}
+ isSerial={isSerial}
remaining={remaining}
+ inspected={inspected}
+ sampleSize={inspection.sampleSize}
+ fails={fails}
+ acceptanceNumber={inspection.acceptanceNumber}
onClose={scannerDisclosure.onClose}
/>
)}
@@ -364,7 +379,11 @@ export default function InboundInspectionLotView({
<Confirm
action={acceptUrl}
title={t`Accept lot?`}
- text={t`${lotEntities.length - inspected} un-sampled entities will be released to Available. Sampled passes stay Available and sampled failures stay Rejected.`}
+ text={
+ isSerial
+ ? t`${lotEntities.length - inspected} un-sampled entities will be released to Available. Sampled passes stay Available and sampled failures stay Rejected.`
+ : t`The lot will be marked Passed. ${fails} sampled failure(s) are recorded for your records.`
+ }
confirmText={t`Accept Lot`}
onCancel={acceptConfirmDisclosure.onClose}
onSubmit={acceptConfirmDisclosure.onClose}
@@ -375,7 +394,11 @@ export default function InboundInspectionLotView({
<Confirm
action={partialUrl}
title={t`Mark lot as partial?`}
- text={t`Un-sampled entities will remain On Hold so you can keep inspecting and disposition later. Sampled outcomes are preserved.`}
+ text={
+ isSerial
+ ? t`Un-sampled entities will remain On Hold so you can keep inspecting and disposition later. Sampled outcomes are preserved.`
+ : t`The lot stays open so you can keep inspecting and disposition later. Sampled outcomes are preserved.`
+ }
confirmText={t`Mark Partial`}
onCancel={partialConfirmDisclosure.onClose}
onSubmit={partialConfirmDisclosure.onClose}
@@ -386,7 +409,11 @@ export default function InboundInspectionLotView({
<RejectLotModal
action={rejectUrl}
issueTypes={issueTypes}
- summary={t`Statistical acceptance failed, so the entire lot is considered non-conforming (ISO 9001:2015 §8.7). All ${lotEntities.length} entities — ${passes} sampled pass(es), ${fails} failure(s), and ${Math.max(0, lotEntities.length - inspected)} un-inspected — will be marked Rejected. An NCR will be opened automatically for MRB disposition.`}
+ summary={
+ isSerial
+ ? t`Statistical acceptance failed, so the entire lot is considered non-conforming (ISO 9001:2015 §8.7). All ${lotEntities.length} entities — ${passes} sampled pass(es), ${fails} failure(s), and ${Math.max(0, lotEntities.length - inspected)} un-inspected — will be marked Rejected.`
+ : t`Statistical acceptance failed, so the entire lot of ${inspection.lotSize} is considered non-conforming (ISO 9001:2015 §8.7) — ${passes} sampled pass(es) and ${fails} failure(s).`
+ }
onCancel={rejectConfirmDisclosure.onClose}
onSubmit={rejectConfirmDisclosure.onClose}
/>
@@ -411,6 +438,7 @@ function RejectLotModal({
const { t } = useLingui();
const fetcher = useFetcher<{}>();
const submitted = useRef(false);
+ const [createNcr, setCreateNcr] = useState(true);
const [issueTypeId, setIssueTypeId] = useState<string>(
issueTypes[0]?.id ?? ""
);
@@ -441,38 +469,48 @@ function RejectLotModal({
<ModalBody>
<VStack spacing={4}>
<p className="text-sm text-muted-foreground">{summary}</p>
- {hasIssueTypes ? (
- <div className="flex flex-col gap-2 w-full">
- <Label htmlFor="nonConformanceTypeId">
- <Trans>Issue Type</Trans>
- </Label>
- <Select value={issueTypeId} onValueChange={setIssueTypeId}>
- <SelectTrigger id="nonConformanceTypeId">
- <SelectValue placeholder={t`Select an issue type`} />
- </SelectTrigger>
- <SelectContent>
- {issueTypes.map((type) => (
- <SelectItem key={type.id} value={type.id}>
- {type.name}
- </SelectItem>
- ))}
- </SelectContent>
- </Select>
- </div>
- ) : (
- <Alert variant="warning">
- <LuTriangleAlert className="size-4" />
- <AlertTitle>
- <Trans>No issue types configured</Trans>
- </AlertTitle>
- <AlertDescription>
- <Trans>
- The lot will still be rejected, but an NCR cannot be
- auto-created until at least one Issue Type is configured.
- </Trans>
- </AlertDescription>
- </Alert>
- )}
+ <label className="flex items-center gap-2 w-full cursor-pointer">
+ <Checkbox
+ isChecked={createNcr}
+ onCheckedChange={(checked) => setCreateNcr(!!checked)}
+ />
+ <span className="text-sm font-medium">
+ <Trans>Open an NCR for MRB disposition</Trans>
+ </span>
+ </label>
+ {createNcr &&
+ (hasIssueTypes ? (
+ <div className="flex flex-col gap-2 w-full">
+ <Label htmlFor="nonConformanceTypeId">
+ <Trans>Issue Type</Trans>
+ </Label>
+ <Select value={issueTypeId} onValueChange={setIssueTypeId}>
+ <SelectTrigger id="nonConformanceTypeId">
+ <SelectValue placeholder={t`Select an issue type`} />
+ </SelectTrigger>
+ <SelectContent>
+ {issueTypes.map((type) => (
+ <SelectItem key={type.id} value={type.id}>
+ {type.name}
+ </SelectItem>
+ ))}
+ </SelectContent>
+ </Select>
+ </div>
+ ) : (
+ <Alert variant="warning">
+ <LuTriangleAlert className="size-4" />
+ <AlertTitle>
+ <Trans>No issue types configured</Trans>
+ </AlertTitle>
+ <AlertDescription>
+ <Trans>
+ The lot will still be rejected, but an NCR cannot be
+ created until at least one Issue Type is configured.
+ </Trans>
+ </AlertDescription>
+ </Alert>
+ ))}
</VStack>
</ModalBody>
<ModalFooter>
@@ -484,17 +522,23 @@ function RejectLotModal({
action={action}
onSubmit={() => (submitted.current = true)}
>
+ <input
+ type="hidden"
+ name="createNcr"
+ value={createNcr ? "true" : "false"}
+ />
<input
type="hidden"
name="nonConformanceTypeId"
- value={issueTypeId}
+ value={createNcr ? issueTypeId : ""}
/>
<Button
variant="destructive"
type="submit"
isLoading={fetcher.state !== "idle"}
isDisabled={
- fetcher.state !== "idle" || (hasIssueTypes && !issueTypeId)
+ fetcher.state !== "idle" ||
+ (createNcr && hasIssueTypes && !issueTypeId)
}
>
<Trans>Reject Lot</Trans>
diff --git a/apps/erp/app/modules/quality/ui/InboundInspections/ScanInspectionSample.tsx b/apps/erp/app/modules/quality/ui/InboundInspections/ScanInspectionSample.tsx
index 84423a7b4e..de92317a6c 100644
--- a/apps/erp/app/modules/quality/ui/InboundInspections/ScanInspectionSample.tsx
+++ b/apps/erp/app/modules/quality/ui/InboundInspections/ScanInspectionSample.tsx
@@ -1,5 +1,6 @@
import { ValidatedForm } from "@carbon/form";
import {
+ BarProgress,
Button,
HStack,
Input,
@@ -37,13 +38,23 @@ import { path } from "~/utils/path";
type Props = {
inspectionId: string;
+ isSerial: boolean;
remaining: InspectionTrackedEntity[];
+ inspected: number;
+ sampleSize: number;
+ fails: number;
+ acceptanceNumber: number;
onClose: () => void;
};
export default function ScanInspectionSample({
inspectionId,
+ isSerial,
remaining,
+ inspected,
+ sampleSize,
+ fails,
+ acceptanceNumber,
onClose
}: Props) {
const { t } = useLingui();
@@ -56,6 +67,9 @@ export default function ScanInspectionSample({
const [pendingStatus, setPendingStatus] = useState<"Passed" | "Failed">(
"Passed"
);
+ // Bumped after each successful save so the form (notes) remounts and clears,
+ // even for non-serial parts where there's no entity selection to change.
+ const [resetKey, setResetKey] = useState(0);
const findMatch = (value: string): InspectionTrackedEntity | null => {
if (!value) return null;
@@ -78,11 +92,14 @@ export default function ScanInspectionSample({
if (fetcher.state === "idle" && fetcher.data && !fetcher.data.error) {
setSerial("");
setSelected(null);
+ setResetKey((k) => k + 1);
}
}, [fetcher.state, fetcher.data]);
const isSubmitting = fetcher.state !== "idle";
- const hasSelection = !!selected;
+ // Serial parts require a scanned/selected tracked entity; other tracking
+ // types record pass/fail without one.
+ const canRecord = isSerial ? !!selected : true;
return (
<Modal
@@ -97,14 +114,18 @@ export default function ScanInspectionSample({
<Trans>Inspect Item</Trans>
</ModalTitle>
<ModalDescription>
- <Trans>
- Scan or select a tracked entity from this lot and record the
- inspection result.
- </Trans>
+ {isSerial ? (
+ <Trans>
+ Scan or select a tracked entity from this lot and record the
+ inspection result.
+ </Trans>
+ ) : (
+ <Trans>Record the inspection result for this sample.</Trans>
+ )}
</ModalDescription>
</ModalHeader>
<ValidatedForm
- key={selected?.id ?? "none"}
+ key={`${selected?.id ?? "none"}-${resetKey}`}
fetcher={fetcher}
method="post"
action={`${path.to.inboundInspection(inspectionId)}/sample`}
@@ -117,111 +138,119 @@ export default function ScanInspectionSample({
}}
>
<ModalBody>
+ <Hidden name="inspectionId" value={inspectionId} />
+ <Hidden name="trackedEntityId" value={selected?.id ?? ""} />
+ <Hidden name="status" value={pendingStatus} />
+
<VStack spacing={4} className="w-full">
- <Tabs defaultValue="scan" className="w-full">
- <TabsList className="grid w-full grid-cols-2 mb-4">
- <TabsTrigger value="scan">
- <LuQrCode className="mr-2" />
- <Trans>Scan</Trans>
- </TabsTrigger>
- <TabsTrigger value="select">
- <LuList className="mr-2" />
- <Trans>Select</Trans>
- </TabsTrigger>
- </TabsList>
- <TabsContent value="scan" className="mt-0 w-full">
- <VStack spacing={3} className="w-full">
- <InputGroup className="w-full">
- <Input
- autoFocus
- placeholder={t`Scan or enter tracked entity ID, serial, or batch`}
- value={serial}
- onChange={(e) => setSerial(e.target.value)}
- />
- <InputRightElement>
- {serial &&
- (hasSelection ? (
- <LuCheck className="text-green-500" />
- ) : (
- <LuX className="text-red-500" />
- ))}
- </InputRightElement>
- </InputGroup>
+ <BarProgress
+ label={t`Progress`}
+ value={`${inspected} / ${sampleSize} · ${fails} ${fails === 1 ? "failure" : "failures"} · Ac ${acceptanceNumber}`}
+ progress={inspected}
+ max={Math.max(1, sampleSize)}
+ activeClassName={
+ fails > acceptanceNumber ? "bg-red-500" : "bg-emerald-500"
+ }
+ />
- {selected && (
- <div className="w-full rounded-md border p-3">
- <div className="text-xs text-muted-foreground">
- <Trans>Tracked Entity</Trans>
- </div>
- <div className="font-mono text-sm">
- {selected.readableId ?? selected.id}
- </div>
- {selected.readableId && (
- <div className="text-xs text-muted-foreground mt-1">
- {selected.id}
+ {isSerial && (
+ <Tabs defaultValue="scan" className="w-full">
+ <TabsList className="grid w-full grid-cols-2 mb-4">
+ <TabsTrigger value="scan">
+ <LuQrCode className="mr-2" />
+ <Trans>Scan</Trans>
+ </TabsTrigger>
+ <TabsTrigger value="select">
+ <LuList className="mr-2" />
+ <Trans>Select</Trans>
+ </TabsTrigger>
+ </TabsList>
+ <TabsContent value="scan" className="mt-0 w-full">
+ <VStack spacing={3} className="w-full">
+ <InputGroup className="w-full">
+ <Input
+ autoFocus
+ placeholder={t`Scan or enter tracked entity ID, serial, or batch`}
+ value={serial}
+ onChange={(e) => setSerial(e.target.value)}
+ />
+ <InputRightElement>
+ {serial &&
+ (selected ? (
+ <LuCheck className="text-green-500" />
+ ) : (
+ <LuX className="text-red-500" />
+ ))}
+ </InputRightElement>
+ </InputGroup>
+
+ {selected && (
+ <div className="w-full rounded-md border p-3">
+ <div className="text-xs text-muted-foreground">
+ <Trans>Tracked Entity</Trans>
</div>
- )}
- </div>
- )}
- </VStack>
- </TabsContent>
- <TabsContent value="select" className="mt-0 w-full">
- <ScrollArea className="h-[40dvh] w-full">
- <VStack spacing={2} className="w-full pr-3">
- {remaining.length === 0 ? (
- <p className="text-center text-muted-foreground w-full py-6">
- <Trans>No remaining entities to inspect.</Trans>
- </p>
- ) : (
- remaining.map((e) => {
- const isSelected = selected?.id === e.id;
- return (
- <HStack
- key={e.id}
- className="w-full justify-between p-4 border rounded-md"
- >
- <VStack
- spacing={0}
- className="w-full items-start min-w-0"
- >
- <p className="font-mono text-sm truncate w-full">
- {e.readableId ?? e.id}
- </p>
- {e.readableId && (
- <p className="text-xs text-muted-foreground truncate w-full">
- {e.id}
- </p>
- )}
- </VStack>
- <Button
- size="sm"
- variant={isSelected ? "primary" : "secondary"}
- onClick={() => setSerial(e.id)}
- >
- {isSelected ? (
- <Trans>Selected</Trans>
- ) : (
- <Trans>Select</Trans>
- )}
- </Button>
- </HStack>
- );
- })
+ <div className="font-mono text-sm">
+ {selected.readableId ?? selected.id}
+ </div>
+ {selected.readableId && (
+ <div className="text-xs text-muted-foreground mt-1">
+ {selected.id}
+ </div>
+ )}
+ </div>
)}
</VStack>
- </ScrollArea>
- </TabsContent>
- </Tabs>
-
- <Hidden name="inspectionId" value={inspectionId} />
- <Hidden name="trackedEntityId" value={selected?.id ?? ""} />
- <Hidden name="status" value={pendingStatus} />
+ </TabsContent>
+ <TabsContent value="select" className="mt-0 w-full">
+ <ScrollArea className="h-[40dvh] w-full">
+ <VStack spacing={2} className="w-full pr-3">
+ {remaining.length === 0 ? (
+ <p className="text-center text-muted-foreground w-full py-6">
+ <Trans>No remaining entities to inspect.</Trans>
+ </p>
+ ) : (
+ remaining.map((e) => {
+ const isSelected = selected?.id === e.id;
+ return (
+ <HStack
+ key={e.id}
+ className="w-full justify-between p-4 border rounded-md"
+ >
+ <VStack
+ spacing={0}
+ className="w-full items-start min-w-0"
+ >
+ <p className="font-mono text-sm truncate w-full">
+ {e.readableId ?? e.id}
+ </p>
+ {e.readableId && (
+ <p className="text-xs text-muted-foreground truncate w-full">
+ {e.id}
+ </p>
+ )}
+ </VStack>
+ <Button
+ size="sm"
+ variant={isSelected ? "primary" : "secondary"}
+ onClick={() => setSerial(e.id)}
+ >
+ {isSelected ? (
+ <Trans>Selected</Trans>
+ ) : (
+ <Trans>Select</Trans>
+ )}
+ </Button>
+ </HStack>
+ );
+ })
+ )}
+ </VStack>
+ </ScrollArea>
+ </TabsContent>
+ </Tabs>
+ )}
- <TextArea
- name="notes"
- label={t`Notes`}
- isDisabled={!hasSelection}
- />
+ <TextArea name="notes" label={t`Notes`} isDisabled={!canRecord} />
</VStack>
</ModalBody>
<ModalFooter>
@@ -232,14 +261,14 @@ export default function ScanInspectionSample({
<Submit
variant="destructive"
leftIcon={<LuCircleX />}
- isDisabled={!hasSelection || isSubmitting}
+ isDisabled={!canRecord || isSubmitting}
onClick={() => setPendingStatus("Failed")}
>
<Trans>Fail</Trans>
</Submit>
<Submit
leftIcon={<LuCircleCheck />}
- isDisabled={!hasSelection || isSubmitting}
+ isDisabled={!canRecord || isSubmitting}
onClick={() => setPendingStatus("Passed")}
>
<Trans>Pass</Trans>
diff --git a/apps/erp/app/routes/api+/mcp+/lib/tool-metadata.json b/apps/erp/app/routes/api+/mcp+/lib/tool-metadata.json
index 51fbaa6f34..cc6abe41fb 100644
--- a/apps/erp/app/routes/api+/mcp+/lib/tool-metadata.json
+++ b/apps/erp/app/routes/api+/mcp+/lib/tool-metadata.json
@@ -1,5 +1,5 @@
{
- "generated": "2026-06-20T00:13:41.606Z",
+ "generated": "2026-06-20T04:19:09.766Z",
"totalTools": 1208,
"modules": 15,
"tools": [
@@ -4111,6 +4111,35 @@
]
}
},
+ {
+ "name": "inventory_reconcileReceiptSerialEntities",
+ "module": "inventory",
+ "classification": "WRITE",
+ "description": "reconcile receipt serial entities",
+ "paramCount": 2,
+ "serviceParams": [
+ "client",
+ "args"
+ ],
+ "injectAuth": [
+ "companyId"
+ ],
+ "schema": {
+ "type": "object",
+ "properties": {
+ "receiptId": {
+ "type": "string"
+ },
+ "lines: {\n id: string;\n receivedQuantity: number | null;\n requiresSerialTracking": {
+ "type": "array",
+ "items": {}
+ }
+ },
+ "required": [
+ "receiptId"
+ ]
+ }
+ },
{
"name": "inventory_getReceiptFiles",
"module": "inventory",
diff --git a/apps/erp/app/routes/x+/quality+/inbound-inspections.$id.reject.tsx b/apps/erp/app/routes/x+/quality+/inbound-inspections.$id.reject.tsx
index eb0e2d48be..217196d95c 100644
--- a/apps/erp/app/routes/x+/quality+/inbound-inspections.$id.reject.tsx
+++ b/apps/erp/app/routes/x+/quality+/inbound-inspections.$id.reject.tsx
@@ -31,6 +31,10 @@ export async function action({ request, params }: ActionFunctionArgs) {
const formData = await request.formData();
const selectedIssueTypeId =
(formData.get("nonConformanceTypeId") as string | null)?.trim() || null;
+ // NCR creation is optional — the inspector can reject the lot without opening
+ // one (default is to open one, preserving prior behavior).
+ const createNcr =
+ ((formData.get("createNcr") as string | null) ?? "true") !== "false";
// 1. Cascade reject — mark every tracked entity in the lot as Rejected
// and flip the lot's status to Failed (ISO 9001:2015 §8.7).
@@ -50,6 +54,14 @@ export async function action({ request, params }: ActionFunctionArgs) {
);
}
+ // If the inspector opted out of an NCR, we're done — the lot is rejected.
+ if (!createNcr) {
+ throw redirect(
+ path.to.inboundInspection(id),
+ await flash(request, success("Lot rejected"))
+ );
+ }
+
// 2. Auto-create an NCR and navigate the user straight to it so MRB can
// formally disposition (scrap / rework / return / use-as-is).
const serviceRole = await getCarbonServiceRole();
diff --git a/apps/erp/app/routes/x+/quality+/inbound-inspections.$id.tsx b/apps/erp/app/routes/x+/quality+/inbound-inspections.$id.tsx
index 6dd2511c82..fcb7428b6a 100644
--- a/apps/erp/app/routes/x+/quality+/inbound-inspections.$id.tsx
+++ b/apps/erp/app/routes/x+/quality+/inbound-inspections.$id.tsx
@@ -41,7 +41,12 @@ export async function loader({ request, params }: LoaderFunctionArgs) {
}
const insp = inspection.data as InboundInspectionRow & {
- item: { readableId: string | null; name: string; type: string } | null;
+ item: {
+ readableId: string | null;
+ name: string;
+ type: string;
+ itemTrackingType: string | null;
+ } | null;
receipt: {
receiptId: string;
supplierId: string | null;
@@ -66,6 +71,7 @@ export async function loader({ request, params }: LoaderFunctionArgs) {
receiptReadableId: insp.receipt?.receiptId ?? null,
receiverId: insp.receipt?.createdBy ?? null,
itemName: insp.item?.name ?? "",
+ itemTrackingType: insp.item?.itemTrackingType ?? null,
supplierName: insp.supplier?.name ?? null,
samples: insp.inboundInspectionSample ?? [],
lotEntities: (lotEntities.data ?? []) as InspectionTrackedEntity[],
@@ -82,6 +88,7 @@ export default function InboundInspectionRoute() {
receiptReadableId,
receiverId,
itemName,
+ itemTrackingType,
supplierName,
samples,
lotEntities,
@@ -96,6 +103,7 @@ export default function InboundInspectionRoute() {
receiptReadableId={receiptReadableId}
receiverId={receiverId}
itemName={itemName}
+ itemTrackingType={itemTrackingType}
supplierName={supplierName}
samples={samples as InboundInspectionSample[]}
lotEntities={lotEntities as InspectionTrackedEntity[]}
diff --git a/apps/erp/app/routes/x+/receipt+/$receiptId.post.tsx b/apps/erp/app/routes/x+/receipt+/$receiptId.post.tsx
index 8f4eebe351..bf318d3518 100644
--- a/apps/erp/app/routes/x+/receipt+/$receiptId.post.tsx
+++ b/apps/erp/app/routes/x+/receipt+/$receiptId.post.tsx
@@ -11,6 +11,7 @@ import { trigger } from "@carbon/jobs";
import { getCachedPrinterConfig } from "@carbon/printing/printing.server";
import type { ActionFunctionArgs } from "react-router";
import { redirect } from "react-router";
+import { reconcileReceiptSerialEntities } from "~/modules/inventory";
import { path } from "~/utils/path";
export async function action({ request, params }: ActionFunctionArgs) {
@@ -31,7 +32,7 @@ export async function action({ request, params }: ActionFunctionArgs) {
const { data: lines } = await serviceRole
.from("receiptLine")
.select(
- "id, itemId, storageUnitId, receivedQuantity, locationId, receiptId"
+ "id, itemId, storageUnitId, receivedQuantity, locationId, receiptId, requiresSerialTracking"
)
.eq("receiptId", receiptId)
.eq("companyId", companyId);
@@ -103,6 +104,16 @@ export async function action({ request, params }: ActionFunctionArgs) {
};
}
+ // Serial-tracked lines can accumulate stale tracked entities (reduced
+ // quantity leaves orphans, edited serials leave duplicates) that would
+ // otherwise be flipped to Available as phantom serials. Clear them before
+ // posting.
+ await reconcileReceiptSerialEntities(serviceRole, {
+ receiptId,
+ companyId,
+ lines: lines ?? []
+ });
+
const setPendingState = await client
.from("receipt")
.update({
diff --git a/llm/cache/inbound-inspection-system.md b/llm/cache/inbound-inspection-system.md
new file mode 100644
index 0000000000..d4ea92e3ed
--- /dev/null
+++ b/llm/cache/inbound-inspection-system.md
@@ -0,0 +1,62 @@
+# Inbound Inspection System
+
+Receiving-side quality gate. When a receipt is posted, a lot-level inspection is
+created for any received line whose item has `requiresInspection = true`.
+
+## Data model (migration `20260419163058_inbound-inspection-sampling.sql`)
+
+- `item.requiresInspection` BOOLEAN — flags an item for inbound inspection.
+- `itemSamplingPlan` (PK `itemId`) — per-item plan: `type` (All/First/Percentage/AQL),
+ `sampleSize`, `percentage`, `aql`, `inspectionLevel`, `severity`.
+- `inboundInspection` (lot level) — `receiptLineId` (unique), `receiptId`, `itemId`,
+ `lotSize`, `sampleSize`, `acceptanceNumber`, `rejectionNumber`, sampling snapshot,
+ `status` (Pending/In Progress/Passed/Failed/Partial), disposition fields. No
+ `itemTrackingType` column — joined from `item` when needed.
+- `inboundInspectionSample` — one row per recorded result. `trackedEntityId` is
+ **nullable** (migration `20260612151947_inbound-inspection-optional-tracked-entity.sql`);
+ a partial unique index (`WHERE trackedEntityId IS NOT NULL`) keeps a serial entity
+ sampleable only once while allowing many anonymous samples per lot.
+- `inboundInspectionHistory` — one row per disposition (for future plan auto-switching).
+
+## Tracking types (key behavior)
+
+All four `itemTrackingType` values support inbound inspection. Tracked-entity counts
+created at receipt (`post-receipt/index.ts`, lot creation ~lines 634-682):
+- **Serial** (qty N) → N tracked entities (qty 1 each). Inspector **scans/selects** a
+ discrete entity per sample; that entity flips Available/Rejected per result.
+- **Batch** (qty N) → 1 tracked entity (qty N). No scanning; the single lot entity is
+ released/rejected by disposition as an un-sampled entity.
+- **Inventory / Non-Inventory** → 0 tracked entities (inventory goes straight to
+ Available in `itemLedger`; no physical hold). Inspection is a **quality record only**.
+
+Non-serial parts record pass/fail per sampled item with `trackedEntityId = NULL` —
+same inspection UI, no scan. (Before mid-2026 the "Requires Inspection" toggle was
+gated to Serial/Batch only; that gate was removed.)
+
+## Code map
+
+- ERP "Requires Inspection" toggle: `apps/erp/app/modules/items/ui/{Parts,Materials,Tools,Consumables}/*Properties.tsx`
+ (no longer gated by tracking type). Quality tab nav keys off `requiresInspection`.
+- Sampling plan editor: `apps/erp/app/modules/quality/ui/SamplingPlan/SamplingPlanForm.tsx`
+ (per item-type quality routes, e.g. `routes/x+/part+/$itemId.quality.tsx`).
+- Inspection detail UI: `apps/erp/app/modules/quality/ui/InboundInspections/InboundInspectionLotView.tsx`
+ (drawer: progress, samples table, Accept/Reject/Partial). Branches on
+ `isSerial = itemTrackingType === "Serial"`. Reject modal has an optional
+ "Open an NCR" checkbox (default on).
+- Sample modal: `.../InboundInspections/ScanInspectionSample.tsx` — `isSerial` prop;
+ serial shows Scan/Select tabs (entity required), others show just Notes + Pass/Fail.
+- Routes: `routes/x+/quality+/inbound-inspections.$id.tsx` (loader passes
+ `itemTrackingType`), `.$id.sample.tsx`, `.$id.{accept,reject,partial}.tsx`.
+- Server transactions: `apps/erp/app/modules/quality/quality.server.ts`
+ - `upsertInboundInspectionSample` — entity status flip + `trackedActivity`
+ input/output only when `trackedEntityId` present; anonymous samples are
+ always inserts (no dedupe).
+ - `dispositionInboundInspection` — Accept releases un-sampled entities, Reject
+ flips all lot entities to Rejected, Partial leaves them; writes history. No-op
+ on entity flips when the lot has 0 entities.
+- Service queries: `quality.service.ts` `getInboundInspection` (selects
+ `item(... itemTrackingType)`), `getInboundInspectionLotTrackedEntities`.
+- Validator: `quality.models.ts` `inboundInspectionSampleValidator` —
+ `trackedEntityId` is optional.
+- Reject route auto-creates an NCR (optional via `createNcr` form flag), linking the
+ inspection, receipt line, and any failed/lot tracked entities.
diff --git a/packages/database/src/types.ts b/packages/database/src/types.ts
index 3a3bd1da77..249891fe25 100644
--- a/packages/database/src/types.ts
+++ b/packages/database/src/types.ts
@@ -12142,7 +12142,7 @@ export type Database = {
inspectedBy: string | null
notes: string | null
status: Database["public"]["Enums"]["inboundInspectionSampleStatus"]
- trackedEntityId: string
+ trackedEntityId: string | null
updatedAt: string | null
updatedBy: string | null
}
@@ -12156,7 +12156,7 @@ export type Database = {
inspectedBy?: string | null
notes?: string | null
status?: Database["public"]["Enums"]["inboundInspectionSampleStatus"]
- trackedEntityId: string
+ trackedEntityId?: string | null
updatedAt?: string | null
updatedBy?: string | null
}
@@ -12170,7 +12170,7 @@ export type Database = {
inspectedBy?: string | null
notes?: string | null
status?: Database["public"]["Enums"]["inboundInspectionSampleStatus"]
- trackedEntityId?: string
+ trackedEntityId?: string | null
updatedAt?: string | null
updatedBy?: string | null
}
@@ -66840,6 +66840,7 @@ export type Database = {
| "Purchase Order"
| "Maintenance Consumption"
| "Non-Conformance"
+ | "Inbound Inspection"
itemLedgerType:
| "Purchase"
| "Sale"
@@ -68129,6 +68130,7 @@ export const Constants = {
"Purchase Order",
"Maintenance Consumption",
"Non-Conformance",
+ "Inbound Inspection",
],
itemLedgerType: [
"Purchase",
diff --git a/packages/database/supabase/migrations/20260612151947_inbound-inspection-optional-tracked-entity.sql b/packages/database/supabase/migrations/20260612151947_inbound-inspection-optional-tracked-entity.sql
new file mode 100644
index 0000000000..509c4ea99c
--- /dev/null
+++ b/packages/database/supabase/migrations/20260612151947_inbound-inspection-optional-tracked-entity.sql
@@ -0,0 +1,15 @@
+-- Support inbound inspection for non-serial parts (Batch / Inventory / Non-Inventory).
+-- For these tracking types the inspector records pass/fail for each sampled item
+-- without scanning a tracked entity, so trackedEntityId becomes optional. Serial
+-- parts still scan a discrete entity, and a given entity may only be sampled once
+-- (preserved by the partial unique index below).
+
+ALTER TABLE "inboundInspectionSample"
+ ALTER COLUMN "trackedEntityId" DROP NOT NULL;
+
+ALTER TABLE "inboundInspectionSample"
+ DROP CONSTRAINT IF EXISTS "inboundInspectionSample_trackedEntityId_unique";
+
+CREATE UNIQUE INDEX "inboundInspectionSample_trackedEntityId_key"
+ ON "inboundInspectionSample" ("trackedEntityId")
+ WHERE "trackedEntityId" IS NOT NULL;
diff --git a/packages/database/supabase/migrations/20260619142853_item-ledger-inbound-inspection-doctype.sql b/packages/database/supabase/migrations/20260619142853_item-ledger-inbound-inspection-doctype.sql
new file mode 100644
index 0000000000..0f815a0d64
--- /dev/null
+++ b/packages/database/supabase/migrations/20260619142853_item-ledger-inbound-inspection-doctype.sql
@@ -0,0 +1,7 @@
+-- Add an 'Inbound Inspection' document type to itemLedgerDocumentType so that
+-- rejecting an inbound inspection lot for a non-tracked (Inventory) item can
+-- post a Negative Adjmt. ledger entry that reverses the received quantity.
+-- Tracked items already drop out of on-hand via trackedEntity status, but
+-- non-tracked items have no per-row status to flip, so they need a compensating
+-- ledger row instead.
+ALTER TYPE "itemLedgerDocumentType" ADD VALUE IF NOT EXISTS 'Inbound Inspection';
diff --git a/packages/locale/locales/de/erp.po b/packages/locale/locales/de/erp.po
index 84f0343b49..cf779cebfd 100644
--- a/packages/locale/locales/de/erp.po
+++ b/packages/locale/locales/de/erp.po
@@ -5546,6 +5546,9 @@ msgstr "Öffnen"
msgid "Open Actions"
msgstr "Offene Maßnahmen"
+msgid "Open an NCR for MRB disposition"
+msgstr "Öffnen Sie eine NCR zur MRB-Disposition"
+
msgid "Open Audit Log"
msgstr "Audit-Protokoll öffnen"
@@ -6466,6 +6469,9 @@ msgstr "Aufnahme"
msgid "Record deleted"
msgstr "Datensatz gelöscht"
+msgid "Record the inspection result for this sample."
+msgstr "Inspektionsergebnis für diese Stichprobe aufzeichnen."
+
msgid "Records"
msgstr "Aufzeichnungen"
@@ -6866,6 +6872,10 @@ msgstr "Verkaufsumsatz"
msgid "Sample"
msgstr "Probe"
+#. placeholder {0}: idx + 1
+msgid "Sample {0}"
+msgstr "Muster {0}"
+
msgid "Sample Size"
msgstr "Stichprobengröße"
@@ -7565,8 +7575,12 @@ msgstr "Bundesland / Provinz"
#. placeholder {0}: lotEntities.length
#. placeholder {1}: Math.max(0, lotEntities.length - inspected)
-msgid "Statistical acceptance failed, so the entire lot is considered non-conforming (ISO 9001:2015 §8.7). All {0} entities — {passes} sampled pass(es), {fails} failure(s), and {1} un-inspected — will be marked Rejected. An NCR will be opened automatically for MRB disposition."
-msgstr "Statistische Annahme fehlgeschlagen, daher wird die gesamte Charge als nicht konform betrachtet (ISO 9001:2015 §8.7). Alle {0} Entitäten — {passes} geprüfte Bestätigung(en), {fails} Fehler und {1} nicht geprüfte — werden als Abgelehnt markiert. Ein NCR wird automatisch zur MRB-Disposition eröffnet."
+msgid "Statistical acceptance failed, so the entire lot is considered non-conforming (ISO 9001:2015 §8.7). All {0} entities — {passes} sampled pass(es), {fails} failure(s), and {1} un-inspected — will be marked Rejected."
+msgstr "Statistische Annahme fehlgeschlagen, daher wird die gesamte Charge als nicht konform betrachtet (ISO 9001:2015 §8.7). Alle {0} Entitäten — {passes} geprüfte Bestätigung(en), {fails} Fehler und {1} nicht geprüfte — werden als Abgelehnt markiert."
+
+#. placeholder {0}: inspection.lotSize
+msgid "Statistical acceptance failed, so the entire lot of {0} is considered non-conforming (ISO 9001:2015 §8.7) — {passes} sampled pass(es) and {fails} failure(s)."
+msgstr "Statistische Annahme fehlgeschlagen, daher wird die gesamte Charge von {0} als nicht konform betrachtet (ISO 9001:2015 §8.7) — {passes} geprüfte Annahme(n) und {fails} Fehler."
msgid "Status"
msgstr "Status"
@@ -7929,8 +7943,14 @@ msgstr "Die folgenden Positionen haben keine Preise oder Lieferzeiten:"
msgid "The latest date to place this PO so it arrives by the need-by date, given the supplier's lead time."
msgstr "Das späteste Datum, um diese Bestellung aufzugeben, damit sie bis zum erforderlichen Datum ankommt, unter Berücksichtigung der Lieferzeit des Lieferanten."
-msgid "The lot will still be rejected, but an NCR cannot be auto-created until at least one Issue Type is configured."
-msgstr "Das Los wird weiterhin abgelehnt, aber ein NCR kann nicht automatisch erstellt werden, bis mindestens ein Problemtyp konfiguriert ist."
+msgid "The lot stays open so you can keep inspecting and disposition later. Sampled outcomes are preserved."
+msgstr "Die Charge bleibt offen, damit Sie weiterhin inspizieren und später disponieren können. Inspektionsergebnisse werden beibehalten."
+
+msgid "The lot will be marked Passed. {fails} sampled failure(s) are recorded for your records."
+msgstr "Das Los wird als Bestanden markiert. {fails} erfasste Fehler werden für Ihre Unterlagen aufgezeichnet."
+
+msgid "The lot will still be rejected, but an NCR cannot be created until at least one Issue Type is configured."
+msgstr "Das Los wird immer noch abgelehnt, aber ein NCR kann nicht erstellt werden, bis mindestens ein Problemtyp konfiguriert ist."
msgid "The new version number of the method"
msgstr "Die neue Versionsnummer der Methode"
diff --git a/packages/locale/locales/en/erp.po b/packages/locale/locales/en/erp.po
index 72e5caba67..f3c4a1148a 100644
--- a/packages/locale/locales/en/erp.po
+++ b/packages/locale/locales/en/erp.po
@@ -5546,6 +5546,9 @@ msgstr "Open"
msgid "Open Actions"
msgstr "Open Actions"
+msgid "Open an NCR for MRB disposition"
+msgstr "Open an NCR for MRB disposition"
+
msgid "Open Audit Log"
msgstr "Open Audit Log"
@@ -6466,6 +6469,9 @@ msgstr "Record"
msgid "Record deleted"
msgstr "Record deleted"
+msgid "Record the inspection result for this sample."
+msgstr "Record the inspection result for this sample."
+
msgid "Records"
msgstr "Records"
@@ -6866,6 +6872,10 @@ msgstr "Sales Revenue"
msgid "Sample"
msgstr "Sample"
+#. placeholder {0}: idx + 1
+msgid "Sample {0}"
+msgstr "Sample {0}"
+
msgid "Sample Size"
msgstr "Sample Size"
@@ -7565,8 +7575,12 @@ msgstr "State / Province"
#. placeholder {0}: lotEntities.length
#. placeholder {1}: Math.max(0, lotEntities.length - inspected)
-msgid "Statistical acceptance failed, so the entire lot is considered non-conforming (ISO 9001:2015 §8.7). All {0} entities — {passes} sampled pass(es), {fails} failure(s), and {1} un-inspected — will be marked Rejected. An NCR will be opened automatically for MRB disposition."
-msgstr "Statistical acceptance failed, so the entire lot is considered non-conforming (ISO 9001:2015 §8.7). All {0} entities — {passes} sampled pass(es), {fails} failure(s), and {1} un-inspected — will be marked Rejected. An NCR will be opened automatically for MRB disposition."
+msgid "Statistical acceptance failed, so the entire lot is considered non-conforming (ISO 9001:2015 §8.7). All {0} entities — {passes} sampled pass(es), {fails} failure(s), and {1} un-inspected — will be marked Rejected."
+msgstr "Statistical acceptance failed, so the entire lot is considered non-conforming (ISO 9001:2015 §8.7). All {0} entities — {passes} sampled pass(es), {fails} failure(s), and {1} un-inspected — will be marked Rejected."
+
+#. placeholder {0}: inspection.lotSize
+msgid "Statistical acceptance failed, so the entire lot of {0} is considered non-conforming (ISO 9001:2015 §8.7) — {passes} sampled pass(es) and {fails} failure(s)."
+msgstr "Statistical acceptance failed, so the entire lot of {0} is considered non-conforming (ISO 9001:2015 §8.7) — {passes} sampled pass(es) and {fails} failure(s)."
msgid "Status"
msgstr "Status"
@@ -7929,8 +7943,14 @@ msgstr "The following line items are missing prices or lead times:"
msgid "The latest date to place this PO so it arrives by the need-by date, given the supplier's lead time."
msgstr "The latest date to place this PO so it arrives by the need-by date, given the supplier's lead time."
-msgid "The lot will still be rejected, but an NCR cannot be auto-created until at least one Issue Type is configured."
-msgstr "The lot will still be rejected, but an NCR cannot be auto-created until at least one Issue Type is configured."
+msgid "The lot stays open so you can keep inspecting and disposition later. Sampled outcomes are preserved."
+msgstr "The lot stays open so you can keep inspecting and disposition later. Sampled outcomes are preserved."
+
+msgid "The lot will be marked Passed. {fails} sampled failure(s) are recorded for your records."
+msgstr "The lot will be marked Passed. {fails} sampled failure(s) are recorded for your records."
+
+msgid "The lot will still be rejected, but an NCR cannot be created until at least one Issue Type is configured."
+msgstr "The lot will still be rejected, but an NCR cannot be created until at least one Issue Type is configured."
msgid "The new version number of the method"
msgstr "The new version number of the method"
diff --git a/packages/locale/locales/es/erp.po b/packages/locale/locales/es/erp.po
index 1162ac4d83..4294835719 100644
--- a/packages/locale/locales/es/erp.po
+++ b/packages/locale/locales/es/erp.po
@@ -5546,6 +5546,9 @@ msgstr "Abrir"
msgid "Open Actions"
msgstr "Acciones Abiertas"
+msgid "Open an NCR for MRB disposition"
+msgstr "Abrir un NCR para disposición de MRB"
+
msgid "Open Audit Log"
msgstr "Abrir Registro de Auditoría"
@@ -6466,6 +6469,9 @@ msgstr "Registro"
msgid "Record deleted"
msgstr "Registro eliminado"
+msgid "Record the inspection result for this sample."
+msgstr "Registre el resultado de la inspección para esta muestra."
+
msgid "Records"
msgstr "Registros"
@@ -6866,6 +6872,10 @@ msgstr "Ingresos de Ventas"
msgid "Sample"
msgstr "Muestra"
+#. placeholder {0}: idx + 1
+msgid "Sample {0}"
+msgstr "Muestra {0}"
+
msgid "Sample Size"
msgstr "Tamaño de Muestra"
@@ -7565,8 +7575,12 @@ msgstr "Estado / Provincia"
#. placeholder {0}: lotEntities.length
#. placeholder {1}: Math.max(0, lotEntities.length - inspected)
-msgid "Statistical acceptance failed, so the entire lot is considered non-conforming (ISO 9001:2015 §8.7). All {0} entities — {passes} sampled pass(es), {fails} failure(s), and {1} un-inspected — will be marked Rejected. An NCR will be opened automatically for MRB disposition."
-msgstr "La aceptación estadística falló, por lo que el lote completo se considera no conforme (ISO 9001:2015 §8.7). Todas las {0} entidades — {passes} muestra(s) aprobada(s), {fails} falla(s) y {1} sin inspeccionar — se marcarán como Rechazadas. Un NCR se abrirá automáticamente para disposición de MRB."
+msgid "Statistical acceptance failed, so the entire lot is considered non-conforming (ISO 9001:2015 §8.7). All {0} entities — {passes} sampled pass(es), {fails} failure(s), and {1} un-inspected — will be marked Rejected."
+msgstr "La aceptación estadística falló, por lo que el lote completo se considera no conforme (ISO 9001:2015 §8.7). Todas las {0} entidades — {passes} muestra(s) aprobada(s), {fails} falla(s) y {1} sin inspeccionar — serán marcadas como Rechazadas."
+
+#. placeholder {0}: inspection.lotSize
+msgid "Statistical acceptance failed, so the entire lot of {0} is considered non-conforming (ISO 9001:2015 §8.7) — {passes} sampled pass(es) and {fails} failure(s)."
+msgstr "La aceptación estadística falló, por lo que el lote completo de {0} se considera no conforme (ISO 9001:2015 §8.7) — {passes} muestra(s) aceptada(s) y {fails} falla(s)."
msgid "Status"
msgstr "Estado"
@@ -7929,8 +7943,14 @@ msgstr "Los siguientes artículos de línea no tienen precios ni tiempos de entr
msgid "The latest date to place this PO so it arrives by the need-by date, given the supplier's lead time."
msgstr "La fecha más reciente para realizar este PO de modo que llegue en la fecha requerida, considerando el tiempo de entrega del proveedor."
-msgid "The lot will still be rejected, but an NCR cannot be auto-created until at least one Issue Type is configured."
-msgstr "El lote seguirá siendo rechazado, pero no se puede crear automáticamente un NCR hasta que se configure al menos un tipo de problema."
+msgid "The lot stays open so you can keep inspecting and disposition later. Sampled outcomes are preserved."
+msgstr "El lote permanece abierto para que puedas seguir inspeccionando y disponer más tarde. Los resultados muestreados se conservan."
+
+msgid "The lot will be marked Passed. {fails} sampled failure(s) are recorded for your records."
+msgstr "El lote será marcado como Aprobado. {fails} fallo(s) muestreado(s) se registran para sus registros."
+
+msgid "The lot will still be rejected, but an NCR cannot be created until at least one Issue Type is configured."
+msgstr "El lote seguirá siendo rechazado, pero no se puede crear un NCR hasta que se configure al menos un tipo de problema."
msgid "The new version number of the method"
msgstr "El nuevo número de versión del método"
diff --git a/packages/locale/locales/fr/erp.po b/packages/locale/locales/fr/erp.po
index 187456f300..414294ef80 100644
--- a/packages/locale/locales/fr/erp.po
+++ b/packages/locale/locales/fr/erp.po
@@ -5546,6 +5546,9 @@ msgstr "Ouvrir"
msgid "Open Actions"
msgstr "Actions ouvertes"
+msgid "Open an NCR for MRB disposition"
+msgstr "Ouvrir un NCR pour la disposition MRB"
+
msgid "Open Audit Log"
msgstr "Ouvrir le journal d'audit"
@@ -6466,6 +6469,9 @@ msgstr "Enregistrer"
msgid "Record deleted"
msgstr "Enregistrement supprimé"
+msgid "Record the inspection result for this sample."
+msgstr "Enregistrez le résultat de l'inspection pour cet échantillon."
+
msgid "Records"
msgstr "Enregistrements"
@@ -6866,6 +6872,10 @@ msgstr "Chiffre d'affaires"
msgid "Sample"
msgstr "Échantillon"
+#. placeholder {0}: idx + 1
+msgid "Sample {0}"
+msgstr "Échantillon {0}"
+
msgid "Sample Size"
msgstr "Taille de l'échantillon"
@@ -7565,8 +7575,12 @@ msgstr "État / Province"
#. placeholder {0}: lotEntities.length
#. placeholder {1}: Math.max(0, lotEntities.length - inspected)
-msgid "Statistical acceptance failed, so the entire lot is considered non-conforming (ISO 9001:2015 §8.7). All {0} entities — {passes} sampled pass(es), {fails} failure(s), and {1} un-inspected — will be marked Rejected. An NCR will be opened automatically for MRB disposition."
-msgstr "L'acceptation statistique a échoué, de sorte que l'ensemble du lot est considéré comme non conforme (ISO 9001:2015 §8.7). Toutes les {0} entités — {passes} passage(s) échantillonné(s), {fails} défaillance(s) et {1} non inspectée(s) — seront marquées comme Rejetées. Un NCR sera ouvert automatiquement pour la disposition du MRB."
+msgid "Statistical acceptance failed, so the entire lot is considered non-conforming (ISO 9001:2015 §8.7). All {0} entities — {passes} sampled pass(es), {fails} failure(s), and {1} un-inspected — will be marked Rejected."
+msgstr "L'acceptation statistique a échoué, de sorte que l'ensemble du lot est considéré comme non-conforme (ISO 9001:2015 §8.7). Toutes les {0} entités — {passes} passage(s) échantillonné(s), {fails} défaut(s) et {1} non inspectés — seront marqués comme Rejetés."
+
+#. placeholder {0}: inspection.lotSize
+msgid "Statistical acceptance failed, so the entire lot of {0} is considered non-conforming (ISO 9001:2015 §8.7) — {passes} sampled pass(es) and {fails} failure(s)."
+msgstr "L'acceptation statistique a échoué, donc l'ensemble du lot de {0} est considéré comme non-conforme (ISO 9001:2015 §8.7) — {passes} passage(s) échantillonné(s) et {fails} défaut(s)."
msgid "Status"
msgstr "Statut"
@@ -7929,8 +7943,14 @@ msgstr "Les articles de ligne suivants n'ont pas de prix ou de délais de livrai
msgid "The latest date to place this PO so it arrives by the need-by date, given the supplier's lead time."
msgstr "La date limite pour passer cette commande afin qu'elle arrive à la date requise, compte tenu du délai de livraison du fournisseur."
-msgid "The lot will still be rejected, but an NCR cannot be auto-created until at least one Issue Type is configured."
-msgstr "Le lot sera toujours rejeté, mais une NCR ne peut pas être créée automatiquement tant qu'au moins un type de problème n'est pas configuré."
+msgid "The lot stays open so you can keep inspecting and disposition later. Sampled outcomes are preserved."
+msgstr "Le lot reste ouvert pour que vous puissiez continuer l'inspection et disposer plus tard. Les résultats d'échantillonnage sont conservés."
+
+msgid "The lot will be marked Passed. {fails} sampled failure(s) are recorded for your records."
+msgstr "Le lot sera marqué comme Accepté. {fails} défaut(s) échantillonné(s) sont enregistrés pour vos dossiers."
+
+msgid "The lot will still be rejected, but an NCR cannot be created until at least one Issue Type is configured."
+msgstr "Le lot sera toujours rejeté, mais un NCR ne peut pas être créé tant qu'au moins un type de problème n'est pas configuré."
msgid "The new version number of the method"
msgstr "Le nouveau numéro de version de la méthode"
diff --git a/packages/locale/locales/hi/erp.po b/packages/locale/locales/hi/erp.po
index ee62b9cd61..6abcceace0 100644
--- a/packages/locale/locales/hi/erp.po
+++ b/packages/locale/locales/hi/erp.po
@@ -5546,6 +5546,9 @@ msgstr "खोलें"
msgid "Open Actions"
msgstr "खुली कार्रवाइयाँ"
+msgid "Open an NCR for MRB disposition"
+msgstr "MRB निपटान के लिए एक NCR खोलें"
+
msgid "Open Audit Log"
msgstr "ऑडिट लॉग खोलें"
@@ -6466,6 +6469,9 @@ msgstr "रिकॉर्ड करें"
msgid "Record deleted"
msgstr "रिकॉर्ड हटाया गया"
+msgid "Record the inspection result for this sample."
+msgstr "इस नमूने के लिए निरीक्षण परिणाम दर्ज करें।"
+
msgid "Records"
msgstr "रिकॉर्ड"
@@ -6866,6 +6872,10 @@ msgstr "बिक्रय राजस्व"
msgid "Sample"
msgstr "नमूना"
+#. placeholder {0}: idx + 1
+msgid "Sample {0}"
+msgstr "नमूना {0}"
+
msgid "Sample Size"
msgstr "नमूना आकार"
@@ -7565,8 +7575,12 @@ msgstr "राज्य / प्रांत"
#. placeholder {0}: lotEntities.length
#. placeholder {1}: Math.max(0, lotEntities.length - inspected)
-msgid "Statistical acceptance failed, so the entire lot is considered non-conforming (ISO 9001:2015 §8.7). All {0} entities — {passes} sampled pass(es), {fails} failure(s), and {1} un-inspected — will be marked Rejected. An NCR will be opened automatically for MRB disposition."
-msgstr "सांख्यिकीय स्वीकृति विफल हुई, इसलिए पूरा लॉट गैर-अनुरूप माना जाता है (ISO 9001:2015 §8.7)। सभी {0} इकाइयां — {passes} नमूना पास, {fails} विफलता(एं), और {1} निरीक्षण न किए गए — को अस्वीकृत के रूप में चिह्नित किया जाएगा। एक NCR स्वचालित रूप से MRB निपटान के लिए खोला जाएगा।"
+msgid "Statistical acceptance failed, so the entire lot is considered non-conforming (ISO 9001:2015 §8.7). All {0} entities — {passes} sampled pass(es), {fails} failure(s), and {1} un-inspected — will be marked Rejected."
+msgstr "सांख्यिकीय स्वीकृति विफल हुई, इसलिए पूरा लॉट गैर-अनुरूप माना जाता है (ISO 9001:2015 §8.7)। सभी {0} इकाइयां — {passes} नमूना पास, {fails} विफलता(एं), और {1} निरीक्षण न किए गए — को अस्वीकृत के रूप में चिह्नित किया जाएगा।"
+
+#. placeholder {0}: inspection.lotSize
+msgid "Statistical acceptance failed, so the entire lot of {0} is considered non-conforming (ISO 9001:2015 §8.7) — {passes} sampled pass(es) and {fails} failure(s)."
+msgstr "सांख्यिकीय स्वीकृति विफल हुई, इसलिए {0} का पूरा लॉट गैर-अनुरूप माना जाता है (ISO 9001:2015 §8.7) — {passes} नमूना पास और {fails} विफलता(एं)।"
msgid "Status"
msgstr "स्थिति"
@@ -7929,8 +7943,14 @@ msgstr "निम्नलिखित लाइन आइटम कीमते
msgid "The latest date to place this PO so it arrives by the need-by date, given the supplier's lead time."
msgstr "इस PO को रखने की नवीनतम तारीख ताकि यह आवश्यकता की तारीख तक पहुंचे, आपूर्तिकर्ता के लीड समय को देखते हुए।"
-msgid "The lot will still be rejected, but an NCR cannot be auto-created until at least one Issue Type is configured."
-msgstr "लॉट अभी भी अस्वीकार कर दिया जाएगा, लेकिन कम से कम एक Issue Type कॉन्फ़िगर होने तक NCR स्वचालित रूप से नहीं बनाया जा सकता।"
+msgid "The lot stays open so you can keep inspecting and disposition later. Sampled outcomes are preserved."
+msgstr "लॉट खुला रहता है ताकि आप निरीक्षण जारी रख सकें और बाद में निपटान कर सकें। नमूने के परिणाम संरक्षित रहते हैं।"
+
+msgid "The lot will be marked Passed. {fails} sampled failure(s) are recorded for your records."
+msgstr "लॉट को पास के रूप में चिह्नित किया जाएगा। {fails} नमूना विफलता(एं) आपके रिकॉर्ड के लिए दर्ज की गई हैं।"
+
+msgid "The lot will still be rejected, but an NCR cannot be created until at least one Issue Type is configured."
+msgstr "लॉट अभी भी अस्वीकृत कर दिया जाएगा, लेकिन कम से कम एक Issue Type कॉन्फ़िगर होने तक NCR नहीं बनाया जा सकता।"
msgid "The new version number of the method"
msgstr "विधि का नया संस्करण संख्या"
diff --git a/packages/locale/locales/it/erp.po b/packages/locale/locales/it/erp.po
index d4438cefd5..97efea06ea 100644
--- a/packages/locale/locales/it/erp.po
+++ b/packages/locale/locales/it/erp.po
@@ -5546,6 +5546,9 @@ msgstr "Apri"
msgid "Open Actions"
msgstr "Azioni Aperte"
+msgid "Open an NCR for MRB disposition"
+msgstr "Apri un NCR per la disposizione MRB"
+
msgid "Open Audit Log"
msgstr "Apri Registro di Audit"
@@ -6466,6 +6469,9 @@ msgstr "Registra"
msgid "Record deleted"
msgstr "Record eliminato"
+msgid "Record the inspection result for this sample."
+msgstr "Registra il risultato dell'ispezione per questo campione."
+
msgid "Records"
msgstr "Registri"
@@ -6866,6 +6872,10 @@ msgstr "Ricavi di vendita"
msgid "Sample"
msgstr "Campione"
+#. placeholder {0}: idx + 1
+msgid "Sample {0}"
+msgstr "Campione {0}"
+
msgid "Sample Size"
msgstr "Dimensione del Campione"
@@ -7565,8 +7575,12 @@ msgstr "Stato / Provincia"
#. placeholder {0}: lotEntities.length
#. placeholder {1}: Math.max(0, lotEntities.length - inspected)
-msgid "Statistical acceptance failed, so the entire lot is considered non-conforming (ISO 9001:2015 §8.7). All {0} entities — {passes} sampled pass(es), {fails} failure(s), and {1} un-inspected — will be marked Rejected. An NCR will be opened automatically for MRB disposition."
-msgstr "L'accettazione statistica è fallita, quindi l'intero lotto è considerato non conforme (ISO 9001:2015 §8.7). Tutte le {0} entità — {passes} campione(i) superato(i), {fails} guasto(i) e {1} non ispezionato(i) — saranno contrassegnate come Rifiutate. Un NCR verrà aperto automaticamente per la disposizione MRB."
+msgid "Statistical acceptance failed, so the entire lot is considered non-conforming (ISO 9001:2015 §8.7). All {0} entities — {passes} sampled pass(es), {fails} failure(s), and {1} un-inspected — will be marked Rejected."
+msgstr "L'accettazione statistica è fallita, quindi l'intero lotto è considerato non conforme (ISO 9001:2015 §8.7). Tutte le {0} entità — {passes} campione(i) approvato(i), {fails} difetto(i) e {1} non ispezionato(i) — saranno contrassegnate come Rifiutate."
+
+#. placeholder {0}: inspection.lotSize
+msgid "Statistical acceptance failed, so the entire lot of {0} is considered non-conforming (ISO 9001:2015 §8.7) — {passes} sampled pass(es) and {fails} failure(s)."
+msgstr "L'accettazione statistica non è riuscita, quindi l'intero lotto di {0} è considerato non conforme (ISO 9001:2015 §8.7) — {passes} campione(i) accettato(i) e {fails} difetto(i)."
msgid "Status"
msgstr "Stato"
@@ -7929,8 +7943,14 @@ msgstr "I seguenti articoli di riga non hanno prezzi o tempi di consegna:"
msgid "The latest date to place this PO so it arrives by the need-by date, given the supplier's lead time."
msgstr "La data più recente per effettuare questo ordine in modo che arrivi entro la data richiesta, considerando il lead time del fornitore."
-msgid "The lot will still be rejected, but an NCR cannot be auto-created until at least one Issue Type is configured."
-msgstr "Il lotto sarà comunque rifiutato, ma un NCR non può essere creato automaticamente fino a quando non è configurato almeno un tipo di problema."
+msgid "The lot stays open so you can keep inspecting and disposition later. Sampled outcomes are preserved."
+msgstr "Il lotto rimane aperto in modo da poter continuare l'ispezione e la disposizione in seguito. I risultati campionati vengono conservati."
+
+msgid "The lot will be marked Passed. {fails} sampled failure(s) are recorded for your records."
+msgstr "Il lotto sarà contrassegnato come Superato. {fails} errore(i) campionato(i) sono registrati per i tuoi registri."
+
+msgid "The lot will still be rejected, but an NCR cannot be created until at least one Issue Type is configured."
+msgstr "Il lotto sarà comunque rifiutato, ma non è possibile creare un NCR finché non è configurato almeno un tipo di problema."
msgid "The new version number of the method"
msgstr "Il nuovo numero di versione del metodo"
diff --git a/packages/locale/locales/ja/erp.po b/packages/locale/locales/ja/erp.po
index 53afc6c798..fd8c04de4a 100644
--- a/packages/locale/locales/ja/erp.po
+++ b/packages/locale/locales/ja/erp.po
@@ -5546,6 +5546,9 @@ msgstr "開く"
msgid "Open Actions"
msgstr "オープンアクション"
+msgid "Open an NCR for MRB disposition"
+msgstr "MRB処分のためにNCRを開く"
+
msgid "Open Audit Log"
msgstr "監査ログを開く"
@@ -6466,6 +6469,9 @@ msgstr "記録"
msgid "Record deleted"
msgstr "レコード削除済み"
+msgid "Record the inspection result for this sample."
+msgstr "このサンプルの検査結果を記録してください。"
+
msgid "Records"
msgstr "記録"
@@ -6866,6 +6872,10 @@ msgstr "売上収益"
msgid "Sample"
msgstr "サンプル"
+#. placeholder {0}: idx + 1
+msgid "Sample {0}"
+msgstr "サンプル {0}"
+
msgid "Sample Size"
msgstr "サンプルサイズ"
@@ -7565,8 +7575,12 @@ msgstr "都道府県"
#. placeholder {0}: lotEntities.length
#. placeholder {1}: Math.max(0, lotEntities.length - inspected)
-msgid "Statistical acceptance failed, so the entire lot is considered non-conforming (ISO 9001:2015 §8.7). All {0} entities — {passes} sampled pass(es), {fails} failure(s), and {1} un-inspected — will be marked Rejected. An NCR will be opened automatically for MRB disposition."
-msgstr "統計的受け入れに失敗したため、ロット全体が不適合と見なされます(ISO 9001:2015 §8.7)。すべての{0}個のエンティティ — {passes}個のサンプル合格品、{fails}個の不良品、および{1}個の未検査品 — は「却下」とマークされます。NCRは自動的にMRB処置のために開かれます。"
+msgid "Statistical acceptance failed, so the entire lot is considered non-conforming (ISO 9001:2015 §8.7). All {0} entities — {passes} sampled pass(es), {fails} failure(s), and {1} un-inspected — will be marked Rejected."
+msgstr "統計的受け入れに失敗したため、ロット全体が不適合と見なされます(ISO 9001:2015 §8.7)。すべての{0}個のエンティティ — {passes}個のサンプル合格、{fails}個の不合格、および{1}個の未検査 — は却下とマークされます。"
+
+#. placeholder {0}: inspection.lotSize
+msgid "Statistical acceptance failed, so the entire lot of {0} is considered non-conforming (ISO 9001:2015 §8.7) — {passes} sampled pass(es) and {fails} failure(s)."
+msgstr "統計的受け入れに失敗したため、{0}の全ロットは不適合と見なされます(ISO 9001:2015 §8.7) — {passes}件のサンプル合格と{fails}件の不合格です。"
msgid "Status"
msgstr "ステータス"
@@ -7929,8 +7943,14 @@ msgstr "以下の行項目は価格またはリードタイムが不足してい
msgid "The latest date to place this PO so it arrives by the need-by date, given the supplier's lead time."
msgstr "このPOを発注して、サプライヤーのリードタイムを考慮した上で、必要日までに到着するための最遅発注日です。"
-msgid "The lot will still be rejected, but an NCR cannot be auto-created until at least one Issue Type is configured."
-msgstr "ロットは引き続き却下されますが、少なくとも1つの問題タイプが設定されるまでNCRは自動作成できません。"
+msgid "The lot stays open so you can keep inspecting and disposition later. Sampled outcomes are preserved."
+msgstr "ロットは開いたままなので、検査を続けて後で処分できます。サンプリングされた結果は保持されます。"
+
+msgid "The lot will be marked Passed. {fails} sampled failure(s) are recorded for your records."
+msgstr "ロットは合格とマークされます。{fails}件のサンプル不良が記録されます。"
+
+msgid "The lot will still be rejected, but an NCR cannot be created until at least one Issue Type is configured."
+msgstr "ロットは引き続き却下されますが、少なくとも1つの問題タイプが設定されるまでNCRを作成することはできません。"
msgid "The new version number of the method"
msgstr "メソッドの新しいバージョン番号"
diff --git a/packages/locale/locales/pl/erp.po b/packages/locale/locales/pl/erp.po
index 02792805e4..820310847b 100644
--- a/packages/locale/locales/pl/erp.po
+++ b/packages/locale/locales/pl/erp.po
@@ -5546,6 +5546,9 @@ msgstr "Otwórz"
msgid "Open Actions"
msgstr "Otwarte Działania"
+msgid "Open an NCR for MRB disposition"
+msgstr "Otwórz NCR do dyspozycji MRB"
+
msgid "Open Audit Log"
msgstr "Otwórz dziennik audytu"
@@ -6466,6 +6469,9 @@ msgstr "Nagrywaj"
msgid "Record deleted"
msgstr "Rekord usunięty"
+msgid "Record the inspection result for this sample."
+msgstr "Zarejestruj wynik inspekcji dla tej próbki."
+
msgid "Records"
msgstr "Rekordy"
@@ -6866,6 +6872,10 @@ msgstr "Przychód ze sprzedaży"
msgid "Sample"
msgstr "Próbka"
+#. placeholder {0}: idx + 1
+msgid "Sample {0}"
+msgstr "Próbka {0}"
+
msgid "Sample Size"
msgstr "Rozmiar próbki"
@@ -7565,8 +7575,12 @@ msgstr "Stan / Prowincja"
#. placeholder {0}: lotEntities.length
#. placeholder {1}: Math.max(0, lotEntities.length - inspected)
-msgid "Statistical acceptance failed, so the entire lot is considered non-conforming (ISO 9001:2015 §8.7). All {0} entities — {passes} sampled pass(es), {fails} failure(s), and {1} un-inspected — will be marked Rejected. An NCR will be opened automatically for MRB disposition."
-msgstr "Akceptacja statystyczna nie powiodła się, dlatego cała partia jest uważana za niezgodną (ISO 9001:2015 §8.7). Wszystkie {0} jednostki — {passes} przebadane przejście(cia), {fails} niepowodzenie(nia) i {1} niezbadane — zostaną oznaczone jako Odrzucone. NCR zostanie otwarty automatycznie do dyspozycji MRB."
+msgid "Statistical acceptance failed, so the entire lot is considered non-conforming (ISO 9001:2015 §8.7). All {0} entities — {passes} sampled pass(es), {fails} failure(s), and {1} un-inspected — will be marked Rejected."
+msgstr "Akceptacja statystyczna nie powiodła się, dlatego cała partia jest uważana za niezgodną (ISO 9001:2015 §8.7). Wszystkie {0} jednostki — {passes} przebadane pozytywnie, {fails} niepowodzenie(nia) i {1} niezbadane — zostaną oznaczone jako Odrzucone."
+
+#. placeholder {0}: inspection.lotSize
+msgid "Statistical acceptance failed, so the entire lot of {0} is considered non-conforming (ISO 9001:2015 §8.7) — {passes} sampled pass(es) and {fails} failure(s)."
+msgstr "Akceptacja statystyczna nie powiodła się, dlatego cała partia {0} jest uważana za niezgodną (ISO 9001:2015 §8.7) — {passes} przebadanych pozytywnie i {fails} niepowodzenie(ń)."
msgid "Status"
msgstr "Status"
@@ -7929,8 +7943,14 @@ msgstr "Następujące pozycje linii nie mają cen lub czasów realizacji:"
msgid "The latest date to place this PO so it arrives by the need-by date, given the supplier's lead time."
msgstr "Najnowsza data złożenia tego zamówienia, aby dotarło do daty wymaganej, biorąc pod uwagę czas realizacji dostawcy."
-msgid "The lot will still be rejected, but an NCR cannot be auto-created until at least one Issue Type is configured."
-msgstr "Partia będzie nadal odrzucona, ale NCR nie może być automatycznie utworzony, dopóki nie zostanie skonfigurowany co najmniej jeden typ problemu."
+msgid "The lot stays open so you can keep inspecting and disposition later. Sampled outcomes are preserved."
+msgstr "Partia pozostaje otwarta, aby można było kontynuować inspekcję i podjąć decyzję później. Wyniki próbek są zachowywane."
+
+msgid "The lot will be marked Passed. {fails} sampled failure(s) are recorded for your records."
+msgstr "Lot zostanie oznaczony jako Zaakceptowany. {fails} próbkowanych niepowodzeń zostało zarejestrowanych dla Twoich rejestrów."
+
+msgid "The lot will still be rejected, but an NCR cannot be created until at least one Issue Type is configured."
+msgstr "Partia będzie nadal odrzucona, ale nie można utworzyć NCR, dopóki nie zostanie skonfigurowany co najmniej jeden typ problemu."
msgid "The new version number of the method"
msgstr "Nowy numer wersji metody"
diff --git a/packages/locale/locales/pt/erp.po b/packages/locale/locales/pt/erp.po
index 8047ac684c..e094e5449b 100644
--- a/packages/locale/locales/pt/erp.po
+++ b/packages/locale/locales/pt/erp.po
@@ -5546,6 +5546,9 @@ msgstr "Abrir"
msgid "Open Actions"
msgstr "Ações Abertas"
+msgid "Open an NCR for MRB disposition"
+msgstr "Abrir um NCR para disposição de MRB"
+
msgid "Open Audit Log"
msgstr "Abrir Registro de Auditoria"
@@ -6466,6 +6469,9 @@ msgstr "Gravar"
msgid "Record deleted"
msgstr "Registro eliminado"
+msgid "Record the inspection result for this sample."
+msgstr "Registre o resultado da inspeção para esta amostra."
+
msgid "Records"
msgstr "Registros"
@@ -6866,6 +6872,10 @@ msgstr "Receita de Vendas"
msgid "Sample"
msgstr "Amostra"
+#. placeholder {0}: idx + 1
+msgid "Sample {0}"
+msgstr "Amostra {0}"
+
msgid "Sample Size"
msgstr "Tamanho da Amostra"
@@ -7565,8 +7575,12 @@ msgstr "Estado / Província"
#. placeholder {0}: lotEntities.length
#. placeholder {1}: Math.max(0, lotEntities.length - inspected)
-msgid "Statistical acceptance failed, so the entire lot is considered non-conforming (ISO 9001:2015 §8.7). All {0} entities — {passes} sampled pass(es), {fails} failure(s), and {1} un-inspected — will be marked Rejected. An NCR will be opened automatically for MRB disposition."
-msgstr "A aceitação estatística falhou, portanto o lote inteiro é considerado não-conforme (ISO 9001:2015 §8.7). Todas as {0} entidades — {passes} amostra(s) aprovada(s), {fails} falha(s) e {1} não inspecionada(s) — serão marcadas como Rejeitadas. Um NCR será aberto automaticamente para disposição do MRB."
+msgid "Statistical acceptance failed, so the entire lot is considered non-conforming (ISO 9001:2015 §8.7). All {0} entities — {passes} sampled pass(es), {fails} failure(s), and {1} un-inspected — will be marked Rejected."
+msgstr "A aceitação estatística falhou, portanto o lote inteiro é considerado não-conforme (ISO 9001:2015 §8.7). Todas as {0} entidades — {passes} amostra(s) aprovada(s), {fails} falha(s) e {1} não inspecionada(s) — serão marcadas como Rejeitadas."
+
+#. placeholder {0}: inspection.lotSize
+msgid "Statistical acceptance failed, so the entire lot of {0} is considered non-conforming (ISO 9001:2015 §8.7) — {passes} sampled pass(es) and {fails} failure(s)."
+msgstr "A aceitação estatística falhou, portanto o lote inteiro de {0} é considerado não-conforme (ISO 9001:2015 §8.7) — {passes} amostra(s) aprovada(s) e {fails} falha(s)."
msgid "Status"
msgstr "Estado"
@@ -7929,8 +7943,14 @@ msgstr "Os seguintes itens de linha estão faltando preços ou prazos de entrega
msgid "The latest date to place this PO so it arrives by the need-by date, given the supplier's lead time."
msgstr "A data mais tardia para fazer este PO para que chegue até a data de necessidade, considerando o prazo de entrega do fornecedor."
-msgid "The lot will still be rejected, but an NCR cannot be auto-created until at least one Issue Type is configured."
-msgstr "O lote ainda será rejeitado, mas um NCR não pode ser criado automaticamente até que pelo menos um Tipo de Problema seja configurado."
+msgid "The lot stays open so you can keep inspecting and disposition later. Sampled outcomes are preserved."
+msgstr "O lote permanece aberto para que você possa continuar inspecionando e disposicionando posteriormente. Os resultados das amostras são preservados."
+
+msgid "The lot will be marked Passed. {fails} sampled failure(s) are recorded for your records."
+msgstr "O lote será marcado como Aprovado. {fails} falha(s) amostrada(s) são registradas para seus registros."
+
+msgid "The lot will still be rejected, but an NCR cannot be created until at least one Issue Type is configured."
+msgstr "O lote ainda será rejeitado, mas um NCR não pode ser criado até que pelo menos um Tipo de Problema seja configurado."
msgid "The new version number of the method"
msgstr "O novo número de versão do método"
diff --git a/packages/locale/locales/ru/erp.po b/packages/locale/locales/ru/erp.po
index 6d373d8b87..2482ccfeaa 100644
--- a/packages/locale/locales/ru/erp.po
+++ b/packages/locale/locales/ru/erp.po
@@ -5546,6 +5546,9 @@ msgstr "Открыть"
msgid "Open Actions"
msgstr "Открытые действия"
+msgid "Open an NCR for MRB disposition"
+msgstr "Открыть NCR для диспозиции MRB"
+
msgid "Open Audit Log"
msgstr "Открыть журнал аудита"
@@ -6466,6 +6469,9 @@ msgstr "Записать"
msgid "Record deleted"
msgstr "Запись удалена"
+msgid "Record the inspection result for this sample."
+msgstr "Запишите результат проверки для этого образца."
+
msgid "Records"
msgstr "Записи"
@@ -6866,6 +6872,10 @@ msgstr "Выручка от продаж"
msgid "Sample"
msgstr "Образец"
+#. placeholder {0}: idx + 1
+msgid "Sample {0}"
+msgstr "Образец {0}"
+
msgid "Sample Size"
msgstr "Размер выборки"
@@ -7565,8 +7575,12 @@ msgstr "Штат / Провинция"
#. placeholder {0}: lotEntities.length
#. placeholder {1}: Math.max(0, lotEntities.length - inspected)
-msgid "Statistical acceptance failed, so the entire lot is considered non-conforming (ISO 9001:2015 §8.7). All {0} entities — {passes} sampled pass(es), {fails} failure(s), and {1} un-inspected — will be marked Rejected. An NCR will be opened automatically for MRB disposition."
-msgstr "Статистическая приемка не прошла, поэтому вся партия считается несоответствующей (ISO 9001:2015 §8.7). Все {0} единиц — {passes} проверенных прошедших, {fails} отказов и {1} непроверенных — будут отмечены как Отклонено. NCR будет открыт автоматически для диспозиции MRB."
+msgid "Statistical acceptance failed, so the entire lot is considered non-conforming (ISO 9001:2015 §8.7). All {0} entities — {passes} sampled pass(es), {fails} failure(s), and {1} un-inspected — will be marked Rejected."
+msgstr "Статистическая приемка не пройдена, поэтому вся партия считается несоответствующей (ISO 9001:2015 §8.7). Все {0} объектов — {passes} проверенных прошедших, {fails} отказов и {1} непроверенных — будут отмечены как отклоненные."
+
+#. placeholder {0}: inspection.lotSize
+msgid "Statistical acceptance failed, so the entire lot of {0} is considered non-conforming (ISO 9001:2015 §8.7) — {passes} sampled pass(es) and {fails} failure(s)."
+msgstr "Статистическая приемка не пройдена, поэтому вся партия из {0} считается несоответствующей (ISO 9001:2015 §8.7) — {passes} проверенных прошедших и {fails} отказов."
msgid "Status"
msgstr "Статус"
@@ -7929,8 +7943,14 @@ msgstr "Следующие позиции отсутствуют цены или
msgid "The latest date to place this PO so it arrives by the need-by date, given the supplier's lead time."
msgstr "Последняя дата размещения этого заказа, чтобы он прибыл к требуемой дате, учитывая время доставки поставщика."
-msgid "The lot will still be rejected, but an NCR cannot be auto-created until at least one Issue Type is configured."
-msgstr "Партия все еще будет отклонена, но NCR не может быть автоматически создана до тех пор, пока не будет настроен хотя бы один тип проблемы."
+msgid "The lot stays open so you can keep inspecting and disposition later. Sampled outcomes are preserved."
+msgstr "Партия остается открытой, чтобы вы могли продолжить проверку и принять решение позже. Результаты выборки сохраняются."
+
+msgid "The lot will be marked Passed. {fails} sampled failure(s) are recorded for your records."
+msgstr "Партия будет отмечена как принята. {fails} образец(ов) с дефектом(и) записан(ы) для ваших записей."
+
+msgid "The lot will still be rejected, but an NCR cannot be created until at least one Issue Type is configured."
+msgstr "Партия все еще будет отклонена, но NCR не может быть создана до тех пор, пока не будет настроен хотя бы один тип проблемы."
msgid "The new version number of the method"
msgstr "Номер новой версии метода"
diff --git a/packages/locale/locales/zh/erp.po b/packages/locale/locales/zh/erp.po
index adda232d5d..2c43887091 100644
--- a/packages/locale/locales/zh/erp.po
+++ b/packages/locale/locales/zh/erp.po
@@ -5546,6 +5546,9 @@ msgstr "打开"
msgid "Open Actions"
msgstr "开放操作"
+msgid "Open an NCR for MRB disposition"
+msgstr "为MRB处置打开NCR"
+
msgid "Open Audit Log"
msgstr "打开审计日志"
@@ -6466,6 +6469,9 @@ msgstr "录音"
msgid "Record deleted"
msgstr "记录已删除"
+msgid "Record the inspection result for this sample."
+msgstr "记录此样本的检验结果。"
+
msgid "Records"
msgstr "记录"
@@ -6866,6 +6872,10 @@ msgstr "销售收入"
msgid "Sample"
msgstr "样本"
+#. placeholder {0}: idx + 1
+msgid "Sample {0}"
+msgstr "样本 {0}"
+
msgid "Sample Size"
msgstr "样本量"
@@ -7565,8 +7575,12 @@ msgstr "州/省"
#. placeholder {0}: lotEntities.length
#. placeholder {1}: Math.max(0, lotEntities.length - inspected)
-msgid "Statistical acceptance failed, so the entire lot is considered non-conforming (ISO 9001:2015 §8.7). All {0} entities — {passes} sampled pass(es), {fails} failure(s), and {1} un-inspected — will be marked Rejected. An NCR will be opened automatically for MRB disposition."
-msgstr "统计验收失败,因此整个批次被视为不符合要求 (ISO 9001:2015 §8.7)。所有 {0} 个实体 — {passes} 个抽样合格品、{fails} 个不合格品和 {1} 个未检验品 — 将被标记为已拒收。不符合项报告 (NCR) 将自动开启以供物料评审委员会 (MRB) 处置。"
+msgid "Statistical acceptance failed, so the entire lot is considered non-conforming (ISO 9001:2015 §8.7). All {0} entities — {passes} sampled pass(es), {fails} failure(s), and {1} un-inspected — will be marked Rejected."
+msgstr "统计验收失败,因此整个批次被视为不符合要求 (ISO 9001:2015 §8.7)。所有 {0} 个实体 — {passes} 个抽样合格品、{fails} 个不合格品和 {1} 个未检验品 — 将被标记为拒收。"
+
+#. placeholder {0}: inspection.lotSize
+msgid "Statistical acceptance failed, so the entire lot of {0} is considered non-conforming (ISO 9001:2015 §8.7) — {passes} sampled pass(es) and {fails} failure(s)."
+msgstr "统计验收失败,因此整个批次 {0} 被视为不符合要求 (ISO 9001:2015 §8.7) — {passes} 个抽样合格品和 {fails} 个不合格品。"
msgid "Status"
msgstr "状态"
@@ -7929,8 +7943,14 @@ msgstr "以下行项目缺少价格或交货期:"
msgid "The latest date to place this PO so it arrives by the need-by date, given the supplier's lead time."
msgstr "最迟下达此采购订单的日期,以便在考虑供应商交货期的情况下按需求日期前送达。"
-msgid "The lot will still be rejected, but an NCR cannot be auto-created until at least one Issue Type is configured."
-msgstr "该批次仍将被拒收,但在至少配置一个问题类型之前,无法自动创建NCR。"
+msgid "The lot stays open so you can keep inspecting and disposition later. Sampled outcomes are preserved."
+msgstr "该批次保持开放状态,您可以继续检验并稍后进行处置。已取样的结果将被保留。"
+
+msgid "The lot will be marked Passed. {fails} sampled failure(s) are recorded for your records."
+msgstr "该批次将被标记为通过。{fails} 个抽样失败已记录在案。"
+
+msgid "The lot will still be rejected, but an NCR cannot be created until at least one Issue Type is configured."
+msgstr "该批次仍将被拒收,但在至少配置一个问题类型之前,无法创建NCR。"
msgid "The new version number of the method"
msgstr "该方法的新版本号"