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.

feat(traceability): improve readAbleId search disambiguation with job/tracking context (#778)

Siddharth Gaikwad481cc89063f2
diff --git a/apps/erp/app/modules/inventory/ui/Traceability/NodeSearchDialog.tsx b/apps/erp/app/modules/inventory/ui/Traceability/NodeSearchDialog.tsx
index 07f262eae3..ce6177c212 100644
--- a/apps/erp/app/modules/inventory/ui/Traceability/NodeSearchDialog.tsx
+++ b/apps/erp/app/modules/inventory/ui/Traceability/NodeSearchDialog.tsx
@@ -91,8 +91,11 @@ export function NodeSearchDialog({
onSelect?.(id);
return;
}
+
+ const params = new URLSearchParams();
const param = kind === "entity" ? "trackedEntityId" : "trackedActivityId";
- navigate(`/x/traceability/graph?${param}=${encodeURIComponent(id)}`);
+ params.set(param, id);
+ navigate(`/x/traceability/graph?${params.toString()}`);
}
const isLoading = fetcher.state !== "idle";
@@ -100,7 +103,7 @@ export function NodeSearchDialog({
return (
<CommandDialog open={open} onOpenChange={onOpenChange}>
<CommandInput
- placeholder="Search entities, activities, status, source doc..."
+ placeholder="Search entities, activities, status, source doc, tracking ID..."
value={query}
onValueChange={setQuery}
/>
diff --git a/apps/erp/app/modules/inventory/ui/Traceability/TraceabilityGraph.tsx b/apps/erp/app/modules/inventory/ui/Traceability/TraceabilityGraph.tsx
index f8e1e2d105..47620cc6f8 100644
--- a/apps/erp/app/modules/inventory/ui/Traceability/TraceabilityGraph.tsx
+++ b/apps/erp/app/modules/inventory/ui/Traceability/TraceabilityGraph.tsx
@@ -14,7 +14,6 @@ import {
useNodesState,
useReactFlow
} from "@xyflow/react";
-import "@xyflow/react/dist/style.css";
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
import { LuX } from "react-icons/lu";
import { useNavigate, useSearchParams } from "react-router";
diff --git a/apps/erp/app/routes/api+/traceability.search.test.ts b/apps/erp/app/routes/api+/traceability.search.test.ts
new file mode 100644
index 0000000000..5702236b23
--- /dev/null
+++ b/apps/erp/app/routes/api+/traceability.search.test.ts
@@ -0,0 +1,65 @@
+import { requirePermissions } from "@carbon/auth/auth.server";
+import { describe, expect, it, vi } from "vitest";
+import { loader } from "./traceability.search";
+
+vi.mock("@carbon/auth/auth.server", () => ({
+ requirePermissions: vi.fn()
+}));
+
+describe("traceability search loader", () => {
+ it("returns tracked entity readableId without querying job readable ids", async () => {
+ const entityQuery = createQuery([
+ {
+ id: "tracked-entity-1",
+ readableId: "TRK-0001",
+ attributes: { Job: "job-uuid-1" }
+ }
+ ]);
+ const activityQuery = createQuery([]);
+ const from = vi.fn((table: string) => {
+ if (table === "trackedEntity") return entityQuery;
+ if (table === "trackedActivity") return activityQuery;
+ throw new Error(`Unexpected table query: ${table}`);
+ });
+
+ vi.mocked(requirePermissions).mockResolvedValue({
+ client: { from },
+ companyId: "company-1"
+ } as any);
+
+ const response = await loader({
+ request: new Request(
+ "http://localhost/api/traceability.search?q=TRK&kind=entity"
+ )
+ } as any);
+ const body = await response.json();
+
+ expect(body.entities).toEqual([
+ {
+ id: "tracked-entity-1",
+ readableId: "TRK-0001",
+ attributes: { Job: "job-uuid-1" }
+ }
+ ]);
+ expect(body.entities[0]).not.toHaveProperty("jobId");
+ expect(body.entities[0]).not.toHaveProperty("jobReadableId");
+ expect(from).not.toHaveBeenCalledWith("job");
+ expect(entityQuery.or).toHaveBeenCalledWith(
+ "id.ilike.%TRK%,sourceDocumentReadableId.ilike.%TRK%,readableId.ilike.%TRK%"
+ );
+ });
+});
+
+function createQuery(data: unknown[]) {
+ const result = Promise.resolve({ data });
+ const query = {
+ select: vi.fn(() => query),
+ eq: vi.fn(() => query),
+ order: vi.fn(() => query),
+ limit: vi.fn(() => query),
+ or: vi.fn(() => result),
+ then: result.then.bind(result)
+ };
+
+ return query;
+}
diff --git a/apps/erp/app/routes/api+/traceability.search.ts b/apps/erp/app/routes/api+/traceability.search.ts
index 6b474b17b0..2cf960b2c6 100644
--- a/apps/erp/app/routes/api+/traceability.search.ts
+++ b/apps/erp/app/routes/api+/traceability.search.ts
@@ -35,7 +35,7 @@ export async function loader({ request }: LoaderFunctionArgs) {
.limit(50);
if (pattern) {
return query.or(
- `id.ilike.${pattern},sourceDocumentReadableId.ilike.${pattern},readableId.ilike.${pattern},attributes->>Batch Number.ilike.${pattern},attributes->>Serial Number.ilike.${pattern}`
+ `id.ilike.${pattern},sourceDocumentReadableId.ilike.${pattern},readableId.ilike.${pattern}`
);
}
return query;
diff --git a/apps/erp/app/routes/x+/traceability+/_index.tsx b/apps/erp/app/routes/x+/traceability+/_index.tsx
index 85d4361ed6..e5fb366252 100644
--- a/apps/erp/app/routes/x+/traceability+/_index.tsx
+++ b/apps/erp/app/routes/x+/traceability+/_index.tsx
@@ -134,23 +134,20 @@ export default function TraceabilityRoute() {
};
const openEntity = (entity: EntityRow) => {
+ const params = new URLSearchParams();
+
recordRecent(entity);
- navigate(
- `${path.to.traceabilityGraph}?trackedEntityId=${encodeURIComponent(entity.id)}`
- );
- };
- const openId = (id: string) => {
- navigate(
- `${path.to.traceabilityGraph}?trackedEntityId=${encodeURIComponent(id)}`
- );
+ params.set("trackedEntityId", entity.id);
+
+ navigate(`${path.to.traceabilityGraph}?${params.toString()}`);
};
return (
<SearchLandingPage
icon={LuNetwork}
heading={t`Traceability`}
- description={t`Scan a label or search by ID, serial number, or batch number.`}
+ description={t`Scan a label or search by item ID or tracking ID.`}
>
<Command
shouldFilter={false}
@@ -197,7 +194,7 @@ export default function TraceabilityRoute() {
<EntityRowItem
key={entity.id}
entity={entity}
- onSelect={() => openId(entity.id)}
+ onSelect={() => openEntity(entity)}
/>
))}
</CommandGroup>
@@ -218,17 +215,15 @@ function EntityRowItem({
const meta = entityStatusMeta(entity.status);
const Icon = meta.icon;
const headline = headlineFor(entity);
- const batch = entity.attributes?.["Batch Number"] as string | undefined;
- const serial = entity.attributes?.["Serial Number"] as string | undefined;
- const trackingHint = serial
- ? `Serial · ${serial}`
- : batch
- ? `Batch · ${batch}`
- : (entity.sourceDocument ?? entity.id.slice(0, 12));
+ const trackingHint =
+ entity.sourceDocumentReadableId ??
+ entity.sourceDocument ??
+ entity.id.slice(0, 12);
+ const trackingIdHint = entity.readableId ?? entity.id;
return (
<CommandItem
- value={`${headline} ${entity.id} ${serial ?? ""} ${batch ?? ""} ${entity.sourceDocumentReadableId ?? ""} ${entity.readableId ?? ""}`}
+ value={`${headline} ${entity.id} ${entity.sourceDocumentReadableId ?? ""} ${entity.readableId ?? ""}`}
onSelect={onSelect}
className="!py-2.5 !px-3 gap-3 cursor-pointer rounded-lg"
>
@@ -239,10 +234,17 @@ function EntityRowItem({
<Icon className="size-4 text-white drop-shadow-sm" />
</span>
<div className="flex flex-col flex-1 min-w-0 gap-0.5">
- <p className="text-sm font-medium truncate leading-5">{headline}</p>
+ <span className="block text-sm font-medium truncate leading-5">
+ {headline}
+ </span>
<p className="text-[11px] text-muted-foreground truncate leading-4">
{trackingHint}
</p>
+ <div className="flex items-center gap-1 text-[11px] text-muted-foreground leading-4 min-w-0">
+ <span className="block min-w-0 truncate">
+ {`Tracking ${trackingIdHint}`}
+ </span>
+ </div>
</div>
<HStack spacing={2} className="items-center shrink-0">
{entity.status && (
@@ -263,8 +265,6 @@ function EntityRowItem({
function headlineFor(entity: EntityRow): string {
return (
- (entity.attributes?.["Serial Number"] as string | undefined) ??
- (entity.attributes?.["Batch Number"] as string | undefined) ??
entity.sourceDocumentReadableId ??
entity.readableId ??
entity.id.slice(0, 12)
diff --git a/apps/erp/app/routes/x+/traceability+/graph.tsx b/apps/erp/app/routes/x+/traceability+/graph.tsx
index ec5067ea60..eb32aeb34f 100644
--- a/apps/erp/app/routes/x+/traceability+/graph.tsx
+++ b/apps/erp/app/routes/x+/traceability+/graph.tsx
@@ -1,18 +1,22 @@
import { requirePermissions } from "@carbon/auth/auth.server";
+import type { Database } from "@carbon/database";
import { Button, Loading, useHydrated, VStack } from "@carbon/react";
import { msg } from "@lingui/core/macro";
import { Trans } from "@lingui/react/macro";
+import type { SupabaseClient } from "@supabase/supabase-js";
import { ParentSize } from "@visx/responsive";
import { ReactFlowProvider, useReactFlow, useStore } from "@xyflow/react";
+import XYFlowStyle from "@xyflow/react/dist/style.css?url";
import { useCallback, useMemo, useState } from "react";
-import type { LoaderFunctionArgs } from "react-router";
+import type { LinksFunction, LoaderFunctionArgs } from "react-router";
import { Link, redirect, useLoaderData, useNavigation } from "react-router";
import { Empty } from "~/components";
import type { Activity, TrackedEntity } from "~/modules/inventory";
import {
fetchContainmentsForEntities,
fetchJobScopedLineage,
- fetchLineageSubgraph
+ fetchLineageSubgraph,
+ type LineagePayload
} from "~/modules/inventory/lineage.server";
import { clampDepth } from "~/modules/inventory/ui/Traceability/constants";
import { TraceabilityGraph } from "~/modules/inventory/ui/Traceability/TraceabilityGraph";
@@ -20,6 +24,10 @@ import { TraceabilitySidebar } from "~/modules/inventory/ui/Traceability/Traceab
import type { Handle } from "~/utils/handle";
import { path } from "~/utils/path";
+export const links: LinksFunction = () => [
+ { rel: "stylesheet", href: XYFlowStyle }
+];
+
export const handle: Handle = {
breadcrumb: msg`Traceability`,
to: path.to.traceability,
@@ -43,23 +51,29 @@ export async function loader({ request }: LoaderFunctionArgs) {
throw redirect(path.to.traceability);
}
- if (jobId) {
- const payload = await fetchJobScopedLineage(client, jobId, depth);
- return {
- ...payload,
- rootId: jobId,
- rootType: "job" as const,
- depth
- };
- }
-
if (trackedEntityId) {
- const payload = await fetchLineageSubgraph(
+ let payload = await fetchLineageSubgraph(
client,
trackedEntityId,
depth,
"both"
);
+ const rootEntity = payload.entities.find((e) => e.id === trackedEntityId);
+ const associatedJobId = jobId ?? getEntityJobId(rootEntity);
+
+ if (associatedJobId) {
+ const jobPayload = await fetchJobScopedLineage(
+ client,
+ associatedJobId,
+ depth
+ );
+ const jobReadableId = await getJobReadableId(client, associatedJobId);
+ payload = mergeLineagePayloads(
+ payload,
+ withJobNode(jobPayload, associatedJobId, jobReadableId)
+ );
+ }
+
const containments = await fetchContainmentsForEntities(
client,
payload.entities.map((e) => e.id)
@@ -73,6 +87,21 @@ export async function loader({ request }: LoaderFunctionArgs) {
};
}
+ if (jobId) {
+ const jobReadableId = await getJobReadableId(client, jobId);
+ const payload = withJobNode(
+ await fetchJobScopedLineage(client, jobId, depth),
+ jobId,
+ jobReadableId
+ );
+ return {
+ ...payload,
+ rootId: jobId,
+ rootType: "job" as const,
+ depth
+ };
+ }
+
// Legacy 1-hop activity-rooted view.
const [activity, directInputs, directOutputs] = await Promise.all([
client.from("trackedActivity").select("*").eq("id", trackedActivityId!),
@@ -151,6 +180,121 @@ export async function loader({ request }: LoaderFunctionArgs) {
};
}
+function getEntityJobId(entity: TrackedEntity | undefined): string | null {
+ const attrs = entity?.attributes;
+ if (!attrs || typeof attrs !== "object" || Array.isArray(attrs)) return null;
+ const job = (attrs as Record<string, unknown>).Job;
+ return typeof job === "string" && job.length > 0 ? job : null;
+}
+
+async function getJobReadableId(
+ client: SupabaseClient<Database>,
+ jobId: string
+): Promise<string> {
+ const job = await client.from("job").select("jobId").eq("id", jobId).single();
+ return job.data?.jobId ?? jobId;
+}
+
+function withJobNode(
+ payload: LineagePayload,
+ jobId: string,
+ jobReadableId: string
+): LineagePayload {
+ const jobNodeId = `job:${jobId}`;
+ const existingActivityIds = new Set(payload.activities.map((a) => a.id));
+ const existingOutputKeys = new Set(
+ payload.outputs.map((o) => `${o.trackedActivityId}:${o.trackedEntityId}`)
+ );
+ const jobEntities = payload.entities.filter((entity) => {
+ if (getEntityJobId(entity) !== jobId) return false;
+ return entity.status === "Reserved" || entity.sourceDocument === "Item";
+ });
+
+ return {
+ ...payload,
+ activities: existingActivityIds.has(jobNodeId)
+ ? payload.activities
+ : [
+ {
+ id: jobNodeId,
+ type: "Job",
+ sourceDocument: "Job",
+ sourceDocumentId: jobId,
+ sourceDocumentReadableId: jobReadableId,
+ attributes: { Job: jobId }
+ },
+ ...payload.activities
+ ],
+ outputs: [
+ ...payload.outputs,
+ ...jobEntities
+ .map((entity) => ({
+ trackedActivityId: jobNodeId,
+ trackedEntityId: entity.id,
+ quantity: entity.quantity
+ }))
+ .filter(
+ (output) =>
+ !existingOutputKeys.has(
+ `${output.trackedActivityId}:${output.trackedEntityId}`
+ )
+ )
+ ]
+ };
+}
+
+function mergeLineagePayloads(
+ base: LineagePayload,
+ incoming: LineagePayload
+): LineagePayload {
+ const entityIds = new Set(base.entities.map((e) => e.id));
+ const activityIds = new Set(base.activities.map((a) => a.id));
+ const inputKeys = new Set(
+ base.inputs.map((i) => `${i.trackedActivityId}:${i.trackedEntityId}`)
+ );
+ const outputKeys = new Set(
+ base.outputs.map((o) => `${o.trackedActivityId}:${o.trackedEntityId}`)
+ );
+ const baseContainments = base.containments ?? [];
+ const incomingContainments = incoming.containments ?? [];
+ const containmentKeys = new Set(
+ baseContainments.map((c) => `${c.id}:${c.trackedEntityId}`)
+ );
+
+ return {
+ entities: [
+ ...base.entities,
+ ...incoming.entities.filter((e) => !entityIds.has(e.id))
+ ],
+ activities: [
+ ...base.activities,
+ ...incoming.activities.filter((a) => !activityIds.has(a.id))
+ ],
+ inputs: [
+ ...base.inputs,
+ ...incoming.inputs.filter(
+ (i) => !inputKeys.has(`${i.trackedActivityId}:${i.trackedEntityId}`)
+ )
+ ],
+ outputs: [
+ ...base.outputs,
+ ...incoming.outputs.filter(
+ (o) => !outputKeys.has(`${o.trackedActivityId}:${o.trackedEntityId}`)
+ )
+ ],
+ stepRecords: base.stepRecords ?? incoming.stepRecords,
+ containments:
+ incomingContainments.length === 0 && baseContainments.length === 0
+ ? undefined
+ : [
+ ...baseContainments,
+ ...incomingContainments.filter(
+ (c) => !containmentKeys.has(`${c.id}:${c.trackedEntityId}`)
+ )
+ ]
+ };
+}
+
export default function TraceabilityRoute() {
return (
<ReactFlowProvider>
@@ -193,7 +337,13 @@ function TraceabilityRouteInner() {
const safeIndex =
selectedIds.length > 0 ? Math.min(focusedIndex, selectedIds.length - 1) : 0;
const focusedSelectedId = selectedIds[safeIndex] ?? null;
- const sidebarId = focusedSelectedId ?? rootId;
+ const rootHasNode =
+ entities.some((e) => e?.id === rootId) ||
+ activities.some((a) => a?.id === rootId);
+ const fallbackSidebarId = rootHasNode
+ ? rootId
+ : (entities[0]?.id ?? activities[0]?.id ?? rootId);
+ const sidebarId = focusedSelectedId ?? fallbackSidebarId;
const { setNodes } = useReactFlow();
const selectNode = useCallback(
diff --git a/packages/locale/locales/de/erp.po b/packages/locale/locales/de/erp.po
index 54a5c4b7bb..fc2b6aedb5 100644
--- a/packages/locale/locales/de/erp.po
+++ b/packages/locale/locales/de/erp.po
@@ -6428,8 +6428,8 @@ msgstr ""
msgid "Scan"
msgstr "Scannen"
-msgid "Scan a label or search by ID, serial number, or batch number."
-msgstr "Scannen Sie ein Etikett oder suchen Sie nach ID, Seriennummer oder Chargennummer."
+msgid "Scan a label or search by item ID or tracking ID."
+msgstr ""
msgid "Scan or enter tracked entity ID, serial, or batch"
msgstr "Scannen oder geben Sie die Kennung der verfolgten Entität, Seriennummer oder Chargennummer ein"
diff --git a/packages/locale/locales/de/mes.po b/packages/locale/locales/de/mes.po
index 4957039810..ef13f3c192 100644
--- a/packages/locale/locales/de/mes.po
+++ b/packages/locale/locales/de/mes.po
@@ -269,8 +269,8 @@ msgid "Dragging {0} cancelled."
msgstr "Ziehen von {0} abgebrochen."
#. placeholder {0}: formatRelativeTime( convertDateStringToIsoString( operation.operationDueDate ) )
-#. placeholder {0}: formatRelativeTime( convertDateStringToIsoString(operation.jobDueDate) )
#. placeholder {0}: formatRelativeTime( convertDateStringToIsoString(item.dueDate) )
+#. placeholder {0}: formatRelativeTime( convertDateStringToIsoString( operation.operationDueDate ) )
msgid "Due {0}"
msgstr "Fällig {0}"
diff --git a/packages/locale/locales/en/erp.po b/packages/locale/locales/en/erp.po
index 1e342fed2c..f33c0f955e 100644
--- a/packages/locale/locales/en/erp.po
+++ b/packages/locale/locales/en/erp.po
@@ -6428,8 +6428,8 @@ msgstr "Saving..."
msgid "Scan"
msgstr "Scan"
-msgid "Scan a label or search by ID, serial number, or batch number."
-msgstr "Scan a label or search by ID, serial number, or batch number."
+msgid "Scan a label or search by item ID or tracking ID."
+msgstr "Scan a label or search by item ID or tracking ID."
msgid "Scan or enter tracked entity ID, serial, or batch"
msgstr "Scan or enter tracked entity ID, serial, or batch"
diff --git a/packages/locale/locales/en/mes.po b/packages/locale/locales/en/mes.po
index 3f35063e1f..711d4725ce 100644
--- a/packages/locale/locales/en/mes.po
+++ b/packages/locale/locales/en/mes.po
@@ -269,8 +269,8 @@ msgid "Dragging {0} cancelled."
msgstr "Dragging {0} cancelled."
#. placeholder {0}: formatRelativeTime( convertDateStringToIsoString( operation.operationDueDate ) )
-#. placeholder {0}: formatRelativeTime( convertDateStringToIsoString(operation.jobDueDate) )
#. placeholder {0}: formatRelativeTime( convertDateStringToIsoString(item.dueDate) )
+#. placeholder {0}: formatRelativeTime( convertDateStringToIsoString( operation.operationDueDate ) )
msgid "Due {0}"
msgstr "Due {0}"
diff --git a/packages/locale/locales/es/erp.po b/packages/locale/locales/es/erp.po
index f0ee8a55c5..36a6121cca 100644
--- a/packages/locale/locales/es/erp.po
+++ b/packages/locale/locales/es/erp.po
@@ -6428,8 +6428,8 @@ msgstr ""
msgid "Scan"
msgstr "Escanear"
-msgid "Scan a label or search by ID, serial number, or batch number."
-msgstr "Escanea una etiqueta o busca por ID, número de serie o número de lote."
+msgid "Scan a label or search by item ID or tracking ID."
+msgstr ""
msgid "Scan or enter tracked entity ID, serial, or batch"
msgstr "Escanear o ingresar ID de entidad rastreada, serie o lote"
diff --git a/packages/locale/locales/es/mes.po b/packages/locale/locales/es/mes.po
index 758cc0163c..6a49a0f4f9 100644
--- a/packages/locale/locales/es/mes.po
+++ b/packages/locale/locales/es/mes.po
@@ -269,8 +269,8 @@ msgid "Dragging {0} cancelled."
msgstr "Se canceló el arrastre de {0}."
#. placeholder {0}: formatRelativeTime( convertDateStringToIsoString( operation.operationDueDate ) )
-#. placeholder {0}: formatRelativeTime( convertDateStringToIsoString(operation.jobDueDate) )
#. placeholder {0}: formatRelativeTime( convertDateStringToIsoString(item.dueDate) )
+#. placeholder {0}: formatRelativeTime( convertDateStringToIsoString( operation.operationDueDate ) )
msgid "Due {0}"
msgstr "Vence {0}"
diff --git a/packages/locale/locales/fr/erp.po b/packages/locale/locales/fr/erp.po
index 3d2a57fad6..4f1b29f542 100644
--- a/packages/locale/locales/fr/erp.po
+++ b/packages/locale/locales/fr/erp.po
@@ -6428,8 +6428,8 @@ msgstr ""
msgid "Scan"
msgstr "Numériser"
-msgid "Scan a label or search by ID, serial number, or batch number."
-msgstr "Scannez une étiquette ou recherchez par ID, numéro de série ou numéro de lot."
+msgid "Scan a label or search by item ID or tracking ID."
+msgstr ""
msgid "Scan or enter tracked entity ID, serial, or batch"
msgstr "Scannez ou entrez l'ID d'entité suivie, le numéro de série ou le lot"
diff --git a/packages/locale/locales/fr/mes.po b/packages/locale/locales/fr/mes.po
index 16105e315f..e87d2499f6 100644
--- a/packages/locale/locales/fr/mes.po
+++ b/packages/locale/locales/fr/mes.po
@@ -269,8 +269,8 @@ msgid "Dragging {0} cancelled."
msgstr "Déplacement de {0} annulé."
#. placeholder {0}: formatRelativeTime( convertDateStringToIsoString( operation.operationDueDate ) )
-#. placeholder {0}: formatRelativeTime( convertDateStringToIsoString(operation.jobDueDate) )
#. placeholder {0}: formatRelativeTime( convertDateStringToIsoString(item.dueDate) )
+#. placeholder {0}: formatRelativeTime( convertDateStringToIsoString( operation.operationDueDate ) )
msgid "Due {0}"
msgstr "Échéance {0}"
diff --git a/packages/locale/locales/hi/erp.po b/packages/locale/locales/hi/erp.po
index 52a44a2188..98fce38330 100644
--- a/packages/locale/locales/hi/erp.po
+++ b/packages/locale/locales/hi/erp.po
@@ -6428,8 +6428,8 @@ msgstr ""
msgid "Scan"
msgstr "स्कैन करें"
-msgid "Scan a label or search by ID, serial number, or batch number."
-msgstr "एक लेबल स्कैन करें या ID, सीरियल नंबर, या बैच नंबर से खोजें।"
+msgid "Scan a label or search by item ID or tracking ID."
+msgstr ""
msgid "Scan or enter tracked entity ID, serial, or batch"
msgstr "ट्रैक किए गए इकाई ID, सीरीज़ या बैच को स्कैन करें या दर्ज करें"
diff --git a/packages/locale/locales/hi/mes.po b/packages/locale/locales/hi/mes.po
index 796e26a9ac..6479d81726 100644
--- a/packages/locale/locales/hi/mes.po
+++ b/packages/locale/locales/hi/mes.po
@@ -269,8 +269,8 @@ msgid "Dragging {0} cancelled."
msgstr "\"{0}\" को ड्रैग करना रद्द किया गया।"
#. placeholder {0}: formatRelativeTime( convertDateStringToIsoString( operation.operationDueDate ) )
-#. placeholder {0}: formatRelativeTime( convertDateStringToIsoString(operation.jobDueDate) )
#. placeholder {0}: formatRelativeTime( convertDateStringToIsoString(item.dueDate) )
+#. placeholder {0}: formatRelativeTime( convertDateStringToIsoString( operation.operationDueDate ) )
msgid "Due {0}"
msgstr "Due {0} के लिए"
diff --git a/packages/locale/locales/it/erp.po b/packages/locale/locales/it/erp.po
index db64021d3d..0032add1f1 100644
--- a/packages/locale/locales/it/erp.po
+++ b/packages/locale/locales/it/erp.po
@@ -6428,8 +6428,8 @@ msgstr ""
msgid "Scan"
msgstr "Scansiona"
-msgid "Scan a label or search by ID, serial number, or batch number."
-msgstr "Scansiona un'etichetta o cerca per ID, numero di serie o numero di lotto."
+msgid "Scan a label or search by item ID or tracking ID."
+msgstr ""
msgid "Scan or enter tracked entity ID, serial, or batch"
msgstr "Scansiona o inserisci ID entità tracciata, numero di serie o lotto"
diff --git a/packages/locale/locales/it/mes.po b/packages/locale/locales/it/mes.po
index 5ce1bff0d3..d8560b393b 100644
--- a/packages/locale/locales/it/mes.po
+++ b/packages/locale/locales/it/mes.po
@@ -269,8 +269,8 @@ msgid "Dragging {0} cancelled."
msgstr "Trascinamento di {0} annullato."
#. placeholder {0}: formatRelativeTime( convertDateStringToIsoString( operation.operationDueDate ) )
-#. placeholder {0}: formatRelativeTime( convertDateStringToIsoString(operation.jobDueDate) )
#. placeholder {0}: formatRelativeTime( convertDateStringToIsoString(item.dueDate) )
+#. placeholder {0}: formatRelativeTime( convertDateStringToIsoString( operation.operationDueDate ) )
msgid "Due {0}"
msgstr "Scadenza {0}"
diff --git a/packages/locale/locales/ja/erp.po b/packages/locale/locales/ja/erp.po
index 5caa09aa22..acb06bc595 100644
--- a/packages/locale/locales/ja/erp.po
+++ b/packages/locale/locales/ja/erp.po
@@ -6428,8 +6428,8 @@ msgstr ""
msgid "Scan"
msgstr "スキャン"
-msgid "Scan a label or search by ID, serial number, or batch number."
-msgstr "ラベルをスキャンするか、ID、シリアル番号、またはバッチ番号で検索してください。"
+msgid "Scan a label or search by item ID or tracking ID."
+msgstr ""
msgid "Scan or enter tracked entity ID, serial, or batch"
msgstr "スキャンするか、追跡対象エンティティID、シリアル番号、またはバッチ番号を入力してください"
diff --git a/packages/locale/locales/ja/mes.po b/packages/locale/locales/ja/mes.po
index 3f590663e9..8804efaad4 100644
--- a/packages/locale/locales/ja/mes.po
+++ b/packages/locale/locales/ja/mes.po
@@ -269,8 +269,8 @@ msgid "Dragging {0} cancelled."
msgstr "{0} のドラッグがキャンセルされました。"
#. placeholder {0}: formatRelativeTime( convertDateStringToIsoString( operation.operationDueDate ) )
-#. placeholder {0}: formatRelativeTime( convertDateStringToIsoString(operation.jobDueDate) )
#. placeholder {0}: formatRelativeTime( convertDateStringToIsoString(item.dueDate) )
+#. placeholder {0}: formatRelativeTime( convertDateStringToIsoString( operation.operationDueDate ) )
msgid "Due {0}"
msgstr "期限 {0}"
diff --git a/packages/locale/locales/pl/erp.po b/packages/locale/locales/pl/erp.po
index 854d87ba32..6c712434a1 100644
--- a/packages/locale/locales/pl/erp.po
+++ b/packages/locale/locales/pl/erp.po
@@ -6428,8 +6428,8 @@ msgstr ""
msgid "Scan"
msgstr "Skanuj"
-msgid "Scan a label or search by ID, serial number, or batch number."
-msgstr "Skanuj etykietę lub wyszukaj według ID, numeru seryjnego lub numeru partii."
+msgid "Scan a label or search by item ID or tracking ID."
+msgstr ""
msgid "Scan or enter tracked entity ID, serial, or batch"
msgstr "Skanuj lub wprowadź identyfikator śledzonej jednostki, numer seryjny lub partię"
diff --git a/packages/locale/locales/pl/mes.po b/packages/locale/locales/pl/mes.po
index 32d03a2f8a..fc990bbc02 100644
--- a/packages/locale/locales/pl/mes.po
+++ b/packages/locale/locales/pl/mes.po
@@ -269,8 +269,8 @@ msgid "Dragging {0} cancelled."
msgstr "Przeciąganie {0} anulowane."
#. placeholder {0}: formatRelativeTime( convertDateStringToIsoString( operation.operationDueDate ) )
-#. placeholder {0}: formatRelativeTime( convertDateStringToIsoString(operation.jobDueDate) )
#. placeholder {0}: formatRelativeTime( convertDateStringToIsoString(item.dueDate) )
+#. placeholder {0}: formatRelativeTime( convertDateStringToIsoString( operation.operationDueDate ) )
msgid "Due {0}"
msgstr "Termin {0}"
diff --git a/packages/locale/locales/pt/erp.po b/packages/locale/locales/pt/erp.po
index e97c9ff6cb..08cee21ac2 100644
--- a/packages/locale/locales/pt/erp.po
+++ b/packages/locale/locales/pt/erp.po
@@ -6428,8 +6428,8 @@ msgstr ""
msgid "Scan"
msgstr "Digitalizar"
-msgid "Scan a label or search by ID, serial number, or batch number."
-msgstr "Digitalize um rótulo ou pesquise por ID, número de série ou número de lote."
+msgid "Scan a label or search by item ID or tracking ID."
+msgstr ""
msgid "Scan or enter tracked entity ID, serial, or batch"
msgstr "Digitalize ou insira ID da entidade rastreada, série ou lote"
diff --git a/packages/locale/locales/pt/mes.po b/packages/locale/locales/pt/mes.po
index 3a62a92e38..c579c1cd9a 100644
--- a/packages/locale/locales/pt/mes.po
+++ b/packages/locale/locales/pt/mes.po
@@ -269,8 +269,8 @@ msgid "Dragging {0} cancelled."
msgstr "Arraste de {0} cancelado."
#. placeholder {0}: formatRelativeTime( convertDateStringToIsoString( operation.operationDueDate ) )
-#. placeholder {0}: formatRelativeTime( convertDateStringToIsoString(operation.jobDueDate) )
#. placeholder {0}: formatRelativeTime( convertDateStringToIsoString(item.dueDate) )
+#. placeholder {0}: formatRelativeTime( convertDateStringToIsoString( operation.operationDueDate ) )
msgid "Due {0}"
msgstr "Vencimento {0}"
diff --git a/packages/locale/locales/ru/erp.po b/packages/locale/locales/ru/erp.po
index 1edce5e034..7f37d85550 100644
--- a/packages/locale/locales/ru/erp.po
+++ b/packages/locale/locales/ru/erp.po
@@ -6428,8 +6428,8 @@ msgstr ""
msgid "Scan"
msgstr "Сканировать"
-msgid "Scan a label or search by ID, serial number, or batch number."
-msgstr "Отсканируйте этикетку или выполните поиск по ID, серийному номеру или номеру партии."
+msgid "Scan a label or search by item ID or tracking ID."
+msgstr ""
msgid "Scan or enter tracked entity ID, serial, or batch"
msgstr "Отсканируйте или введите ID отслеживаемого объекта, серийный номер или партию"
diff --git a/packages/locale/locales/ru/mes.po b/packages/locale/locales/ru/mes.po
index d4e27857ab..ec2312a9bd 100644
--- a/packages/locale/locales/ru/mes.po
+++ b/packages/locale/locales/ru/mes.po
@@ -269,8 +269,8 @@ msgid "Dragging {0} cancelled."
msgstr "Перетаскивание {0} отменено."
#. placeholder {0}: formatRelativeTime( convertDateStringToIsoString( operation.operationDueDate ) )
-#. placeholder {0}: formatRelativeTime( convertDateStringToIsoString(operation.jobDueDate) )
#. placeholder {0}: formatRelativeTime( convertDateStringToIsoString(item.dueDate) )
+#. placeholder {0}: formatRelativeTime( convertDateStringToIsoString( operation.operationDueDate ) )
msgid "Due {0}"
msgstr "Срок {0}"
diff --git a/packages/locale/locales/zh/erp.po b/packages/locale/locales/zh/erp.po
index 2cd6ab51be..d246b98ef6 100644
--- a/packages/locale/locales/zh/erp.po
+++ b/packages/locale/locales/zh/erp.po
@@ -6428,8 +6428,8 @@ msgstr ""
msgid "Scan"
msgstr "扫描"
-msgid "Scan a label or search by ID, serial number, or batch number."
-msgstr "扫描标签或按ID、序列号或批号搜索。"
+msgid "Scan a label or search by item ID or tracking ID."
+msgstr ""
msgid "Scan or enter tracked entity ID, serial, or batch"
msgstr "扫描或输入跟踪实体ID、序列号或批次号"
diff --git a/packages/locale/locales/zh/mes.po b/packages/locale/locales/zh/mes.po
index c93eff9e79..21b413a839 100644
--- a/packages/locale/locales/zh/mes.po
+++ b/packages/locale/locales/zh/mes.po
@@ -269,8 +269,8 @@ msgid "Dragging {0} cancelled."
msgstr "拖拽 {0} 已取消。"
#. placeholder {0}: formatRelativeTime( convertDateStringToIsoString( operation.operationDueDate ) )
-#. placeholder {0}: formatRelativeTime( convertDateStringToIsoString(operation.jobDueDate) )
#. placeholder {0}: formatRelativeTime( convertDateStringToIsoString(item.dueDate) )
+#. placeholder {0}: formatRelativeTime( convertDateStringToIsoString( operation.operationDueDate ) )
msgid "Due {0}"
msgstr "截止 {0}"