Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.
TypeScript ai-agentsbill-of-materialserpinventory-managementleanmanufacturingmanufacturing-execution-systemmcp-servermesmrpopen-source-erppostgresqlproduction-planningqmsquality-management-systemreact-routerself-hostedsupabasetraceabilitytypescript
feat(items): add Manufacturer Part Number (MPN) (#981)
Naveen Kashyapcd5c621318b9
diff --git a/apps/erp/app/modules/items/items.models.ts b/apps/erp/app/modules/items/items.models.tsindex dde8ca1139..8fa9f00e97 100644--- a/apps/erp/app/modules/items/items.models.ts+++ b/apps/erp/app/modules/items/items.models.ts@@ -89,6 +89,9 @@ export const itemValidator = z.object({.min(1, { message: "Short description is required" }).max(255),description: zfd.text(z.string().optional()),+ // Manufacturer Part Number — the manufacturer's catalog number for a+ // purchased item. Only surfaced/edited for Buy items in the Properties panel.+ mpn: zfd.text(z.string().optional()),replenishmentSystem: z.enum(itemReplenishmentSystems, {errorMap: (issue, ctx) => ({message: "Replenishment system is required"diff --git a/apps/erp/app/modules/items/items.service.ts b/apps/erp/app/modules/items/items.service.tsindex 712ff412ef..be99fb9357 100644--- a/apps/erp/app/modules/items/items.service.ts+++ b/apps/erp/app/modules/items/items.service.ts@@ -427,7 +427,7 @@ export async function getConsumables(if (args.search) {query = query.or(- `readableIdWithRevision.ilike.%${args.search}%,name.ilike.%${args.search}%,description.ilike.%${args.search}%,supplierIds.ilike.%${args.search}%`+ `readableIdWithRevision.ilike.%${args.search}%,name.ilike.%${args.search}%,description.ilike.%${args.search}%,supplierIds.ilike.%${args.search}%,mpn.ilike.%${args.search}%`);}@@ -1106,7 +1106,7 @@ export async function getMaterials(if (args.search) {query = query.or(- `readableIdWithRevision.ilike.%${args.search}%,name.ilike.%${args.search}%,description.ilike.%${args.search}%,supplierIds.ilike.%${args.search}%`+ `readableIdWithRevision.ilike.%${args.search}%,name.ilike.%${args.search}%,description.ilike.%${args.search}%,supplierIds.ilike.%${args.search}%,mpn.ilike.%${args.search}%`);}@@ -1627,7 +1627,7 @@ export async function getParts(if (args.search) {query = query.or(- `readableIdWithRevision.ilike.%${args.search}%,name.ilike.%${args.search}%,description.ilike.%${args.search}%,supplierIds.ilike.%${args.search}%`+ `readableIdWithRevision.ilike.%${args.search}%,name.ilike.%${args.search}%,description.ilike.%${args.search}%,supplierIds.ilike.%${args.search}%,mpn.ilike.%${args.search}%`);}@@ -1641,6 +1641,21 @@ export async function getParts(return query;}+// Distinct manufacturer part numbers for the company, used to populate the MPN+// column filter in the item list tables. Deduping happens in the route loader.+export async function getItemMpnsList(+ client: SupabaseClient<Database>,+ companyId: string+) {+ return fetchAllFromTable<{ mpn: string }>(client, "item", "mpn", (query) =>+ query+ .eq("companyId", companyId)+ .not("mpn", "is", null)+ .neq("mpn", "")+ .order("mpn")+ );+}+export async function getPartsList(client: SupabaseClient<Database>,companyId: string@@ -1939,7 +1954,7 @@ export async function getTools(if (args.search) {query = query.or(- `readableIdWithRevision.ilike.%${args.search}%,name.ilike.%${args.search}%,description.ilike.%${args.search}%,supplierIds.ilike.%${args.search}%`+ `readableIdWithRevision.ilike.%${args.search}%,name.ilike.%${args.search}%,description.ilike.%${args.search}%,supplierIds.ilike.%${args.search}%,mpn.ilike.%${args.search}%`);}diff --git a/apps/erp/app/modules/items/ui/Consumables/ConsumableProperties.tsx b/apps/erp/app/modules/items/ui/Consumables/ConsumableProperties.tsxindex 42066791b1..cf5a1654a7 100644--- a/apps/erp/app/modules/items/ui/Consumables/ConsumableProperties.tsx+++ b/apps/erp/app/modules/items/ui/Consumables/ConsumableProperties.tsx@@ -130,6 +130,7 @@ const ConsumableProperties = ({ data }: ConsumablePropertiesProps) => {| "itemPostingGroupId"| "consumableId"| "active"+ | "mpn"| "requiresInspection",value: string | null) => {@@ -485,6 +486,28 @@ const ConsumableProperties = ({ data }: ConsumablePropertiesProps) => {/></ValidatedForm>)}+ {routeData?.consumableSummary?.replenishmentSystem?.includes("Buy") && (+ <ValidatedForm+ defaultValues={{+ mpn: (routeData?.consumableSummary as any)?.mpn ?? undefined+ }}+ validator={z.object({+ mpn: z.string().optional()+ })}+ className="w-full"+ >+ <InputControlled+ label={t`Manufacturer Part Number`}+ name="mpn"+ inline+ size="sm"+ value={(routeData?.consumableSummary as any)?.mpn ?? ""}+ onBlur={(e) => {+ onUpdate("mpn", e.target.value ?? null);+ }}+ />+ </ValidatedForm>+ )}{routeDataFromRoute?.supersession?.successor && (<div className="w-full"><h3 className="text-xs text-muted-foreground mb-1">diff --git a/apps/erp/app/modules/items/ui/Consumables/ConsumablesTable.tsx b/apps/erp/app/modules/items/ui/Consumables/ConsumablesTable.tsxindex 14f84a2020..84749ac5de 100644--- a/apps/erp/app/modules/items/ui/Consumables/ConsumablesTable.tsx+++ b/apps/erp/app/modules/items/ui/Consumables/ConsumablesTable.tsx@@ -28,10 +28,12 @@ import {LuBookMarked,LuCalendar,LuCheck,+ LuFactory,LuGroup,LuPencil,LuTag,LuTrash,+ LuTruck,LuUser} from "react-icons/lu";import { RxCodesandboxLogo } from "react-icons/rx";@@ -250,6 +252,43 @@ const ConsumablesTable = memo(icon: <LuTag />}},+ {+ accessorKey: "mpn",+ header: t`Manufacturer Part Number`,+ cell: (item) => (+ <div className="max-w-[200px] truncate">+ {item.getValue<string>()}+ </div>+ ),+ meta: {+ filter: {+ type: "fetcher",+ endpoint: path.to.api.itemMpns,+ transform: (data: string[] | null) =>+ data?.map((mpn) => ({ value: mpn, label: mpn })) ?? []+ },+ icon: <LuFactory />+ }+ },+ {+ accessorKey: "supplierIds",+ header: t`Supplier Part Numbers`,+ cell: ({ row }) => (+ <HStack spacing={0} className="gap-1">+ {row.original.supplierIds+ ?.split(",")+ .filter(Boolean)+ .map((supplierPartId) => (+ <Badge key={supplierPartId} variant="secondary">+ {supplierPartId}+ </Badge>+ ))}+ </HStack>+ ),+ meta: {+ icon: <LuTruck />+ }+ },{accessorKey: "active",header: t`Active`,diff --git a/apps/erp/app/modules/items/ui/Materials/MaterialProperties.tsx b/apps/erp/app/modules/items/ui/Materials/MaterialProperties.tsxindex 98ce0c77bf..39464c9e87 100644--- a/apps/erp/app/modules/items/ui/Materials/MaterialProperties.tsx+++ b/apps/erp/app/modules/items/ui/Materials/MaterialProperties.tsx@@ -175,6 +175,7 @@ const MaterialProperties = ({ data }: MaterialPropertiesProps) => {| "finishId"| "materialTypeId"| "materialId"+ | "mpn"| "requiresInspection",value: string | null) => {@@ -747,6 +748,28 @@ const MaterialProperties = ({ data }: MaterialPropertiesProps) => {/></ValidatedForm>)}+ {routeData?.materialSummary?.replenishmentSystem?.includes("Buy") && (+ <ValidatedForm+ defaultValues={{+ mpn: routeData?.materialSummary?.mpn ?? undefined+ }}+ validator={z.object({+ mpn: z.string().optional()+ })}+ className="w-full"+ >+ <InputControlled+ label={t`Manufacturer Part Number`}+ name="mpn"+ inline+ size="sm"+ value={routeData?.materialSummary?.mpn ?? ""}+ onBlur={(e) => {+ onUpdate("mpn", e.target.value ?? null);+ }}+ />+ </ValidatedForm>+ )}{routeDataFromRoute?.supersession?.successor && (<div className="w-full"><h3 className="text-xs text-muted-foreground mb-1">diff --git a/apps/erp/app/modules/items/ui/Materials/MaterialsTable.tsx b/apps/erp/app/modules/items/ui/Materials/MaterialsTable.tsxindex bd537d796d..369803f9be 100644--- a/apps/erp/app/modules/items/ui/Materials/MaterialsTable.tsx+++ b/apps/erp/app/modules/items/ui/Materials/MaterialsTable.tsx@@ -32,6 +32,7 @@ import {LuCalendar,LuCheck,LuExpand,+ LuFactory,LuGitPullRequestArrow,LuGlassWater,LuGroup,@@ -43,6 +44,7 @@ import {LuStar,LuTag,LuTrash,+ LuTruck,LuUser} from "react-icons/lu";import { RxCodesandboxLogo } from "react-icons/rx";@@ -387,6 +389,43 @@ const MaterialsTable = memo(({ data, tags, count }: MaterialsTableProps) => {icon: <LuTag />}},+ {+ accessorKey: "mpn",+ header: t`Manufacturer Part Number`,+ cell: (item) => (+ <div className="max-w-[200px] truncate">+ {item.getValue<string>()}+ </div>+ ),+ meta: {+ filter: {+ type: "fetcher",+ endpoint: path.to.api.itemMpns,+ transform: (data: string[] | null) =>+ data?.map((mpn) => ({ value: mpn, label: mpn })) ?? []+ },+ icon: <LuFactory />+ }+ },+ {+ accessorKey: "supplierIds",+ header: t`Supplier Part Numbers`,+ cell: ({ row }) => (+ <HStack spacing={0} className="gap-1">+ {row.original.supplierIds+ ?.split(",")+ .filter(Boolean)+ .map((supplierPartId) => (+ <Badge key={supplierPartId} variant="secondary">+ {supplierPartId}+ </Badge>+ ))}+ </HStack>+ ),+ meta: {+ icon: <LuTruck />+ }+ },{accessorKey: "active",header: t`Active`,diff --git a/apps/erp/app/modules/items/ui/Parts/PartProperties.tsx b/apps/erp/app/modules/items/ui/Parts/PartProperties.tsxindex c1db1a1ce7..c6f7456ba5 100644--- a/apps/erp/app/modules/items/ui/Parts/PartProperties.tsx+++ b/apps/erp/app/modules/items/ui/Parts/PartProperties.tsx@@ -135,6 +135,7 @@ const PartProperties = ({ data }: PartPropertiesProps) => {| "partId"| "name"| "description"+ | "mpn"| "replenishmentSystem"| "unitOfMeasureCode"| "requiresInspection",@@ -626,6 +627,28 @@ const PartProperties = ({ data }: PartPropertiesProps) => {/></ValidatedForm>)}+ {routeData?.partSummary?.replenishmentSystem?.includes("Buy") && (+ <ValidatedForm+ defaultValues={{+ mpn: routeData?.partSummary?.mpn ?? undefined+ }}+ validator={z.object({+ mpn: z.string().optional()+ })}+ className="w-full"+ >+ <InputControlled+ label={t`Manufacturer Part Number`}+ name="mpn"+ inline+ size="sm"+ value={routeData?.partSummary?.mpn ?? ""}+ onBlur={(e) => {+ onUpdate("mpn", e.target.value ?? null);+ }}+ />+ </ValidatedForm>+ )}{routeDataFromRoute?.supersession?.successor && (<div className="w-full"><h3 className="text-xs text-muted-foreground mb-1">diff --git a/apps/erp/app/modules/items/ui/Parts/PartsTable.tsx b/apps/erp/app/modules/items/ui/Parts/PartsTable.tsxindex a47a6ce502..f7e60a2941 100644--- a/apps/erp/app/modules/items/ui/Parts/PartsTable.tsx+++ b/apps/erp/app/modules/items/ui/Parts/PartsTable.tsx@@ -31,12 +31,14 @@ import {LuBookMarked,LuCalendar,LuCheck,+ LuFactory,LuGitPullRequestArrow,LuGroup,LuLoaderCircle,LuPencil,LuTag,LuTrash,+ LuTruck,LuUser} from "react-icons/lu";import { RxCodesandboxLogo } from "react-icons/rx";@@ -292,6 +294,43 @@ const PartsTable = memo(({ data, tags, count }: PartsTableProps) => {icon: <LuTag />}},+ {+ accessorKey: "mpn",+ header: t`Manufacturer Part Number`,+ cell: (item) => (+ <div className="max-w-[200px] truncate">+ {item.getValue<string>()}+ </div>+ ),+ meta: {+ filter: {+ type: "fetcher",+ endpoint: path.to.api.itemMpns,+ transform: (data: string[] | null) =>+ data?.map((mpn) => ({ value: mpn, label: mpn })) ?? []+ },+ icon: <LuFactory />+ }+ },+ {+ accessorKey: "supplierIds",+ header: t`Supplier Part Numbers`,+ cell: ({ row }) => (+ <HStack spacing={0} className="gap-1">+ {row.original.supplierIds+ ?.split(",")+ .filter(Boolean)+ .map((supplierPartId) => (+ <Badge key={supplierPartId} variant="secondary">+ {supplierPartId}+ </Badge>+ ))}+ </HStack>+ ),+ meta: {+ icon: <LuTruck />+ }+ },{accessorKey: "active",header: t`Active`,diff --git a/apps/erp/app/modules/items/ui/Tools/ToolProperties.tsx b/apps/erp/app/modules/items/ui/Tools/ToolProperties.tsxindex b5c940404f..cc9096ec8d 100644--- a/apps/erp/app/modules/items/ui/Tools/ToolProperties.tsx+++ b/apps/erp/app/modules/items/ui/Tools/ToolProperties.tsx@@ -125,6 +125,7 @@ const ToolProperties = ({ data }: ToolPropertiesProps) => {| "itemPostingGroupId"| "toolId"| "active"+ | "mpn"| "requiresInspection",value: string | null) => {@@ -589,6 +590,28 @@ const ToolProperties = ({ data }: ToolPropertiesProps) => {/></ValidatedForm>)}+ {routeData?.toolSummary?.replenishmentSystem?.includes("Buy") && (+ <ValidatedForm+ defaultValues={{+ mpn: (routeData?.toolSummary as any)?.mpn ?? undefined+ }}+ validator={z.object({+ mpn: z.string().optional()+ })}+ className="w-full"+ >+ <InputControlled+ label={t`Manufacturer Part Number`}+ name="mpn"+ inline+ size="sm"+ value={(routeData?.toolSummary as any)?.mpn ?? ""}+ onBlur={(e) => {+ onUpdate("mpn", e.target.value ?? null);+ }}+ />+ </ValidatedForm>+ )}{routeDataFromRoute?.supersession?.successor && (<div className="w-full"><h3 className="text-xs text-muted-foreground mb-1">diff --git a/apps/erp/app/modules/items/ui/Tools/ToolsTable.tsx b/apps/erp/app/modules/items/ui/Tools/ToolsTable.tsxindex ee02a596f2..11fa678370 100644--- a/apps/erp/app/modules/items/ui/Tools/ToolsTable.tsx+++ b/apps/erp/app/modules/items/ui/Tools/ToolsTable.tsx@@ -31,12 +31,14 @@ import {LuBookMarked,LuCalendar,LuCheck,+ LuFactory,LuGitPullRequestArrow,LuGroup,LuLoaderCircle,LuPencil,LuTag,LuTrash,+ LuTruck,LuUser} from "react-icons/lu";import { RxCodesandboxLogo } from "react-icons/rx";@@ -291,6 +293,43 @@ const ToolsTable = memo(({ data, tags, count }: ToolsTableProps) => {icon: <LuTag />}},+ {+ accessorKey: "mpn",+ header: t`Manufacturer Part Number`,+ cell: (item) => (+ <div className="max-w-[200px] truncate">+ {item.getValue<string>()}+ </div>+ ),+ meta: {+ filter: {+ type: "fetcher",+ endpoint: path.to.api.itemMpns,+ transform: (data: string[] | null) =>+ data?.map((mpn) => ({ value: mpn, label: mpn })) ?? []+ },+ icon: <LuFactory />+ }+ },+ {+ accessorKey: "supplierIds",+ header: t`Supplier Part Numbers`,+ cell: ({ row }) => (+ <HStack spacing={0} className="gap-1">+ {row.original.supplierIds+ ?.split(",")+ .filter(Boolean)+ .map((supplierPartId) => (+ <Badge key={supplierPartId} variant="secondary">+ {supplierPartId}+ </Badge>+ ))}+ </HStack>+ ),+ meta: {+ icon: <LuTruck />+ }+ },{accessorKey: "active",header: t`Active`,diff --git a/apps/erp/app/modules/shared/imports.models.ts b/apps/erp/app/modules/shared/imports.models.tsindex 7e7f838b2b..59e8dc0382 100644--- a/apps/erp/app/modules/shared/imports.models.ts+++ b/apps/erp/app/modules/shared/imports.models.ts@@ -473,6 +473,11 @@ const partImportFields = {required: true,type: "string"},+ mpn: {+ label: "MPN",+ required: false,+ type: "string"+ },active: {label: "Active",required: false,@@ -963,6 +968,11 @@ export const fieldMappings = {required: true,type: "string"},+ mpn: {+ label: "MPN",+ required: false,+ type: "string"+ },active: {label: "Active",required: false,@@ -1055,6 +1065,11 @@ export const fieldMappings = {required: true,type: "string"},+ mpn: {+ label: "MPN",+ required: false,+ type: "string"+ },active: {label: "Active",required: false,@@ -1147,6 +1162,11 @@ export const fieldMappings = {required: true,type: "string"},+ mpn: {+ label: "MPN",+ required: false,+ type: "string"+ },active: {label: "Active",required: false,@@ -1239,6 +1259,11 @@ export const fieldMappings = {required: true,type: "string"},+ mpn: {+ label: "MPN",+ required: false,+ type: "string"+ },active: {label: "Active",required: false,@@ -1828,6 +1853,7 @@ export const importSchemas: Record<.string().min(1, { message: "Name is required" }).describe("The description of the part"),+ mpn: z.string().optional().describe("The manufacturer part number"),active: z.string().optional().describe("Whether the part is active"),unitOfMeasureCode: z.string()@@ -1872,6 +1898,10 @@ export const importSchemas: Record<.string().min(1, { message: "Name is required" }).describe("The description of the tool"),+ mpn: z+ .string()+ .optional()+ .describe("The manufacturer part number of the tool"),active: z.string().optional().describe("Whether the tool is active"),unitOfMeasureCode: z.string()@@ -1916,6 +1946,10 @@ export const importSchemas: Record<.string().min(1, { message: "Name is required" }).describe("The description of the fixture"),+ mpn: z+ .string()+ .optional()+ .describe("The manufacturer part number of the fixture"),active: z.string().optional().describe("Whether the fixture is active"),unitOfMeasureCode: z.string()@@ -1960,6 +1994,7 @@ export const importSchemas: Record<.string().min(1, { message: "Name is required" }).describe("The description of the part"),+ mpn: z.string().optional().describe("The manufacturer part number"),active: z.string().optional().describe("Whether the part is active"),unitOfMeasureCode: z.string()@@ -2004,6 +2039,10 @@ export const importSchemas: Record<.string().min(1, { message: "Name is required" }).describe("The description of the material"),+ mpn: z+ .string()+ .optional()+ .describe("The manufacturer part number of the material"),active: z.string().optional().describe("Whether the material is active"),materialSubstanceId: z.string()diff --git a/apps/erp/app/routes/api+/items.mpns.ts b/apps/erp/app/routes/api+/items.mpns.tsnew file mode 100644index 0000000000..0cf1c4e0ae--- /dev/null+++ b/apps/erp/app/routes/api+/items.mpns.ts@@ -0,0 +1,20 @@+import { requirePermissions } from "@carbon/auth/auth.server";+import type { LoaderFunctionArgs } from "react-router";+import { getItemMpnsList } from "~/modules/items";++export async function loader({ request }: LoaderFunctionArgs) {+ const { client, companyId } = await requirePermissions(request, {});++ const result = await getItemMpnsList(client, companyId);++ // Dedupe distinct MPN values for the filter dropdown.+ const mpns = [+ ...new Set(+ (result.data ?? [])+ .map((row) => row.mpn)+ .filter((mpn): mpn is string => Boolean(mpn))+ )+ ];++ return { data: mpns };+}diff --git a/apps/erp/app/routes/api+/mcp+/lib/tool-metadata.json b/apps/erp/app/routes/api+/mcp+/lib/tool-metadata.jsonindex 5cb7077da1..3401140279 100644--- a/apps/erp/app/routes/api+/mcp+/lib/tool-metadata.json+++ b/apps/erp/app/routes/api+/mcp+/lib/tool-metadata.json@@ -1,6 +1,6 @@{- "generated": "2026-06-30T13:22:53.840Z",- "totalTools": 1248,+ "generated": "2026-06-30T20:37:19.952Z",+ "totalTools": 1249,"modules": 15,"tools": [{@@ -11397,6 +11397,24 @@}}},+ {+ "name": "items_getItemMpnsList",+ "module": "items",+ "classification": "READ",+ "description": "get item mpns list",+ "paramCount": 0,+ "serviceParams": [+ "client",+ "companyId"+ ],+ "injectAuth": [+ "companyId"+ ],+ "schema": {+ "type": "object",+ "properties": {}+ }+ },{"name": "items_getPartsList","module": "items",diff --git a/apps/erp/app/routes/x+/items+/update.tsx b/apps/erp/app/routes/x+/items+/update.tsxindex 5f36049b39..dfd8004e16 100644--- a/apps/erp/app/routes/x+/items+/update.tsx+++ b/apps/erp/app/routes/x+/items+/update.tsx@@ -140,6 +140,7 @@ export async function action({ request }: ActionFunctionArgs) {}case "name":case "description":+ case "mpn":case "unitOfMeasureCode":return await client.from("item")diff --git a/apps/erp/app/utils/path.ts b/apps/erp/app/utils/path.tsindex a94a275628..01883e1a37 100644--- a/apps/erp/app/utils/path.ts+++ b/apps/erp/app/utils/path.ts@@ -111,6 +111,7 @@ export const path = {materialTypes: (substanceId: string, formId: string) =>generatePath(`${api}/items/types/${substanceId}/${formId}`),materialSubstances: `${api}/items/substances`,+ itemMpns: `${api}/items/mpns`,messagingNotify: `${api}/messaging/notify`,mrp: (locationId?: string) =>generatePath(diff --git a/packages/database/src/types.ts b/packages/database/src/types.tsindex 090fb5ba11..c76561414b 100644--- a/packages/database/src/types.ts+++ b/packages/database/src/types.ts@@ -13958,6 +13958,7 @@ export type Database = {id: stringitemTrackingType: Database["public"]["Enums"]["itemTrackingType"]modelUploadId: string | null+ mpn: string | nullname: stringnotes: Json | nullreadableId: string@@ -13985,6 +13986,7 @@ export type Database = {id?: stringitemTrackingType: Database["public"]["Enums"]["itemTrackingType"]modelUploadId?: string | null+ mpn?: string | nullname: stringnotes?: Json | nullreadableId: string@@ -14012,6 +14014,7 @@ export type Database = {id?: stringitemTrackingType?: Database["public"]["Enums"]["itemTrackingType"]modelUploadId?: string | null+ mpn?: string | nullname?: stringnotes?: Json | nullreadableId?: string@@ -40898,7 +40901,7 @@ export type Database = {},]}- searchIndex_d90t6nfl60gg2fpujaag: {+ searchIndex_d924dneua0gg2k9762jg: {Row: {createdAt: stringdescription: string | null@@ -52148,6 +52151,7 @@ export type Database = {modelPath: string | nullmodelSize: number | nullmodelUploadId: string | null+ mpn: string | nullname: string | nullnotes: Json | nullreadableId: string | null@@ -56342,6 +56346,7 @@ export type Database = {modelPath: string | nullmodelSize: number | nullmodelUploadId: string | null+ mpn: string | nullname: string | nullnotes: Json | nullreadableId: string | null@@ -57267,6 +57272,7 @@ export type Database = {modelName: string | nullmodelPath: string | nullmodelSize: number | null+ mpn: string | nullname: string | nullnotes: Json | nullreadableId: string | null@@ -58870,14 +58876,14 @@ export type Database = {Relationships: [{foreignKeyName: "address_countryCode_fkey"- columns: ["customerCountryCode"]+ columns: ["supplierCountryCode"]isOneToOne: falsereferencedRelation: "country"referencedColumns: ["alpha2"]},{foreignKeyName: "address_countryCode_fkey"- columns: ["supplierCountryCode"]+ columns: ["customerCountryCode"]isOneToOne: falsereferencedRelation: "country"referencedColumns: ["alpha2"]@@ -62303,21 +62309,21 @@ export type Database = {Relationships: [{foreignKeyName: "address_countryCode_fkey"- columns: ["shipmentCountryCode"]+ columns: ["invoiceCountryCode"]isOneToOne: falsereferencedRelation: "country"referencedColumns: ["alpha2"]},{foreignKeyName: "address_countryCode_fkey"- columns: ["invoiceCountryCode"]+ columns: ["customerCountryCode"]isOneToOne: falsereferencedRelation: "country"referencedColumns: ["alpha2"]},{foreignKeyName: "address_countryCode_fkey"- columns: ["customerCountryCode"]+ columns: ["shipmentCountryCode"]isOneToOne: falsereferencedRelation: "country"referencedColumns: ["alpha2"]@@ -65595,6 +65601,7 @@ export type Database = {modelName: string | nullmodelPath: string | nullmodelSize: number | null+ mpn: string | nullname: string | nullnotes: Json | nullreadableId: string | null@@ -66722,6 +66729,7 @@ export type Database = {modelPath: stringmodelSize: numbermodelUploadId: string+ mpn: stringname: stringnotes: JsonreadableId: string@@ -67274,6 +67282,7 @@ export type Database = {modelPath: stringmodelSize: numbermodelUploadId: string+ mpn: stringname: stringnotes: JsonreadableId: string@@ -67396,6 +67405,7 @@ export type Database = {modelName: stringmodelPath: stringmodelSize: number+ mpn: stringname: stringnotes: JsonreadableId: string@@ -67928,6 +67938,7 @@ export type Database = {modelName: stringmodelPath: stringmodelSize: number+ mpn: stringname: stringnotes: JsonreadableId: stringdiff --git a/packages/database/supabase/functions/import-csv/index.ts b/packages/database/supabase/functions/import-csv/index.tsindex 7e4efc6f7e..f775db9c14 100644--- a/packages/database/supabase/functions/import-csv/index.ts+++ b/packages/database/supabase/functions/import-csv/index.ts@@ -1386,6 +1386,7 @@ serve(async (req: Request) => {revision: z.string().optional(),name: z.string().min(1, { message: "Description is required" }),description: z.string().optional(),+ mpn: z.string().optional(),active: z.string().optional(),unitOfMeasureCode: z.string().optional(),replenishmentSystem: z@@ -1621,6 +1622,7 @@ serve(async (req: Request) => {updatedBy: userId,name: sql`EXCLUDED."name"`,description: sql`EXCLUDED."description"`,+ mpn: sql`EXCLUDED."mpn"`,active: sql`EXCLUDED."active"`,unitOfMeasureCode: sql`EXCLUDED."unitOfMeasureCode"`,replenishmentSystem: sql`EXCLUDED."replenishmentSystem"`,diff --git a/packages/database/supabase/functions/lib/types.ts b/packages/database/supabase/functions/lib/types.tsindex 090fb5ba11..c76561414b 100644--- a/packages/database/supabase/functions/lib/types.ts+++ b/packages/database/supabase/functions/lib/types.ts@@ -13958,6 +13958,7 @@ export type Database = {id: stringitemTrackingType: Database["public"]["Enums"]["itemTrackingType"]modelUploadId: string | null+ mpn: string | nullname: stringnotes: Json | nullreadableId: string@@ -13985,6 +13986,7 @@ export type Database = {id?: stringitemTrackingType: Database["public"]["Enums"]["itemTrackingType"]modelUploadId?: string | null+ mpn?: string | nullname: stringnotes?: Json | nullreadableId: string@@ -14012,6 +14014,7 @@ export type Database = {id?: stringitemTrackingType?: Database["public"]["Enums"]["itemTrackingType"]modelUploadId?: string | null+ mpn?: string | nullname?: stringnotes?: Json | nullreadableId?: string@@ -40898,7 +40901,7 @@ export type Database = {},]}- searchIndex_d90t6nfl60gg2fpujaag: {+ searchIndex_d924dneua0gg2k9762jg: {Row: {createdAt: stringdescription: string | null@@ -52148,6 +52151,7 @@ export type Database = {modelPath: string | nullmodelSize: number | nullmodelUploadId: string | null+ mpn: string | nullname: string | nullnotes: Json | nullreadableId: string | null@@ -56342,6 +56346,7 @@ export type Database = {modelPath: string | nullmodelSize: number | nullmodelUploadId: string | null+ mpn: string | nullname: string | nullnotes: Json | nullreadableId: string | null@@ -57267,6 +57272,7 @@ export type Database = {modelName: string | nullmodelPath: string | nullmodelSize: number | null+ mpn: string | nullname: string | nullnotes: Json | nullreadableId: string | null@@ -58870,14 +58876,14 @@ export type Database = {Relationships: [{foreignKeyName: "address_countryCode_fkey"- columns: ["customerCountryCode"]+ columns: ["supplierCountryCode"]isOneToOne: falsereferencedRelation: "country"referencedColumns: ["alpha2"]},{foreignKeyName: "address_countryCode_fkey"- columns: ["supplierCountryCode"]+ columns: ["customerCountryCode"]isOneToOne: falsereferencedRelation: "country"referencedColumns: ["alpha2"]@@ -62303,21 +62309,21 @@ export type Database = {Relationships: [{foreignKeyName: "address_countryCode_fkey"- columns: ["shipmentCountryCode"]+ columns: ["invoiceCountryCode"]isOneToOne: falsereferencedRelation: "country"referencedColumns: ["alpha2"]},{foreignKeyName: "address_countryCode_fkey"- columns: ["invoiceCountryCode"]+ columns: ["customerCountryCode"]isOneToOne: falsereferencedRelation: "country"referencedColumns: ["alpha2"]},{foreignKeyName: "address_countryCode_fkey"- columns: ["customerCountryCode"]+ columns: ["shipmentCountryCode"]isOneToOne: falsereferencedRelation: "country"referencedColumns: ["alpha2"]@@ -65595,6 +65601,7 @@ export type Database = {modelName: string | nullmodelPath: string | nullmodelSize: number | null+ mpn: string | nullname: string | nullnotes: Json | nullreadableId: string | null@@ -66722,6 +66729,7 @@ export type Database = {modelPath: stringmodelSize: numbermodelUploadId: string+ mpn: stringname: stringnotes: JsonreadableId: string@@ -67274,6 +67282,7 @@ export type Database = {modelPath: stringmodelSize: numbermodelUploadId: string+ mpn: stringname: stringnotes: JsonreadableId: string@@ -67396,6 +67405,7 @@ export type Database = {modelName: stringmodelPath: stringmodelSize: number+ mpn: stringname: stringnotes: JsonreadableId: string@@ -67928,6 +67938,7 @@ export type Database = {modelName: stringmodelPath: stringmodelSize: number+ mpn: stringname: stringnotes: JsonreadableId: stringdiff --git a/packages/database/supabase/migrations/20260629142317_item-mpn.sql b/packages/database/supabase/migrations/20260629142317_item-mpn.sqlnew file mode 100644index 0000000000..c5bdc71098--- /dev/null+++ b/packages/database/supabase/migrations/20260629142317_item-mpn.sql@@ -0,0 +1,960 @@+-- Manufacturer Part Number (MPN) on items.+--+-- MPN is the manufacturer's catalog number for a purchased ("Buy") item. It is+-- promoted to an item-level property (alongside name/description) so it can be+-- edited in the item's Properties sidebar (buy items only) and surfaced as a+-- column in the item list tables.+--+-- This adds the column to "item" and threads it through:+-- * the Part/Tool/Material/Consumable detail RPCs (Properties sidebar data)+-- * the parts/materials/tools/consumables list views (table column + filter)++ALTER TABLE "item"+ ADD COLUMN "mpn" TEXT;+++-- =============================================================================+-- get_part_details (recreated to expose "mpn")+-- Body unchanged from 20260615143722 aside from the new column.+-- DROP first: adding a column to the RETURNS TABLE changes the function's+-- result row type, which CREATE OR REPLACE cannot do (SQLSTATE 42P13).+-- =============================================================================+DROP FUNCTION IF EXISTS get_part_details(TEXT);+CREATE OR REPLACE FUNCTION get_part_details(item_id TEXT)+RETURNS TABLE (+ "active" BOOLEAN,+ "assignee" TEXT,+ "defaultMethodType" "methodType",+ "sourcingType" "sourcingType",+ "description" TEXT,+ "itemTrackingType" "itemTrackingType",+ "requiresInspection" BOOLEAN,+ "name" TEXT,+ "replenishmentSystem" "itemReplenishmentSystem",+ "unitOfMeasureCode" TEXT,+ "notes" JSONB,+ "thumbnailPath" TEXT,+ "modelId" TEXT,+ "modelPath" TEXT,+ "modelName" TEXT,+ "modelSize" BIGINT,+ "id" TEXT,+ "companyId" TEXT,+ "unitOfMeasure" TEXT,+ "readableId" TEXT,+ "revision" TEXT,+ "readableIdWithRevision" TEXT,+ "revisions" JSON,+ "customFields" JSONB,+ "tags" TEXT[],+ "itemPostingGroupId" TEXT,+ "createdBy" TEXT,+ "createdAt" TIMESTAMP WITH TIME ZONE,+ "updatedBy" TEXT,+ "updatedAt" TIMESTAMP WITH TIME ZONE,+ "mpn" TEXT+) AS $$+DECLARE+ v_readable_id TEXT;+ v_company_id TEXT;+BEGIN+ SELECT i."readableId", i."companyId" INTO v_readable_id, v_company_id+ FROM "item" i+ WHERE i.id = item_id;++ RETURN QUERY+ WITH item_revisions AS (+ SELECT+ json_agg(+ json_build_object(+ 'id', i.id,+ 'revision', i."revision",+ 'methodType', i."defaultMethodType",+ 'type', i."type"+ ) ORDER BY+ i."createdAt" DESC+ ) as "revisions"+ FROM "item" i+ WHERE i."readableId" = v_readable_id+ AND i."companyId" = v_company_id+ AND i."type" = 'Part'+ )+ SELECT+ i."active",+ i."assignee",+ i."defaultMethodType",+ i."sourcingType",+ i."description",+ i."itemTrackingType",+ i."requiresInspection",+ i."name",+ i."replenishmentSystem",+ i."unitOfMeasureCode",+ i."notes",+ CASE+ WHEN i."thumbnailPath" IS NULL AND mu."thumbnailPath" IS NOT NULL THEN mu."thumbnailPath"+ ELSE i."thumbnailPath"+ END as "thumbnailPath",+ mu.id as "modelId",+ mu."modelPath",+ mu."name" as "modelName",+ mu."size" as "modelSize",+ i."id",+ i."companyId",+ uom.name as "unitOfMeasure",+ i."readableId",+ i."revision",+ i."readableIdWithRevision",+ ir."revisions",+ p."customFields",+ p."tags",+ ic."itemPostingGroupId",+ i."createdBy",+ i."createdAt",+ i."updatedBy",+ i."updatedAt",+ i."mpn"+ FROM "part" p+ LEFT JOIN "item" i ON i."readableId" = p."id" AND i."companyId" = p."companyId"+ LEFT JOIN item_revisions ir ON true+ LEFT JOIN (+ SELECT+ ps."itemId",+ string_agg(ps."supplierPartId", ',') AS "supplierIds"+ FROM "supplierPart" ps+ GROUP BY ps."itemId"+ ) ps ON ps."itemId" = i.id+ LEFT JOIN "modelUpload" mu ON mu.id = i."modelUploadId"+ LEFT JOIN "unitOfMeasure" uom ON uom.code = i."unitOfMeasureCode" AND uom."companyId" = i."companyId"+ LEFT JOIN "itemCost" ic ON ic."itemId" = i.id+ WHERE i."id" = item_id;+END;+$$ LANGUAGE plpgsql;+++-- =============================================================================+-- get_tool_details (recreated to expose "mpn")+-- Body unchanged from 20260615143722 aside from the new column.+-- =============================================================================+DROP FUNCTION IF EXISTS get_tool_details(TEXT);+CREATE OR REPLACE FUNCTION get_tool_details(item_id TEXT)+RETURNS TABLE (+ "active" BOOLEAN,+ "assignee" TEXT,+ "defaultMethodType" "methodType",+ "sourcingType" "sourcingType",+ "description" TEXT,+ "itemTrackingType" "itemTrackingType",+ "requiresInspection" BOOLEAN,+ "name" TEXT,+ "replenishmentSystem" "itemReplenishmentSystem",+ "unitOfMeasureCode" TEXT,+ "notes" JSONB,+ "thumbnailPath" TEXT,+ "modelId" TEXT,+ "modelPath" TEXT,+ "modelName" TEXT,+ "modelSize" BIGINT,+ "id" TEXT,+ "companyId" TEXT,+ "unitOfMeasure" TEXT,+ "readableId" TEXT,+ "revision" TEXT,+ "readableIdWithRevision" TEXT,+ "revisions" JSON,+ "customFields" JSONB,+ "tags" TEXT[],+ "itemPostingGroupId" TEXT,+ "createdBy" TEXT,+ "createdAt" TIMESTAMP WITH TIME ZONE,+ "updatedBy" TEXT,+ "updatedAt" TIMESTAMP WITH TIME ZONE,+ "mpn" TEXT+) AS $$+DECLARE+ v_readable_id TEXT;+ v_company_id TEXT;+BEGIN+ SELECT i."readableId", i."companyId" INTO v_readable_id, v_company_id+ FROM "item" i+ WHERE i.id = item_id;++ RETURN QUERY+ WITH item_revisions AS (+ SELECT+ json_agg(+ json_build_object(+ 'id', i.id,+ 'revision', i."revision",+ 'methodType', i."defaultMethodType",+ 'type', i."type"+ ) ORDER BY+ i."createdAt" DESC+ ) as "revisions"+ FROM "item" i+ WHERE i."readableId" = v_readable_id+ AND i."companyId" = v_company_id+ AND i."type" = 'Tool'+ )+ SELECT+ i."active",+ i."assignee",+ i."defaultMethodType",+ i."sourcingType",+ i."description",+ i."itemTrackingType",+ i."requiresInspection",+ i."name",+ i."replenishmentSystem",+ i."unitOfMeasureCode",+ i."notes",+ CASE+ WHEN i."thumbnailPath" IS NULL AND mu."thumbnailPath" IS NOT NULL THEN mu."thumbnailPath"+ ELSE i."thumbnailPath"+ END as "thumbnailPath",+ mu.id as "modelId",+ mu."modelPath",+ mu."name" as "modelName",+ mu."size" as "modelSize",+ i."id",+ i."companyId",+ uom.name as "unitOfMeasure",+ i."readableId",+ i."revision",+ i."readableIdWithRevision",+ ir."revisions",+ t."customFields",+ t."tags",+ ic."itemPostingGroupId",+ i."createdBy",+ i."createdAt",+ i."updatedBy",+ i."updatedAt",+ i."mpn"+ FROM "tool" t+ LEFT JOIN "item" i ON i."readableId" = t."id" AND i."companyId" = t."companyId"+ LEFT JOIN item_revisions ir ON true+ LEFT JOIN (+ SELECT+ ps."itemId",+ string_agg(ps."supplierPartId", ',') AS "supplierIds"+ FROM "supplierPart" ps+ GROUP BY ps."itemId"+ ) ps ON ps."itemId" = i.id+ LEFT JOIN "modelUpload" mu ON mu.id = i."modelUploadId"+ LEFT JOIN "unitOfMeasure" uom ON uom.code = i."unitOfMeasureCode" AND uom."companyId" = i."companyId"+ LEFT JOIN "itemCost" ic ON ic."itemId" = i.id+ WHERE i."id" = item_id;+END;+$$ LANGUAGE plpgsql;+++-- =============================================================================+-- get_material_details (recreated to expose "mpn")+-- Body unchanged from 20260515120000 aside from the new column.+-- =============================================================================+DROP FUNCTION IF EXISTS get_material_details(TEXT);+CREATE OR REPLACE FUNCTION get_material_details(item_id TEXT)+RETURNS TABLE (+ "active" BOOLEAN,+ "assignee" TEXT,+ "defaultMethodType" "methodType",+ "description" TEXT,+ "itemTrackingType" "itemTrackingType",+ "requiresInspection" BOOLEAN,+ "name" TEXT,+ "replenishmentSystem" "itemReplenishmentSystem",+ "unitOfMeasureCode" TEXT,+ "notes" JSONB,+ "thumbnailPath" TEXT,+ "modelUploadId" TEXT,+ "modelPath" TEXT,+ "modelName" TEXT,+ "modelSize" BIGINT,+ "id" TEXT,+ "companyId" TEXT,+ "readableId" TEXT,+ "revision" TEXT,+ "readableIdWithRevision" TEXT,+ "supplierIds" TEXT,+ "unitOfMeasure" TEXT,+ "revisions" JSON,+ "materialForm" TEXT,+ "materialSubstance" TEXT,+ "finish" TEXT,+ "grade" TEXT,+ "dimensions" TEXT,+ "materialType" TEXT,+ "materialSubstanceId" TEXT,+ "materialFormId" TEXT,+ "materialTypeId" TEXT,+ "dimensionId" TEXT,+ "gradeId" TEXT,+ "finishId" TEXT,+ "customFields" JSONB,+ "tags" TEXT[],+ "itemPostingGroupId" TEXT,+ "createdBy" TEXT,+ "createdAt" TIMESTAMP WITH TIME ZONE,+ "updatedBy" TEXT,+ "updatedAt" TIMESTAMP WITH TIME ZONE,+ "mpn" TEXT+) AS $$+DECLARE+ v_readable_id TEXT;+ v_company_id TEXT;+BEGIN+ SELECT i."readableId", i."companyId" INTO v_readable_id, v_company_id+ FROM "item" i+ WHERE i.id = item_id;++ RETURN QUERY+ WITH item_revisions AS (+ SELECT+ json_agg(+ json_build_object(+ 'id', i.id,+ 'revision', i."revision",+ 'methodType', i."defaultMethodType",+ 'type', i."type"+ ) ORDER BY+ i."createdAt"+ ) as "revisions"+ FROM "item" i+ WHERE i."readableId" = v_readable_id+ AND i."companyId" = v_company_id+ AND i."type" = 'Material'+ )+ SELECT+ i."active",+ i."assignee",+ i."defaultMethodType",+ i."description",+ i."itemTrackingType",+ i."requiresInspection",+ i."name",+ i."replenishmentSystem",+ i."unitOfMeasureCode",+ i."notes",+ CASE+ WHEN i."thumbnailPath" IS NULL AND mu."thumbnailPath" IS NOT NULL THEN mu."thumbnailPath"+ ELSE i."thumbnailPath"+ END as "thumbnailPath",+ mu.id as "modelUploadId",+ mu."modelPath",+ mu."name" as "modelName",+ mu."size" as "modelSize",+ i."id",+ i."companyId",+ i."readableId",+ i."revision",+ i."readableIdWithRevision",+ ps."supplierIds",+ uom.name as "unitOfMeasure",+ ir."revisions",+ mf."name" AS "materialForm",+ ms."name" AS "materialSubstance",+ mfin."name" AS "finish",+ mg."name" AS "grade",+ md."name" AS "dimensions",+ mt."name" AS "materialType",+ m."materialSubstanceId",+ m."materialFormId",+ m."materialTypeId",+ m."dimensionId",+ m."gradeId",+ m."finishId",+ m."customFields",+ m."tags",+ ic."itemPostingGroupId",+ i."createdBy",+ i."createdAt",+ i."updatedBy",+ i."updatedAt",+ i."mpn"+ FROM "material" m+ LEFT JOIN "item" i ON i."readableId" = m."id" AND i."companyId" = m."companyId"+ LEFT JOIN item_revisions ir ON true+ LEFT JOIN (+ SELECT+ ps."itemId",+ string_agg(ps."supplierPartId", ',') AS "supplierIds"+ FROM "supplierPart" ps+ GROUP BY ps."itemId"+ ) ps ON ps."itemId" = i.id+ LEFT JOIN "modelUpload" mu ON mu.id = i."modelUploadId"+ LEFT JOIN "unitOfMeasure" uom ON uom.code = i."unitOfMeasureCode" AND uom."companyId" = i."companyId"+ LEFT JOIN "materialForm" mf ON mf."id" = m."materialFormId"+ LEFT JOIN "materialSubstance" ms ON ms."id" = m."materialSubstanceId"+ LEFT JOIN "materialDimension" md ON m."dimensionId" = md."id"+ LEFT JOIN "materialFinish" mfin ON m."finishId" = mfin."id"+ LEFT JOIN "materialGrade" mg ON m."gradeId" = mg."id"+ LEFT JOIN "materialType" mt ON m."materialTypeId" = mt."id"+ LEFT JOIN "itemCost" ic ON ic."itemId" = i.id+ WHERE i."id" = item_id;+END;+$$ LANGUAGE plpgsql STABLE;+++-- =============================================================================+-- get_consumable_details (recreated to expose "mpn")+-- Body unchanged from 20260515120000 aside from the new column.+-- =============================================================================+DROP FUNCTION IF EXISTS get_consumable_details(TEXT);+CREATE OR REPLACE FUNCTION get_consumable_details(item_id TEXT)+RETURNS TABLE (+ "active" BOOLEAN,+ "assignee" TEXT,+ "defaultMethodType" "methodType",+ "description" TEXT,+ "itemTrackingType" "itemTrackingType",+ "requiresInspection" BOOLEAN,+ "name" TEXT,+ "replenishmentSystem" "itemReplenishmentSystem",+ "unitOfMeasureCode" TEXT,+ "notes" JSONB,+ "thumbnailPath" TEXT,+ "modelUploadId" TEXT,+ "modelPath" TEXT,+ "modelName" TEXT,+ "modelSize" BIGINT,+ "id" TEXT,+ "companyId" TEXT,+ "readableId" TEXT,+ "revision" TEXT,+ "readableIdWithRevision" TEXT,+ "supplierIds" TEXT,+ "unitOfMeasure" TEXT,+ "revisions" JSON,+ "customFields" JSONB,+ "tags" TEXT[],+ "itemPostingGroupId" TEXT,+ "createdBy" TEXT,+ "createdAt" TIMESTAMP WITH TIME ZONE,+ "updatedBy" TEXT,+ "updatedAt" TIMESTAMP WITH TIME ZONE,+ "mpn" TEXT+) AS $$+DECLARE+ v_readable_id TEXT;+ v_company_id TEXT;+BEGIN+ SELECT i."readableId", i."companyId" INTO v_readable_id, v_company_id+ FROM "item" i+ WHERE i.id = item_id;++ RETURN QUERY+ WITH item_revisions AS (+ SELECT+ json_agg(+ json_build_object(+ 'id', i.id,+ 'revision', i."revision",+ 'methodType', i."defaultMethodType",+ 'type', i."type"+ ) ORDER BY+ i."createdAt"+ ) as "revisions"+ FROM "item" i+ WHERE i."readableId" = v_readable_id+ AND i."companyId" = v_company_id+ AND i."type" = 'Consumable'+ )+ SELECT+ i."active",+ i."assignee",+ i."defaultMethodType",+ i."description",+ i."itemTrackingType",+ i."requiresInspection",+ i."name",+ i."replenishmentSystem",+ i."unitOfMeasureCode",+ i."notes",+ CASE+ WHEN i."thumbnailPath" IS NULL AND mu."thumbnailPath" IS NOT NULL THEN mu."thumbnailPath"+ ELSE i."thumbnailPath"+ END as "thumbnailPath",+ mu.id as "modelUploadId",+ mu."modelPath",+ mu."name" as "modelName",+ mu."size" as "modelSize",+ i."id",+ i."companyId",+ i."readableId",+ i."revision",+ i."readableIdWithRevision",+ ps."supplierIds",+ uom.name as "unitOfMeasure",+ ir."revisions",+ c."customFields",+ c."tags",+ ic."itemPostingGroupId",+ i."createdBy",+ i."createdAt",+ i."updatedBy",+ i."updatedAt",+ i."mpn"+ FROM "consumable" c+ LEFT JOIN "item" i ON i."readableId" = c."id" AND i."companyId" = c."companyId"+ LEFT JOIN item_revisions ir ON true+ LEFT JOIN (+ SELECT+ ps."itemId",+ string_agg(ps."supplierPartId", ',') AS "supplierIds"+ FROM "supplierPart" ps+ GROUP BY ps."itemId"+ ) ps ON ps."itemId" = i.id+ LEFT JOIN "modelUpload" mu ON mu.id = i."modelUploadId"+ LEFT JOIN "unitOfMeasure" uom ON uom.code = i."unitOfMeasureCode" AND uom."companyId" = i."companyId"+ LEFT JOIN "itemCost" ic ON ic."itemId" = i.id+ WHERE i."id" = item_id;+END;+$$ LANGUAGE plpgsql STABLE;+++-- =============================================================================+-- List views — append "mpn" so it can render as a table column and be filtered.+-- CREATE OR REPLACE appends the column at the end, preserving existing column+-- order/names (required by CREATE OR REPLACE VIEW). Bodies are otherwise the+-- verbatim newest definitions (parts: 20260618171234; materials/tools/+-- consumables: 20260624151847).+-- =============================================================================++-- parts view (latest_items selects i.*, so "mpn" is already available as li."mpn")+CREATE OR REPLACE VIEW "parts" WITH (SECURITY_INVOKER=true) AS+WITH latest_items AS (+ SELECT DISTINCT ON (i."readableId", i."companyId")+ i.*,+ mu.id as "modelUploadId",++ mu."modelPath",+ mu."thumbnailPath" as "modelThumbnailPath",+ mu."name" as "modelName",+ mu."size" as "modelSize"+ FROM "item" i+ LEFT JOIN "modelUpload" mu ON mu.id = i."modelUploadId"+ WHERE i."type" = 'Part'+ ORDER BY i."readableId", i."companyId",+ CASE WHEN i."revision" = '0' OR i."revision" = '' OR i."revision" IS NULL THEN 0 ELSE 1 END DESC,+ i."createdAt" DESC NULLS LAST+),+item_revisions AS (+ SELECT+ i."readableId",+ i."companyId",+ json_agg(+ json_build_object(+ 'id', i.id,+ 'revision', i."revision",+ 'name', i."name",+ 'description', i."description",+ 'active', i."active",+ 'createdAt', i."createdAt"+ ) ORDER BY+ CASE WHEN i."revision" = '0' OR i."revision" = '' OR i."revision" IS NULL THEN 0 ELSE 1 END,+ i."createdAt"+ ) as "revisions"+ FROM "item" i+ WHERE i."type" = 'Part'+ GROUP BY i."readableId", i."companyId"+)+SELECT+ li."active",+ li."assignee",+ li."defaultMethodType",+ li."sourcingType",+ li."description",+ li."itemTrackingType",+ li."name",+ li."replenishmentSystem",+ li."unitOfMeasureCode",+ li."notes",+ li."revision",+ li."readableId",+ li."readableIdWithRevision",+ li."id",+ li."companyId",+ CASE+ WHEN li."thumbnailPath" IS NULL AND li."modelThumbnailPath" IS NOT NULL THEN li."modelThumbnailPath"+ ELSE li."thumbnailPath"+ END as "thumbnailPath",++ li."modelPath",+ li."modelName",+ li."modelSize",+ ps."supplierIds",+ uom.name as "unitOfMeasure",+ ir."revisions",+ p."customFields",+ p."tags",+ ic."itemPostingGroupId",+ (+ SELECT COALESCE(+ jsonb_object_agg(+ eim."integration",+ CASE+ WHEN eim."metadata" IS NOT NULL THEN eim."metadata"+ ELSE to_jsonb(eim."externalId")+ END+ ) FILTER (WHERE eim."externalId" IS NOT NULL OR eim."metadata" IS NOT NULL),+ '{}'::jsonb+ )+ FROM "externalIntegrationMapping" eim+ WHERE eim."entityType" = 'item' AND eim."entityId" = li.id+ ) AS "externalId",+ li."createdBy",+ li."createdAt",+ li."updatedBy",+ li."updatedAt",+ ss."supersessionMode",+ li."mpn"+FROM "part" p+INNER JOIN latest_items li ON li."readableId" = p."id" AND li."companyId" = p."companyId"+LEFT JOIN item_revisions ir ON ir."readableId" = p."id" AND ir."companyId" = p."companyId"+LEFT JOIN (+ SELECT+ "itemId",+ "companyId",+ string_agg(ps."supplierPartId", ',') AS "supplierIds"+ FROM "supplierPart" ps+ GROUP BY "itemId", "companyId"+) ps ON ps."itemId" = li."id" AND ps."companyId" = li."companyId"+LEFT JOIN "unitOfMeasure" uom ON uom.code = li."unitOfMeasureCode" AND uom."companyId" = li."companyId"+LEFT JOIN "itemCost" ic ON ic."itemId" = li.id+LEFT JOIN "itemSupersession" ss ON ss."itemId" = li.id AND ss."companyId" = li."companyId";+++-- materials view (latest_items uses an explicit column list — append i_1."mpn")+CREATE OR REPLACE VIEW "materials" WITH (security_invoker = true) AS+ WITH latest_items AS (+ SELECT DISTINCT ON (i_1."readableId", i_1."companyId") i_1.id,+ i_1."readableId",+ i_1.name,+ i_1.description,+ i_1.type,+ i_1."replenishmentSystem",+ i_1."defaultMethodType",+ i_1."itemTrackingType",+ i_1."unitOfMeasureCode",+ i_1.active,+ i_1."companyId",+ i_1."createdBy",+ i_1."createdAt",+ i_1."updatedBy",+ i_1."updatedAt",+ i_1.assignee,+ i_1."modelUploadId",+ i_1."thumbnailPath",+ i_1.notes,+ i_1."trackingMethod",+ i_1.embedding,+ i_1.revision,+ i_1."readableIdWithRevision",+ i_1."requiresInspection",+ i_1."mpn",+ mu_1."modelPath",+ mu_1."thumbnailPath" AS "modelThumbnailPath",+ mu_1.name AS "modelName",+ mu_1.size AS "modelSize"+ FROM item i_1+ LEFT JOIN "modelUpload" mu_1 ON mu_1.id = i_1."modelUploadId"+ WHERE i_1.type = 'Material'::"itemType"+ ORDER BY i_1."readableId", i_1."companyId", (+ CASE+ WHEN i_1.revision = '0'::text OR i_1.revision = ''::text OR i_1.revision IS NULL THEN 0+ ELSE 1+ END) DESC, i_1."createdAt" DESC NULLS LAST+ ), item_revisions AS (+ SELECT i_1."readableId",+ i_1."companyId",+ json_agg(json_build_object('id', i_1.id, 'revision', i_1.revision, 'methodType', i_1."defaultMethodType", 'type', i_1.type) ORDER BY (+ CASE+ WHEN i_1.revision = '0'::text OR i_1.revision = ''::text OR i_1.revision IS NULL THEN 0+ ELSE 1+ END), i_1."createdAt") AS revisions+ FROM item i_1+ WHERE i_1.type = 'Material'::"itemType"+ GROUP BY i_1."readableId", i_1."companyId"+ )+ SELECT i.active,+ i.assignee,+ i."defaultMethodType",+ i.description,+ i."itemTrackingType",+ i.name,+ i."replenishmentSystem",+ i."unitOfMeasureCode",+ i.notes,+ i.revision,+ i."readableId",+ i."readableIdWithRevision",+ i.id,+ i."companyId",+ CASE+ WHEN i."thumbnailPath" IS NULL AND i."modelThumbnailPath" IS NOT NULL THEN i."modelThumbnailPath"+ ELSE i."thumbnailPath"+ END AS "thumbnailPath",+ i."modelUploadId",+ i."modelPath",+ i."modelName",+ i."modelSize",+ ps."supplierIds",+ uom.name AS "unitOfMeasure",+ ir.revisions,+ mf.name AS "materialForm",+ ms.name AS "materialSubstance",+ md.name AS dimensions,+ mfin.name AS finish,+ mg.name AS grade,+ mt.name AS "materialType",+ m."materialSubstanceId",+ m."materialFormId",+ m."customFields",+ m.tags,+ ic."itemPostingGroupId",+ ( SELECT COALESCE(jsonb_object_agg(eim.integration,+ CASE+ WHEN eim.metadata IS NOT NULL THEN eim.metadata+ ELSE to_jsonb(eim."externalId")+ END) FILTER (WHERE eim."externalId" IS NOT NULL OR eim.metadata IS NOT NULL), '{}'::jsonb) AS "coalesce"+ FROM "externalIntegrationMapping" eim+ WHERE eim."entityType" = 'item'::text AND eim."entityId" = i.id) AS "externalId",+ i."createdBy",+ i."createdAt",+ i."updatedBy",+ i."updatedAt",+ ss."supersessionMode",+ i."mpn"+ FROM material m+ JOIN latest_items i ON i."readableId" = m.id AND i."companyId" = m."companyId"+ LEFT JOIN item_revisions ir ON ir."readableId" = m.id AND ir."companyId" = i."companyId"+ LEFT JOIN ( SELECT ps_1."itemId",+ ps_1."companyId",+ string_agg(ps_1."supplierPartId", ','::text) AS "supplierIds"+ FROM "supplierPart" ps_1+ GROUP BY ps_1."itemId", ps_1."companyId") ps ON ps."itemId" = i.id AND ps."companyId" = i."companyId"+ LEFT JOIN "modelUpload" mu ON mu.id = i."modelUploadId"+ LEFT JOIN "unitOfMeasure" uom ON uom.code = i."unitOfMeasureCode" AND uom."companyId" = i."companyId"+ LEFT JOIN "materialForm" mf ON mf.id = m."materialFormId"+ LEFT JOIN "materialSubstance" ms ON ms.id = m."materialSubstanceId"+ LEFT JOIN "materialDimension" md ON m."dimensionId" = md.id+ LEFT JOIN "materialFinish" mfin ON m."finishId" = mfin.id+ LEFT JOIN "materialGrade" mg ON m."gradeId" = mg.id+ LEFT JOIN "materialType" mt ON m."materialTypeId" = mt.id+ LEFT JOIN "itemCost" ic ON ic."itemId" = i.id+ LEFT JOIN "itemSupersession" ss ON ss."itemId" = i.id AND ss."companyId" = i."companyId";+++-- tools view (latest_items + positional alias list — append "mpn" to both)+CREATE OR REPLACE VIEW "tools" WITH (security_invoker = true) AS+ WITH latest_items AS (+ SELECT DISTINCT ON (i."readableId", i."companyId") i.id,+ i."readableId",+ i.name,+ i.description,+ i.type,+ i."replenishmentSystem",+ i."defaultMethodType",+ i."itemTrackingType",+ i."unitOfMeasureCode",+ i.active,+ i."companyId",+ i."createdBy",+ i."createdAt",+ i."updatedBy",+ i."updatedAt",+ i.assignee,+ i."modelUploadId",+ i."thumbnailPath",+ i.notes,+ i."trackingMethod",+ i.embedding,+ i.revision,+ i."readableIdWithRevision",+ i."requiresInspection",+ i."sourcingType",+ mu.id AS "modelUploadId",+ mu."modelPath",+ mu."thumbnailPath" AS "modelThumbnailPath",+ mu.name AS "modelName",+ mu.size AS "modelSize",+ i."mpn"+ FROM item i+ LEFT JOIN "modelUpload" mu ON mu.id = i."modelUploadId"+ WHERE i.type = 'Tool'::"itemType"+ ORDER BY i."readableId", i."companyId", (+ CASE+ WHEN i.revision = '0'::text OR i.revision = ''::text OR i.revision IS NULL THEN 0+ ELSE 1+ END) DESC, i."createdAt" DESC NULLS LAST+ ), item_revisions AS (+ SELECT i."readableId",+ i."companyId",+ json_agg(json_build_object('id', i.id, 'revision', i.revision, 'methodType', i."defaultMethodType", 'type', i.type) ORDER BY (+ CASE+ WHEN i.revision = '0'::text OR i.revision = ''::text OR i.revision IS NULL THEN 0+ ELSE 1+ END), i."createdAt") AS revisions+ FROM item i+ WHERE i.type = 'Tool'::"itemType"+ GROUP BY i."readableId", i."companyId"+ )+ SELECT li.active,+ li.assignee,+ li."defaultMethodType",+ li."sourcingType",+ li.description,+ li."itemTrackingType",+ li.name,+ li."replenishmentSystem",+ li."unitOfMeasureCode",+ li.notes,+ li.revision,+ li."readableId",+ li."readableIdWithRevision",+ li.id,+ li."companyId",+ CASE+ WHEN li."thumbnailPath" IS NULL AND li."modelThumbnailPath" IS NOT NULL THEN li."modelThumbnailPath"+ ELSE li."thumbnailPath"+ END AS "thumbnailPath",+ li."modelPath",+ li."modelName",+ li."modelSize",+ ps."supplierIds",+ uom.name AS "unitOfMeasure",+ ir.revisions,+ t."customFields",+ t.tags,+ ic."itemPostingGroupId",+ ( SELECT COALESCE(jsonb_object_agg(eim.integration,+ CASE+ WHEN eim.metadata IS NOT NULL THEN eim.metadata+ ELSE to_jsonb(eim."externalId")+ END) FILTER (WHERE eim."externalId" IS NOT NULL OR eim.metadata IS NOT NULL), '{}'::jsonb) AS "coalesce"+ FROM "externalIntegrationMapping" eim+ WHERE eim."entityType" = 'item'::text AND eim."entityId" = li.id) AS "externalId",+ li."createdBy",+ li."createdAt",+ li."updatedBy",+ li."updatedAt",+ ss."supersessionMode",+ li."mpn"+ FROM tool t+ JOIN latest_items li(id, "readableId", name, description, type, "replenishmentSystem", "defaultMethodType", "itemTrackingType", "unitOfMeasureCode", active, "companyId", "createdBy", "createdAt", "updatedBy", "updatedAt", assignee, "modelUploadId", "thumbnailPath", notes, "trackingMethod", embedding, revision, "readableIdWithRevision", "requiresInspection", "sourcingType", "modelUploadId_1", "modelPath", "modelThumbnailPath", "modelName", "modelSize", "mpn") ON li."readableId" = t.id AND li."companyId" = t."companyId"+ LEFT JOIN item_revisions ir ON ir."readableId" = t.id AND ir."companyId" = li."companyId"+ LEFT JOIN ( SELECT ps_1."itemId",+ ps_1."companyId",+ string_agg(ps_1."supplierPartId", ','::text) AS "supplierIds"+ FROM "supplierPart" ps_1+ GROUP BY ps_1."itemId", ps_1."companyId") ps ON ps."itemId" = li.id AND ps."companyId" = li."companyId"+ LEFT JOIN "unitOfMeasure" uom ON uom.code = li."unitOfMeasureCode" AND uom."companyId" = li."companyId"+ LEFT JOIN "itemCost" ic ON ic."itemId" = li.id+ LEFT JOIN "itemSupersession" ss ON ss."itemId" = li.id AND ss."companyId" = li."companyId";+++-- consumables view (latest_items uses an explicit column list — append i."mpn")+CREATE OR REPLACE VIEW "consumables" WITH (security_invoker = true) AS+ WITH latest_items AS (+ SELECT DISTINCT ON (i."readableId", i."companyId") i.id,+ i."readableId",+ i.name,+ i.description,+ i.type,+ i."replenishmentSystem",+ i."defaultMethodType",+ i."itemTrackingType",+ i."unitOfMeasureCode",+ i.active,+ i."companyId",+ i."createdBy",+ i."createdAt",+ i."updatedBy",+ i."updatedAt",+ i.assignee,+ i."modelUploadId",+ i."thumbnailPath",+ i.notes,+ i."trackingMethod",+ i.embedding,+ i.revision,+ i."readableIdWithRevision",+ i."requiresInspection",+ i."mpn",+ mu."modelPath",+ mu."thumbnailPath" AS "modelThumbnailPath",+ mu.name AS "modelName",+ mu.size AS "modelSize"+ FROM item i+ LEFT JOIN "modelUpload" mu ON mu.id = i."modelUploadId"+ WHERE i.type = 'Consumable'::"itemType"+ ORDER BY i."readableId", i."companyId", (+ CASE+ WHEN i.revision = '0'::text OR i.revision = ''::text OR i.revision IS NULL THEN 0+ ELSE 1+ END) DESC, i."createdAt" DESC NULLS LAST+ ), item_revisions AS (+ SELECT i."readableId",+ i."companyId",+ json_agg(json_build_object('id', i.id, 'revision', i.revision, 'methodType', i."defaultMethodType", 'type', i.type) ORDER BY (+ CASE+ WHEN i.revision = '0'::text OR i.revision = ''::text OR i.revision IS NULL THEN 0+ ELSE 1+ END), i."createdAt") AS revisions+ FROM item i+ WHERE i.type = 'Consumable'::"itemType"+ GROUP BY i."readableId", i."companyId"+ )+ SELECT li.active,+ li.assignee,+ li."defaultMethodType",+ li.description,+ li."itemTrackingType",+ li.name,+ li."replenishmentSystem",+ li."unitOfMeasureCode",+ li.notes,+ li.revision,+ li."readableId",+ li."readableIdWithRevision",+ li.id,+ li."companyId",+ CASE+ WHEN li."thumbnailPath" IS NULL AND li."modelThumbnailPath" IS NOT NULL THEN li."modelThumbnailPath"+ ELSE li."thumbnailPath"+ END AS "thumbnailPath",+ li."modelUploadId",+ li."modelPath",+ li."modelName",+ li."modelSize",+ ps."supplierIds",+ uom.name AS "unitOfMeasure",+ ir.revisions,+ c."customFields",+ c.tags,+ ic."itemPostingGroupId",+ ( SELECT COALESCE(jsonb_object_agg(eim.integration,+ CASE+ WHEN eim.metadata IS NOT NULL THEN eim.metadata+ ELSE to_jsonb(eim."externalId")+ END) FILTER (WHERE eim."externalId" IS NOT NULL OR eim.metadata IS NOT NULL), '{}'::jsonb) AS "coalesce"+ FROM "externalIntegrationMapping" eim+ WHERE eim."entityType" = 'item'::text AND eim."entityId" = li.id) AS "externalId",+ li."createdBy",+ li."createdAt",+ li."updatedBy",+ li."updatedAt",+ ss."supersessionMode",+ li."mpn"+ FROM consumable c+ JOIN latest_items li ON li."readableId" = c.id AND li."companyId" = c."companyId"+ LEFT JOIN item_revisions ir ON ir."readableId" = c.id AND ir."companyId" = li."companyId"+ LEFT JOIN ( SELECT ps_1."itemId",+ ps_1."companyId",+ string_agg(ps_1."supplierPartId", ','::text) AS "supplierIds"+ FROM "supplierPart" ps_1+ GROUP BY ps_1."itemId", ps_1."companyId") ps ON ps."itemId" = li.id AND ps."companyId" = li."companyId"+ LEFT JOIN "unitOfMeasure" uom ON uom.code = li."unitOfMeasureCode" AND uom."companyId" = li."companyId"+ LEFT JOIN "itemCost" ic ON ic."itemId" = li.id+ LEFT JOIN "itemSupersession" ss ON ss."itemId" = li.id AND ss."companyId" = li."companyId";diff --git a/packages/locale/locales/de/erp.po b/packages/locale/locales/de/erp.poindex 1ed1884ec6..5c814cbd8b 100644--- a/packages/locale/locales/de/erp.po+++ b/packages/locale/locales/de/erp.po@@ -6669,6 +6669,9 @@ msgstr "Manuell"msgid "Manufacturer"msgstr "Hersteller"+msgid "Manufacturer Part Number"+msgstr ""+msgid "Manufacturing"msgstr "Herstellung"@@ -10978,6 +10981,9 @@ msgstr "Lieferanten-Artikel-ID"msgid "Supplier Part Number"msgstr "Lieferantenteilnummer"+msgid "Supplier Part Numbers"+msgstr ""+msgid "Supplier Parts"msgstr "Lieferantenteile"diff --git a/packages/locale/locales/en/erp.po b/packages/locale/locales/en/erp.poindex a2d1203395..c3a3de52c9 100644--- a/packages/locale/locales/en/erp.po+++ b/packages/locale/locales/en/erp.po@@ -6669,6 +6669,9 @@ msgstr "Manual"msgid "Manufacturer"msgstr "Manufacturer"+msgid "Manufacturer Part Number"+msgstr "Manufacturer Part Number"+msgid "Manufacturing"msgstr "Manufacturing"@@ -10978,6 +10981,9 @@ msgstr "Supplier Part ID"msgid "Supplier Part Number"msgstr "Supplier Part Number"+msgid "Supplier Part Numbers"+msgstr "Supplier Part Numbers"+msgid "Supplier Parts"msgstr "Supplier Parts"diff --git a/packages/locale/locales/es/erp.po b/packages/locale/locales/es/erp.poindex 5c49d71001..75dc3608fc 100644--- a/packages/locale/locales/es/erp.po+++ b/packages/locale/locales/es/erp.po@@ -6669,6 +6669,9 @@ msgstr "Manual"msgid "Manufacturer"msgstr "Fabricante"+msgid "Manufacturer Part Number"+msgstr ""+msgid "Manufacturing"msgstr "Fabricación"@@ -10978,6 +10981,9 @@ msgstr "ID de Pieza del Proveedor"msgid "Supplier Part Number"msgstr "Número de Parte del Proveedor"+msgid "Supplier Part Numbers"+msgstr ""+msgid "Supplier Parts"msgstr "Piezas del Proveedor"diff --git a/packages/locale/locales/fr/erp.po b/packages/locale/locales/fr/erp.poindex b65ed38f4b..b09d98a67a 100644--- a/packages/locale/locales/fr/erp.po+++ b/packages/locale/locales/fr/erp.po@@ -6669,6 +6669,9 @@ msgstr "Manuel"msgid "Manufacturer"msgstr "Fabricant"+msgid "Manufacturer Part Number"+msgstr ""+msgid "Manufacturing"msgstr "Fabrication"@@ -10978,6 +10981,9 @@ msgstr "ID de pièce fournisseur"msgid "Supplier Part Number"msgstr "Numéro de pièce fournisseur"+msgid "Supplier Part Numbers"+msgstr ""+msgid "Supplier Parts"msgstr "Pièces du fournisseur"diff --git a/packages/locale/locales/hi/erp.po b/packages/locale/locales/hi/erp.poindex 4ad255dc6f..850a0710d0 100644--- a/packages/locale/locales/hi/erp.po+++ b/packages/locale/locales/hi/erp.po@@ -6669,6 +6669,9 @@ msgstr "मैनुअल"msgid "Manufacturer"msgstr "निर्माता"+msgid "Manufacturer Part Number"+msgstr ""+msgid "Manufacturing"msgstr "विनिर्माण"@@ -10978,6 +10981,9 @@ msgstr "आपूर्तिकर्ता भाग ID"msgid "Supplier Part Number"msgstr "आपूर्तिकर्ता भाग संख्या"+msgid "Supplier Part Numbers"+msgstr ""+msgid "Supplier Parts"msgstr "आपूर्तिकर्ता पार्ट्स"diff --git a/packages/locale/locales/it/erp.po b/packages/locale/locales/it/erp.poindex c172be71be..269a6bc50e 100644--- a/packages/locale/locales/it/erp.po+++ b/packages/locale/locales/it/erp.po@@ -6669,6 +6669,9 @@ msgstr "Manuale"msgid "Manufacturer"msgstr "Produttore"+msgid "Manufacturer Part Number"+msgstr ""+msgid "Manufacturing"msgstr "Produzione"@@ -10978,6 +10981,9 @@ msgstr "ID Parte Fornitore"msgid "Supplier Part Number"msgstr "Numero Parte Fornitore"+msgid "Supplier Part Numbers"+msgstr ""+msgid "Supplier Parts"msgstr "Parti Fornitore"diff --git a/packages/locale/locales/ja/erp.po b/packages/locale/locales/ja/erp.poindex 37fef13e7f..d0433ffc4c 100644--- a/packages/locale/locales/ja/erp.po+++ b/packages/locale/locales/ja/erp.po@@ -6669,6 +6669,9 @@ msgstr "手動"msgid "Manufacturer"msgstr "製造業者"+msgid "Manufacturer Part Number"+msgstr ""+msgid "Manufacturing"msgstr "製造"@@ -10978,6 +10981,9 @@ msgstr "仕入先部品ID"msgid "Supplier Part Number"msgstr "仕入先部品番号"+msgid "Supplier Part Numbers"+msgstr ""+msgid "Supplier Parts"msgstr "サプライヤー部品"diff --git a/packages/locale/locales/pl/erp.po b/packages/locale/locales/pl/erp.poindex 7d6aa6f8f0..68d3351f39 100644--- a/packages/locale/locales/pl/erp.po+++ b/packages/locale/locales/pl/erp.po@@ -6669,6 +6669,9 @@ msgstr "Ręczny"msgid "Manufacturer"msgstr "Producent"+msgid "Manufacturer Part Number"+msgstr ""+msgid "Manufacturing"msgstr "Produkcja"@@ -10978,6 +10981,9 @@ msgstr "ID części dostawcy"msgid "Supplier Part Number"msgstr "Numer części dostawcy"+msgid "Supplier Part Numbers"+msgstr ""+msgid "Supplier Parts"msgstr "Części dostawcy"diff --git a/packages/locale/locales/pt/erp.po b/packages/locale/locales/pt/erp.poindex 5b786fc283..94cbf0acac 100644--- a/packages/locale/locales/pt/erp.po+++ b/packages/locale/locales/pt/erp.po@@ -6669,6 +6669,9 @@ msgstr "Manual"msgid "Manufacturer"msgstr "Fabricante"+msgid "Manufacturer Part Number"+msgstr ""+msgid "Manufacturing"msgstr "Fabricação"@@ -10978,6 +10981,9 @@ msgstr "ID da Peça do Fornecedor"msgid "Supplier Part Number"msgstr "Número da Peça do Fornecedor"+msgid "Supplier Part Numbers"+msgstr ""+msgid "Supplier Parts"msgstr "Peças do Fornecedor"diff --git a/packages/locale/locales/ru/erp.po b/packages/locale/locales/ru/erp.poindex 6beb3b5646..cb1f85b1ea 100644--- a/packages/locale/locales/ru/erp.po+++ b/packages/locale/locales/ru/erp.po@@ -6669,6 +6669,9 @@ msgstr "Ручной"msgid "Manufacturer"msgstr "Производитель"+msgid "Manufacturer Part Number"+msgstr ""+msgid "Manufacturing"msgstr "Производство"@@ -10978,6 +10981,9 @@ msgstr "ID поставщика детали"msgid "Supplier Part Number"msgstr "Номер детали поставщика"+msgid "Supplier Part Numbers"+msgstr ""+msgid "Supplier Parts"msgstr "Детали поставщика"diff --git a/packages/locale/locales/tr/erp.po b/packages/locale/locales/tr/erp.poindex 68c89d7c83..1e02510426 100644--- a/packages/locale/locales/tr/erp.po+++ b/packages/locale/locales/tr/erp.po@@ -6669,6 +6669,9 @@ msgstr "Manuel"msgid "Manufacturer"msgstr "Üretici"+msgid "Manufacturer Part Number"+msgstr ""+msgid "Manufacturing"msgstr "Üretim"@@ -10978,6 +10981,9 @@ msgstr "Tedarikçi Parça Kimliği"msgid "Supplier Part Number"msgstr "Tedarikçi Parça Numarası"+msgid "Supplier Part Numbers"+msgstr ""+msgid "Supplier Parts"msgstr "Tedarikçi Parçaları"diff --git a/packages/locale/locales/zh/erp.po b/packages/locale/locales/zh/erp.poindex fcf0d0f4ed..34f3ac438f 100644--- a/packages/locale/locales/zh/erp.po+++ b/packages/locale/locales/zh/erp.po@@ -6669,6 +6669,9 @@ msgstr "手动"msgid "Manufacturer"msgstr "制造商"+msgid "Manufacturer Part Number"+msgstr ""+msgid "Manufacturing"msgstr "制造"@@ -10978,6 +10981,9 @@ msgstr "供应商零件ID"msgid "Supplier Part Number"msgstr "供应商零件号"+msgid "Supplier Part Numbers"+msgstr ""+msgid "Supplier Parts"msgstr "供应商零件"