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: enhance job materials procurement status handling

naveenkash82d3fa0902c5
diff --git a/apps/erp/app/modules/items/ui/Item/BoMExplorer.tsx b/apps/erp/app/modules/items/ui/Item/BoMExplorer.tsx
index 3c6046ae23..7a5ddfad1a 100644
--- a/apps/erp/app/modules/items/ui/Item/BoMExplorer.tsx
+++ b/apps/erp/app/modules/items/ui/Item/BoMExplorer.tsx
@@ -379,8 +379,8 @@ const BoMExplorer = ({
</div>
</div>
- <div className="flex w-full items-center justify-between gap-2">
- <div className="flex items-center gap-2 overflow-x-hidden">
+ <div className="flex w-full min-w-0 items-center justify-between gap-2">
+ <div className="flex flex-1 min-w-0 items-center gap-2 overflow-hidden">
{bomIdMap.get(node.id) && (
<Badge variant="outline" className="flex-shrink-0">
{bomIdMap.get(node.id)}
@@ -388,7 +388,7 @@ const BoMExplorer = ({
)}
<NodeText node={node} />
</div>
- <div className="flex items-center gap-1">
+ <div className="flex flex-shrink-0 items-center gap-1">
{node.data.isRoot ? (
<Badge variant="outline">
V{makeMethodVersion}
@@ -509,7 +509,7 @@ export function BoMActions({ makeMethodId }: { makeMethodId: string }) {
function NodeText({ node }: { node: FlatTreeItem<Method> }) {
return (
- <div className="flex items-start gap-1">
+ <div className="flex min-w-0 items-start gap-1">
<span className="text-sm truncate font-medium">
{node.data.description || node.data.itemReadableId}
</span>
diff --git a/apps/erp/app/modules/production/production.service.ts b/apps/erp/app/modules/production/production.service.ts
index eb5613f4ef..63d9d26fc3 100644
--- a/apps/erp/app/modules/production/production.service.ts
+++ b/apps/erp/app/modules/production/production.service.ts
@@ -38,7 +38,7 @@ import type {
productionQuantityValidator,
scrapReasonValidator
} from "./production.models";
-import type { Job } from "./types";
+import type { Job, JobMaterialPurchaseOrderLine } from "./types";
export async function convertSalesOrderLinesToJobs(
client: SupabaseClient<Database>,
@@ -3374,3 +3374,39 @@ export async function triggerJobSchedule(
return { success: true };
}
+
+// Purchase order lines for a job's materials, scoped by item + location (not
+// jobId, since planning-generated POs aren't linked to the job). Flattened to
+// the procurement-status shape used by the BoM tree and the Materials table.
+export async function getJobMaterialPurchaseOrderLines(
+ client: SupabaseClient<Database>,
+ materials: Array<{ jobMaterialItemId: string | null }>,
+ locationId: string
+): Promise<JobMaterialPurchaseOrderLine[]> {
+ const itemIds = Array.from(
+ new Set(
+ materials
+ .map((material) => material.jobMaterialItemId)
+ .filter((id): id is string => Boolean(id))
+ )
+ );
+ if (itemIds.length === 0) return [];
+
+ const { data } = await client
+ .from("purchaseOrderLine")
+ .select("itemId, purchaseQuantity, quantityReceived, purchaseOrder(status)")
+ .in("itemId", itemIds)
+ .eq("locationId", locationId);
+
+ return (data ?? []).map((line) => ({
+ itemId: line.itemId,
+ purchaseQuantity: line.purchaseQuantity,
+ quantityReceived: line.quantityReceived,
+ status:
+ (
+ line.purchaseOrder as {
+ status: Database["public"]["Enums"]["purchaseOrderStatus"] | null;
+ } | null
+ )?.status ?? null
+ }));
+}
diff --git a/apps/erp/app/modules/production/types.ts b/apps/erp/app/modules/production/types.ts
index b4df6effa7..81036e546c 100644
--- a/apps/erp/app/modules/production/types.ts
+++ b/apps/erp/app/modules/production/types.ts
@@ -1,3 +1,4 @@
+import type { Database } from "@carbon/database";
import type {
getActiveProductionEvents,
getFailureMode,
@@ -102,6 +103,13 @@ export type JobPurchaseOrderLine = NonNullable<
Awaited<ReturnType<typeof getJobPurchaseOrderLines>>["data"]
>[number];
+export type JobMaterialPurchaseOrderLine = {
+ itemId: string | null;
+ purchaseQuantity: number | null;
+ quantityReceived: number | null;
+ status: Database["public"]["Enums"]["purchaseOrderStatus"] | null;
+};
+
export type ProductionEvent = NonNullable<
Awaited<ReturnType<typeof getProductionEvents>>["data"]
>[number];
diff --git a/apps/erp/app/modules/production/ui/Jobs/JobBoMExplorer.tsx b/apps/erp/app/modules/production/ui/Jobs/JobBoMExplorer.tsx
index 8c6341dc34..eaeda9328b 100644
--- a/apps/erp/app/modules/production/ui/Jobs/JobBoMExplorer.tsx
+++ b/apps/erp/app/modules/production/ui/Jobs/JobBoMExplorer.tsx
@@ -20,7 +20,16 @@ import {
VStack
} from "@carbon/react";
import { Trans, useLingui } from "@lingui/react/macro";
-import { useEffect, useMemo, useRef, useState } from "react";
+import {
+ createContext,
+ type Dispatch,
+ type SetStateAction,
+ useContext,
+ useEffect,
+ useMemo,
+ useRef,
+ useState
+} from "react";
import {
LuBraces,
LuChevronDown,
@@ -47,20 +56,97 @@ import { useIntegrations } from "~/hooks/useIntegrations";
import { getLinkToItemDetails } from "~/modules/items/ui/Item/ItemForm";
import { generateBomIds } from "~/utils/bom";
import { path } from "~/utils/path";
-import type { JobMethod } from "../../production.service";
+import type {
+ getJobMaterialsWithQuantityOnHand,
+ JobMethod
+} from "../../production.service";
+import {
+ getJobMaterialOrderStatus,
+ type ItemOrderStatus,
+ JobOrderStatusBadge,
+ type JobPurchaseOrderLine
+} from "./JobOrderStatus";
+
+type JobMaterialQuantity = NonNullable<
+ Awaited<ReturnType<typeof getJobMaterialsWithQuantityOnHand>>["data"]
+>[number];
+
+// Raw data fetched by the job route loader.
+export type JobOrderStatusData = {
+ materials: JobMaterialQuantity[];
+ purchaseOrderLines: JobPurchaseOrderLine[];
+};
+
+const OrderStatusContext = createContext<Map<string, ItemOrderStatus>>(
+ new Map()
+);
type JobBoMExplorerProps = {
method: FlatTree<JobMethod>;
+ orderStatus?: Promise<JobOrderStatusData>;
};
-const JobBoMExplorer = ({ method }: JobBoMExplorerProps) => {
+const JobBoMExplorer = ({ method, orderStatus }: JobBoMExplorerProps) => {
const parentRef = useRef<HTMLDivElement>(null);
const navigate = useNavigate();
const { t } = useLingui();
const location = useOptimisticLocation();
const [filterText, setFilterText] = useState("");
+ // Single shared "which node's preview is open" so only one hover card shows at
+ // a time (opening one row closes the others).
+ const [openNodeId, setOpenNodeId] = useState<string | null>(null);
const { jobId, methodId } = useParams();
+ const [orderStatusData, setOrderStatusData] =
+ useState<JobOrderStatusData | null>(null);
+
+ // The loader streams order status as a promise so the tree renders
+ // immediately; resolve it here and let the badges fill in afterwards.
+ useEffect(() => {
+ if (!orderStatus) return;
+ const promise = orderStatus;
+ let active = true;
+ async function resolveOrderStatus() {
+ try {
+ const data = await promise;
+ if (active) setOrderStatusData(data);
+ } catch {
+ // Ignore — purchased items simply render without an order badge.
+ }
+ }
+ resolveOrderStatus();
+ return () => {
+ active = false;
+ };
+ }, [orderStatus]);
+
+ // Keyed by jobMaterial id (= the tree node's methodMaterialId).
+ const orderStatusByMaterialId = useMemo(() => {
+ const map = new Map<string, ItemOrderStatus>();
+ if (!orderStatusData) return map;
+
+ const { materials, purchaseOrderLines } = orderStatusData;
+
+ // Group purchase order lines by item.
+ const linesByItemId = new Map<string, JobPurchaseOrderLine[]>();
+ for (const line of purchaseOrderLines) {
+ if (!line.itemId) continue;
+ const lines = linesByItemId.get(line.itemId) ?? [];
+ lines.push(line);
+ linesByItemId.set(line.itemId, lines);
+ }
+
+ for (const material of materials) {
+ if (!material.id) continue;
+ const poLines = material.jobMaterialItemId
+ ? (linesByItemId.get(material.jobMaterialItemId) ?? [])
+ : [];
+ map.set(material.id, getJobMaterialOrderStatus(material, poLines));
+ }
+
+ return map;
+ }, [orderStatusData]);
+
const fetchers = useFetchers();
const getMethodFetcher = fetchers.find(
(f) => f.formAction === path.to.jobMethodGet
@@ -149,231 +235,291 @@ const JobBoMExplorer = ({ method }: JobBoMExplorerProps) => {
}, [selectedMaterialId, methodId, location.pathname, jobId]);
return (
- <VStack className="flex-1 h-full w-full">
- {isLoading ? (
- <div className="flex items-center justify-center py-8 w-full">
- <Spinner className="w-4 h-4" />
- </div>
- ) : (
- <>
- <HStack className="w-full flex-shrink-0">
- <InputGroup size="sm" className="flex flex-grow">
- <InputLeftElement>
- <LuSearch className="h-4 w-4" />
- </InputLeftElement>
- <Input
- placeholder={t`Search...`}
- value={filterText}
- onChange={(e) => setFilterText(e.target.value)}
- />
- </InputGroup>
- {jobId && (
- <DropdownMenu>
- <DropdownMenuTrigger>
- <IconButton
- aria-label={t`Actions`}
- variant="ghost"
- size="sm"
- icon={<LuEllipsisVertical />}
- />
- </DropdownMenuTrigger>
- <DropdownMenuContent align="end">
- <DropdownMenuItem
- onClick={() => {
- if (allExpanded) {
- collapseAllBelowDepth(1);
- } else {
- expandAllBelowDepth(0);
- }
- }}
- >
- <DropdownMenuIcon icon={<LuChevronsUpDown />} />
- {allExpanded ? (
- <Trans>Collapse all</Trans>
- ) : (
- <Trans>Expand all</Trans>
- )}
- </DropdownMenuItem>
- <DropdownMenuSeparator />
- <DropdownMenuItem asChild>
- <a
- href={path.to.api.jobBillOfMaterialsCsv(jobId, false)}
- target="_blank"
- rel="noreferrer"
- >
- <DropdownMenuIcon icon={<LuTable />} />
- <div className="flex flex-grow items-center gap-4 justify-between">
- <span>BoM</span>
- <Badge variant="green" className="text-xs">
- CSV
- </Badge>
- </div>
- </a>
- </DropdownMenuItem>
- <DropdownMenuItem asChild>
- <a
- href={path.to.api.jobBillOfMaterialsCsv(jobId, true)}
- target="_blank"
- rel="noreferrer"
- >
- <DropdownMenuIcon icon={<LuTable />} />
- <div className="flex flex-grow items-center gap-4 justify-between">
- <span>BoM + BoP</span>
- <Badge variant="green" className="text-xs">
- CSV
- </Badge>
- </div>
- </a>
- </DropdownMenuItem>
- <DropdownMenuItem asChild>
- <a
- href={path.to.api.jobBillOfMaterials(jobId, false)}
- target="_blank"
- rel="noreferrer"
- >
- <DropdownMenuIcon icon={<LuBraces />} />
- <div className="flex flex-grow items-center gap-4 justify-between">
- <span>BoM</span>
- <Badge variant="outline" className="text-xs">
- JSON
- </Badge>
- </div>
- </a>
- </DropdownMenuItem>
- <DropdownMenuItem asChild>
- <a
- href={path.to.api.jobBillOfMaterials(jobId, true)}
- target="_blank"
- rel="noreferrer"
- >
- <DropdownMenuIcon icon={<LuBraces />} />
- <div className="flex flex-grow items-center gap-4 justify-between">
- <span>BoM + BoP</span>
- <Badge variant="outline" className="text-xs">
- JSON
- </Badge>
- </div>
- </a>
- </DropdownMenuItem>
- </DropdownMenuContent>
- </DropdownMenu>
- )}
- </HStack>
- <div className="flex flex-1 min-h-0 w-full">
- <TreeView
- parentRef={parentRef}
- virtualizer={virtualizer}
- autoFocus
- tree={method}
- nodes={nodes}
- getNodeProps={getNodeProps}
- getTreeProps={getTreeProps}
- renderNode={({ node, state }) => (
- <HoverCard openDelay={500} closeDelay={0}>
- <HoverCardTrigger asChild>
- <div
- key={node.id}
- className={cn(
- "flex h-8 cursor-pointer items-center overflow-hidden rounded-sm pr-2 gap-1",
- state.selected
- ? "bg-muted hover:bg-accent"
- : "bg-transparent hover:bg-accent"
- )}
+ <OrderStatusContext.Provider value={orderStatusByMaterialId}>
+ <VStack className="flex-1 h-full w-full">
+ {isLoading ? (
+ <div className="flex items-center justify-center py-8 w-full">
+ <Spinner className="w-4 h-4" />
+ </div>
+ ) : (
+ <>
+ <HStack className="w-full flex-shrink-0">
+ <InputGroup size="sm" className="flex flex-grow">
+ <InputLeftElement>
+ <LuSearch className="h-4 w-4" />
+ </InputLeftElement>
+ <Input
+ placeholder={t`Search...`}
+ value={filterText}
+ onChange={(e) => setFilterText(e.target.value)}
+ />
+ </InputGroup>
+ {jobId && (
+ <DropdownMenu>
+ <DropdownMenuTrigger>
+ <IconButton
+ aria-label={t`Actions`}
+ variant="ghost"
+ size="sm"
+ icon={<LuEllipsisVertical />}
+ />
+ </DropdownMenuTrigger>
+ <DropdownMenuContent align="end">
+ <DropdownMenuItem
onClick={() => {
- selectNode(node.id, false);
- const nodePath = getNodePath(node);
-
- if (location.pathname !== nodePath) {
- navigate(
- `${nodePath}?materialId=${node.data.methodMaterialId}`,
- { replace: true }
- );
+ if (allExpanded) {
+ collapseAllBelowDepth(1);
} else {
- setSearchParams({
- materialId: node.data.methodMaterialId
- });
+ expandAllBelowDepth(0);
}
}}
>
- <div className="flex h-8 items-center">
- {Array.from({ length: node.level }).map((_, index) => (
- <LevelLine
- key={index}
- isSelected={getNodePath(node) === location.pathname}
- />
- ))}
- <div
- className={cn(
- "flex h-8 w-4 items-center",
- node.hasChildren && "hover:bg-accent"
- )}
- onClick={(e) => {
- e.stopPropagation();
- if (e.altKey) {
- if (state.expanded) {
- collapseAllBelowDepth(node.level);
- } else {
- expandAllBelowDepth(node.level);
- }
- } else {
- toggleExpandNode(node.id);
- }
- }}
- >
- {node.hasChildren ? (
- state.expanded ? (
- <LuChevronDown className="h-4 w-4 text-gray-400 flex-shrink-0 ml-1" />
- ) : (
- <LuChevronRight className="h-4 w-4 text-gray-400 flex-shrink-0 ml-1" />
- )
- ) : (
- <div className="h-8 w-4" />
- )}
+ <DropdownMenuIcon icon={<LuChevronsUpDown />} />
+ {allExpanded ? (
+ <Trans>Collapse all</Trans>
+ ) : (
+ <Trans>Expand all</Trans>
+ )}
+ </DropdownMenuItem>
+ <DropdownMenuSeparator />
+ <DropdownMenuItem asChild>
+ <a
+ href={path.to.api.jobBillOfMaterialsCsv(jobId, false)}
+ target="_blank"
+ rel="noreferrer"
+ >
+ <DropdownMenuIcon icon={<LuTable />} />
+ <div className="flex flex-grow items-center gap-4 justify-between">
+ <span>BoM</span>
+ <Badge variant="green" className="text-xs">
+ CSV
+ </Badge>
</div>
- </div>
-
- <div className="flex w-full items-center justify-between gap-2">
- <div className="flex items-center gap-2 overflow-x-hidden">
- {bomIdMap.get(node.id) && (
- <Badge variant="outline" className="flex-shrink-0">
- {bomIdMap.get(node.id)}
- </Badge>
- )}
- <NodeText node={node} />
+ </a>
+ </DropdownMenuItem>
+ <DropdownMenuItem asChild>
+ <a
+ href={path.to.api.jobBillOfMaterialsCsv(jobId, true)}
+ target="_blank"
+ rel="noreferrer"
+ >
+ <DropdownMenuIcon icon={<LuTable />} />
+ <div className="flex flex-grow items-center gap-4 justify-between">
+ <span>BoM + BoP</span>
+ <Badge variant="green" className="text-xs">
+ CSV
+ </Badge>
</div>
- <div className="flex items-center gap-1">
- {node.data.isRoot ? (
- <Badge variant="outline">
- V{node.data.version}
- </Badge>
- ) : (
- <NodeData node={node} />
- )}
+ </a>
+ </DropdownMenuItem>
+ <DropdownMenuItem asChild>
+ <a
+ href={path.to.api.jobBillOfMaterials(jobId, false)}
+ target="_blank"
+ rel="noreferrer"
+ >
+ <DropdownMenuIcon icon={<LuBraces />} />
+ <div className="flex flex-grow items-center gap-4 justify-between">
+ <span>BoM</span>
+ <Badge variant="outline" className="text-xs">
+ JSON
+ </Badge>
</div>
- </div>
- </div>
- </HoverCardTrigger>
- <HoverCardContent
- side="right"
- className="pointer-events-none"
- >
- <NodePreview node={node} />
- </HoverCardContent>
- </HoverCard>
+ </a>
+ </DropdownMenuItem>
+ <DropdownMenuItem asChild>
+ <a
+ href={path.to.api.jobBillOfMaterials(jobId, true)}
+ target="_blank"
+ rel="noreferrer"
+ >
+ <DropdownMenuIcon icon={<LuBraces />} />
+ <div className="flex flex-grow items-center gap-4 justify-between">
+ <span>BoM + BoP</span>
+ <Badge variant="outline" className="text-xs">
+ JSON
+ </Badge>
+ </div>
+ </a>
+ </DropdownMenuItem>
+ </DropdownMenuContent>
+ </DropdownMenu>
)}
- />
- </div>
- </>
- )}
- </VStack>
+ </HStack>
+ <div className="flex flex-1 min-h-0 w-full">
+ <TreeView
+ parentRef={parentRef}
+ virtualizer={virtualizer}
+ autoFocus
+ tree={method}
+ nodes={nodes}
+ getNodeProps={getNodeProps}
+ getTreeProps={getTreeProps}
+ renderNode={({ node, state }) => (
+ <JobBoMTreeNode
+ node={node}
+ state={state}
+ bomId={bomIdMap.get(node.id)}
+ openNodeId={openNodeId}
+ setOpenNodeId={setOpenNodeId}
+ selectNode={selectNode}
+ toggleExpandNode={toggleExpandNode}
+ collapseAllBelowDepth={collapseAllBelowDepth}
+ expandAllBelowDepth={expandAllBelowDepth}
+ navigate={navigate}
+ setSearchParams={setSearchParams}
+ location={location}
+ />
+ )}
+ />
+ </div>
+ </>
+ )}
+ </VStack>
+ </OrderStatusContext.Provider>
);
};
export default JobBoMExplorer;
+function JobBoMTreeNode({
+ node,
+ state,
+ bomId,
+ openNodeId,
+ setOpenNodeId,
+ selectNode,
+ toggleExpandNode,
+ collapseAllBelowDepth,
+ expandAllBelowDepth,
+ navigate,
+ setSearchParams,
+ location
+}: {
+ node: FlatTreeItem<JobMethod>;
+ state: { selected: boolean; expanded: boolean };
+ bomId: string | undefined;
+ openNodeId: string | null;
+ setOpenNodeId: Dispatch<SetStateAction<string | null>>;
+ selectNode: (id: string, scrollIntoView?: boolean) => void;
+ toggleExpandNode: (id: string) => void;
+ collapseAllBelowDepth: (depth: number) => void;
+ expandAllBelowDepth: (depth: number) => void;
+ navigate: ReturnType<typeof useNavigate>;
+ setSearchParams: ReturnType<typeof useSearchParams>[1];
+ location: { pathname: string };
+}) {
+ // Suppress the preview while the pointer is over the status badge, so its
+ // own tooltip is readable without the large preview card overlapping it.
+ const [isBadgeHovered, setIsBadgeHovered] = useState(false);
+
+ return (
+ <HoverCard
+ open={openNodeId === node.id && !isBadgeHovered}
+ onOpenChange={(nextOpen) => {
+ // Opening this node becomes the single open node (closing any other);
+ // closing only clears if this node is still the open one.
+ setOpenNodeId((current) =>
+ nextOpen ? node.id : current === node.id ? null : current
+ );
+ }}
+ openDelay={500}
+ closeDelay={150}
+ >
+ <HoverCardTrigger asChild>
+ <div
+ key={node.id}
+ className={cn(
+ "flex h-8 cursor-pointer items-center overflow-hidden rounded-sm pr-2 gap-1",
+ state.selected
+ ? "bg-muted hover:bg-accent"
+ : "bg-transparent hover:bg-accent"
+ )}
+ onClick={() => {
+ selectNode(node.id, false);
+ const nodePath = getNodePath(node);
+
+ if (location.pathname !== nodePath) {
+ navigate(`${nodePath}?materialId=${node.data.methodMaterialId}`, {
+ replace: true
+ });
+ } else {
+ setSearchParams({
+ materialId: node.data.methodMaterialId
+ });
+ }
+ }}
+ >
+ <div className="flex h-8 items-center">
+ {Array.from({ length: node.level }).map((_, index) => (
+ <LevelLine
+ key={index}
+ isSelected={getNodePath(node) === location.pathname}
+ />
+ ))}
+ <div
+ className={cn(
+ "flex h-8 w-4 items-center",
+ node.hasChildren && "hover:bg-accent"
+ )}
+ onClick={(e) => {
+ e.stopPropagation();
+ if (e.altKey) {
+ if (state.expanded) {
+ collapseAllBelowDepth(node.level);
+ } else {
+ expandAllBelowDepth(node.level);
+ }
+ } else {
+ toggleExpandNode(node.id);
+ }
+ }}
+ >
+ {node.hasChildren ? (
+ state.expanded ? (
+ <LuChevronDown className="h-4 w-4 text-gray-400 flex-shrink-0 ml-1" />
+ ) : (
+ <LuChevronRight className="h-4 w-4 text-gray-400 flex-shrink-0 ml-1" />
+ )
+ ) : (
+ <div className="h-8 w-4" />
+ )}
+ </div>
+ </div>
+
+ <div className="flex w-full min-w-0 items-center justify-between gap-2">
+ <div className="flex flex-1 min-w-0 items-center gap-2 overflow-hidden">
+ {bomId && (
+ <Badge variant="outline" className="flex-shrink-0">
+ {bomId}
+ </Badge>
+ )}
+ <NodeText node={node} />
+ </div>
+ <div
+ className="flex flex-shrink-0 items-center gap-1"
+ onPointerEnter={() => setIsBadgeHovered(true)}
+ onPointerLeave={() => setIsBadgeHovered(false)}
+ >
+ {node.data.isRoot ? (
+ <Badge variant="outline">V{node.data.version}</Badge>
+ ) : (
+ <NodeData node={node} />
+ )}
+ </div>
+ </div>
+ </div>
+ </HoverCardTrigger>
+ <HoverCardContent side="right">
+ <NodePreview node={node} />
+ </HoverCardContent>
+ </HoverCard>
+ );
+}
+
function NodeText({ node }: { node: FlatTreeItem<JobMethod> }) {
return (
- <div className="flex items-center gap-1">
+ <div className="flex min-w-0 items-center gap-1">
<span className="font-medium text-sm truncate">
{node.data.description || node.data.itemReadableId}
</span>
@@ -389,6 +535,14 @@ function NodeData({ node }: { node: FlatTreeItem<JobMethod> }) {
node.data.externalId?.["onshapeData"]?.["State"]
: null;
+ const orderStatusByMaterialId = useContext(OrderStatusContext);
+ // Show the procurement badge for any material that has order status —
+ // purchased, pulled from inventory, or a buy-and-make part. Materials with no
+ // shortfall and no PO (e.g. a make-to-order part) render nothing.
+ const orderStatus = node.data.methodMaterialId
+ ? orderStatusByMaterialId.get(node.data.methodMaterialId)
+ : undefined;
+
return (
<HStack spacing={1}>
<Badge className="text-xs" variant="outline">
@@ -403,6 +557,10 @@ function NodeData({ node }: { node: FlatTreeItem<JobMethod> }) {
{node.data.quantity}
</Badge>
{onShapeState && <OnshapeStatus status={onShapeState} />}
+ <JobOrderStatusBadge
+ status={orderStatus}
+ jobQuantity={node.data.quantity}
+ />
</HStack>
);
}
@@ -425,12 +583,13 @@ function NodePreview({ node }: { node: FlatTreeItem<JobMethod> }) {
<HStack className="w-full justify-between">
<span>{node.data.itemReadableId}</span>
<HStack spacing={1}>
- <Copy text={node.data.itemReadableId} />
+ <Copy text={node.data.itemReadableId} tooltipClassName="z-[110]" />
<Link
to={getLinkToItemDetails(
node.data.itemType as "Part",
node.data.itemId
)}
+ target="_blank"
>
<IconButton
aria-label={t`View Item Master`}
@@ -448,7 +607,7 @@ function NodePreview({ node }: { node: FlatTreeItem<JobMethod> }) {
</span>
<HStack className="w-full justify-between">
<span>{node.data.description}</span>
- <Copy text={node.data.description} />
+ <Copy text={node.data.description} tooltipClassName="z-[110]" />
</HStack>
</VStack>
<VStack spacing={1}>
diff --git a/apps/erp/app/modules/production/ui/Jobs/JobMaterialsTable.tsx b/apps/erp/app/modules/production/ui/Jobs/JobMaterialsTable.tsx
index b5ce4a277a..a46534d5b2 100644
--- a/apps/erp/app/modules/production/ui/Jobs/JobMaterialsTable.tsx
+++ b/apps/erp/app/modules/production/ui/Jobs/JobMaterialsTable.tsx
@@ -17,7 +17,7 @@ import {
import { Trans, useLingui } from "@lingui/react/macro";
import { useNumberFormatter } from "@react-aria/i18n";
import type { ColumnDef } from "@tanstack/react-table";
-import { memo, useEffect, useMemo, useState } from "react";
+import { memo, type ReactNode, useEffect, useMemo, useState } from "react";
import {
LuArrowDown,
LuArrowLeftRight,
@@ -55,18 +55,53 @@ import {
} from "~/stores/stock-transfer";
import { path } from "~/utils/path";
import type { Job, JobMaterial } from "../../types";
+import {
+ getJobMaterialOrderStatus,
+ JobOrderStatusBadge,
+ type JobPurchaseOrderLine
+} from "./JobOrderStatus";
type JobMaterialsTableProps = {
data: JobMaterial[];
count: number;
+ purchaseOrderLines: JobPurchaseOrderLine[];
nearExpiryWarningDays?: number | null;
};
+// A column header with an explanatory tooltip on hover.
+function HeaderTooltip({ label, hint }: { label: ReactNode; hint: ReactNode }) {
+ return (
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <span className="cursor-help">{label}</span>
+ </TooltipTrigger>
+ <TooltipContent className="max-w-xs">{hint}</TooltipContent>
+ </Tooltip>
+ );
+}
+
const JobMaterialsTable = memo(
- ({ data, count, nearExpiryWarningDays }: JobMaterialsTableProps) => {
+ ({
+ data,
+ count,
+ purchaseOrderLines,
+ nearExpiryWarningDays
+ }: JobMaterialsTableProps) => {
const { jobId } = useParams();
const { t } = useLingui();
if (!jobId) throw new Error("Job ID is required");
+ // Purchase order lines grouped by item, for the procurement-status column.
+ const poLinesByItemId = useMemo(() => {
+ const map = new Map<string, JobPurchaseOrderLine[]>();
+ for (const line of purchaseOrderLines) {
+ if (!line.itemId) continue;
+ const lines = map.get(line.itemId) ?? [];
+ lines.push(line);
+ map.set(line.itemId, lines);
+ }
+ return map;
+ }, [purchaseOrderLines]);
+
const routeData = useRouteData<{ job: Job }>(path.to.job(jobId));
const isRequired = ["Planned", "Ready", "In Progress", "Paused"].includes(
routeData?.job?.status ?? ""
@@ -109,24 +144,28 @@ const JobMaterialsTable = memo(
: material.quantityFromProductionOrderInStorageUnit +
material.estimatedQuantity;
- // Check if transfer is needed
+ // Check if transfer is needed. Only propose moving what actually exists
+ // in OTHER storage units (quantityOnHandNotInStorageUnit) — a transfer
+ // can't source stock that isn't there. Any remaining gap is a genuine
+ // shortage, handled by the order path below.
const quantityOnHandInStorageUnit =
material.quantityOnHandInStorageUnit;
const quantityInTransitToStorageUnit =
material.quantityInTransitToStorageUnit;
- const hasStorageUnitQuantityFlag =
- quantityOnHandInStorageUnit + quantityInTransitToStorageUnit <
- quantityRequiredByStorageUnit;
+ const transferQuantity = Math.min(
+ quantityRequiredByStorageUnit -
+ (quantityOnHandInStorageUnit + quantityInTransitToStorageUnit),
+ material.quantityOnHandNotInStorageUnit
+ );
- if (hasStorageUnitQuantityFlag) {
+ if (transferQuantity > 0) {
itemsToAdd.push({
id: material.id, // Job material ID
itemId: material.jobMaterialItemId, // Actual item ID
itemReadableId: material.itemReadableId,
description: material.description,
action: "transfer",
- quantity:
- quantityRequiredByStorageUnit - quantityOnHandInStorageUnit,
+ quantity: transferQuantity,
requiresSerialTracking: material.itemTrackingType === "Serial",
requiresBatchTracking: material.itemTrackingType === "Batch",
storageUnitId: material.storageUnitId
@@ -224,9 +263,46 @@ const JobMaterialsTable = memo(
}
}
},
+ {
+ id: "orderStatus",
+ header: () => (
+ <HeaderTooltip
+ label={t`Status`}
+ hint={
+ <Trans>
+ Procurement status — needs ordering, planned, on order, or
+ received. The same indicator shown in the BoM tree.
+ </Trans>
+ }
+ />
+ ),
+ cell: ({ row }) => {
+ const poLines = row.original.jobMaterialItemId
+ ? (poLinesByItemId.get(row.original.jobMaterialItemId) ?? [])
+ : [];
+ return (
+ <JobOrderStatusBadge
+ status={getJobMaterialOrderStatus(row.original, poLines)}
+ jobQuantity={row.original.estimatedQuantity ?? 0}
+ />
+ );
+ },
+ meta: {
+ icon: <LuShoppingCart />
+ }
+ },
{
accessorKey: "estimatedQuantity",
- header: t`Required`,
+ header: () => (
+ <HeaderTooltip
+ label={t`Required`}
+ hint={
+ <Trans>
+ This job's own required quantity for the material.
+ </Trans>
+ }
+ />
+ ),
cell: ({ row }) => formatter.format(row.original.estimatedQuantity),
meta: {
icon: <LuHash />
@@ -234,7 +310,17 @@ const JobMaterialsTable = memo(
},
{
id: "method",
- header: t`Method`,
+ header: () => (
+ <HeaderTooltip
+ label={t`Method`}
+ hint={
+ <Trans>
+ How the material is sourced (make, purchase, or pull from
+ inventory) and the storage unit it's pulled from.
+ </Trans>
+ }
+ />
+ ),
cell: ({ row }) => (
<HStack>
<Badge variant="secondary">
@@ -253,7 +339,18 @@ const JobMaterialsTable = memo(
{
id: "quantityOnHandInStorageUnit",
- header: t`On Storage Unit`,
+ header: () => (
+ <HeaderTooltip
+ label={t`On Storage Unit`}
+ hint={
+ <Trans>
+ Quantity physically on the material's assigned storage unit
+ (shelf). Turns red when it's below what that unit needs to
+ supply.
+ </Trans>
+ }
+ />
+ ),
cell: ({ row }) => {
const isInventoried =
row.original.itemTrackingType !== "Non-Inventory";
@@ -336,7 +433,18 @@ const JobMaterialsTable = memo(
},
{
id: "quantityOnHand",
- header: t`On Hand`,
+ header: () => (
+ <HeaderTooltip
+ label={t`On Hand`}
+ hint={
+ <Trans>
+ Total quantity on hand for the item across all storage units
+ at this location. Turns red when on hand plus incoming can't
+ cover total demand.
+ </Trans>
+ }
+ />
+ ),
cell: ({ row }) => {
if (
row.original.itemTrackingType === "Non-Inventory" ||
@@ -403,20 +511,38 @@ const JobMaterialsTable = memo(
},
{
id: "required",
- header: t`Required`,
+ header: () => (
+ <HeaderTooltip
+ label={t`Required`}
+ hint={
+ <Trans>
+ Total quantity required across all active jobs and sales
+ orders at this location — not just this job.
+ </Trans>
+ }
+ />
+ ),
cell: ({ row }) =>
formatter.format(
row.original.quantityFromProductionOrderInStorageUnit +
row.original.quantityFromProductionOrderNotInStorageUnit +
row.original.quantityOnSalesOrder
),
- meta: {
- icon: <LuArrowDown className="text-red-600" />
- }
+ meta: { icon: <LuArrowDown className="text-red-600" /> }
},
{
id: "incoming",
- header: t`Incoming`,
+ header: () => (
+ <HeaderTooltip
+ label={t`Incoming`}
+ hint={
+ <Trans>
+ Quantity arriving — on open purchase orders plus on production
+ (make) orders.
+ </Trans>
+ }
+ />
+ ),
cell: ({ row }) =>
formatter.format(
row.original.quantityOnPurchaseOrder +
@@ -428,7 +554,17 @@ const JobMaterialsTable = memo(
},
{
id: "transfer",
- header: t`Transfer`,
+ header: () => (
+ <HeaderTooltip
+ label={t`Transfer`}
+ hint={
+ <Trans>
+ Quantity in transit to the storage unit via open stock
+ transfers.
+ </Trans>
+ }
+ />
+ ),
cell: ({ row }) =>
formatter.format(row.original.quantityInTransitToStorageUnit),
meta: {
@@ -442,7 +578,8 @@ const JobMaterialsTable = memo(
setSearchParams,
isRequired,
formatter,
- sessionItemsCount
+ sessionItemsCount,
+ poLinesByItemId
]);
const renderContextMenu = useMemo(() => {
diff --git a/apps/erp/app/modules/production/ui/Jobs/JobOrderStatus.tsx b/apps/erp/app/modules/production/ui/Jobs/JobOrderStatus.tsx
new file mode 100644
index 0000000000..09a81e4518
--- /dev/null
+++ b/apps/erp/app/modules/production/ui/Jobs/JobOrderStatus.tsx
@@ -0,0 +1,167 @@
+import type { Database } from "@carbon/database";
+import {
+ PulsingDot,
+ Tooltip,
+ TooltipContent,
+ TooltipTrigger
+} from "@carbon/react";
+import { Trans } from "@lingui/react/macro";
+import type { ReactNode } from "react";
+import { LuCircleCheck } from "react-icons/lu";
+import { AlmostDoneIcon } from "~/assets/icons/AlmostDoneIcon";
+import { InProgressStatusIcon } from "~/assets/icons/InProgressStatusIcon";
+import { TodoStatusIcon } from "~/assets/icons/TodoStatusIcon";
+import type { JobMaterialPurchaseOrderLine } from "../../types";
+
+export type PurchaseOrderStatus =
+ Database["public"]["Enums"]["purchaseOrderStatus"];
+
+// The item+location scoped PO line shape lives in the production module's types
+// (produced by getJobMaterialPurchaseOrderLines); re-exported under the name the
+// tree and table already use.
+export type JobPurchaseOrderLine = JobMaterialPurchaseOrderLine;
+
+// Procurement status surfaced for a job material.
+// needsOrder — shortfall (same predicate as the Materials page "create order");
+// shown as the pulsing dot when there's no active PO.
+// status — the most relevant active PO, with its receipt quantities.
+export type ItemOrderStatus = {
+ needsOrder: boolean;
+ status: PurchaseOrderStatus | null;
+ ordered: number;
+ received: number;
+};
+
+// When an item has several POs, surface the most relevant one: prefer an active
+// (in-flight) order over a received one, advancing planned → receipt. Draft,
+// cancelled, closed and rejected statuses are intentionally absent — an
+// unsubmitted/dead PO isn't a real order, so it counts as "no active PO".
+export const PO_STATUS_PRIORITY: PurchaseOrderStatus[] = [
+ "To Receive",
+ "To Receive and Invoice",
+ "Needs Approval",
+ "To Review",
+ "Planned",
+ "To Invoice",
+ "Completed"
+];
+
+// Only the quantity-on-hand fields the shortfall predicate needs.
+type OrderStatusMaterial = {
+ itemTrackingType: string | null;
+ methodType: string | null;
+ quantityOnHandInStorageUnit: number | null;
+ quantityOnHandNotInStorageUnit: number | null;
+ quantityOnPurchaseOrder: number | null;
+ quantityOnProductionOrder: number | null;
+ quantityFromProductionOrderInStorageUnit: number | null;
+ quantityFromProductionOrderNotInStorageUnit: number | null;
+ quantityOnSalesOrder: number | null;
+};
+
+// Compute the procurement status for one material from its PO lines.
+export function getJobMaterialOrderStatus(
+ material: OrderStatusMaterial,
+ poLines: JobPurchaseOrderLine[]
+): ItemOrderStatus {
+ const onHand =
+ (material.quantityOnHandInStorageUnit ?? 0) +
+ (material.quantityOnHandNotInStorageUnit ?? 0);
+ const incoming =
+ (material.quantityOnPurchaseOrder ?? 0) +
+ (material.quantityOnProductionOrder ?? 0);
+ const required =
+ (material.quantityFromProductionOrderInStorageUnit ?? 0) +
+ (material.quantityFromProductionOrderNotInStorageUnit ?? 0) +
+ (material.quantityOnSalesOrder ?? 0);
+ const needsOrder =
+ material.itemTrackingType !== "Non-Inventory" &&
+ material.methodType !== "Make to Order" &&
+ onHand + incoming - required < 0;
+
+ const status =
+ PO_STATUS_PRIORITY.find((candidate) =>
+ poLines.some((line) => line.status === candidate)
+ ) ?? null;
+
+ let ordered = 0;
+ let received = 0;
+ if (status) {
+ for (const line of poLines) {
+ if (line.status !== status) continue;
+ ordered += line.purchaseQuantity ?? 0;
+ received += line.quantityReceived ?? 0;
+ }
+ }
+
+ return { needsOrder, status, ordered, received };
+}
+
+// The procurement status badge, shared by the BoM tree and the Materials table.
+// An in-flight purchase order takes priority over the needs-ordering dot.
+export function JobOrderStatusBadge({
+ status,
+ jobQuantity
+}: {
+ status: ItemOrderStatus | undefined;
+ jobQuantity: number;
+}) {
+ const badge = (icon: ReactNode, label: ReactNode) => (
+ <Tooltip>
+ <TooltipTrigger className="flex w-5 items-center justify-center">
+ {icon}
+ </TooltipTrigger>
+ <TooltipContent>{label}</TooltipContent>
+ </Tooltip>
+ );
+
+ switch (status?.status) {
+ case "Planned":
+ return badge(
+ <TodoStatusIcon className="text-blue-600" />,
+ <Trans>Planned purchase order</Trans>
+ );
+ case "Needs Approval":
+ case "To Review":
+ return badge(<InProgressStatusIcon />, <Trans>Awaiting approval</Trans>);
+ case "To Receive":
+ case "To Receive and Invoice": {
+ const fraction =
+ status.ordered > 0 ? status.received / status.ordered : 0;
+ if (fraction >= 1) {
+ return badge(
+ <LuCircleCheck className="text-emerald-600" />,
+ <Trans>Received</Trans>
+ );
+ }
+ if (status.received > 0) {
+ return badge(<AlmostDoneIcon />, <Trans>Receiving</Trans>);
+ }
+ return badge(<AlmostDoneIcon />, <Trans>On order</Trans>);
+ }
+ }
+
+ // No in-flight PO. If there's still a shortfall, it needs ordering.
+ if (status?.needsOrder) {
+ return (
+ <Tooltip>
+ <TooltipTrigger className="flex w-5 items-center justify-center">
+ <PulsingDot />
+ </TooltipTrigger>
+ <TooltipContent>
+ <Trans>Order {jobQuantity} for this job</Trans>
+ </TooltipContent>
+ </Tooltip>
+ );
+ }
+
+ // Already received (To Invoice / Completed) and no new shortfall.
+ if (status?.status === "To Invoice" || status?.status === "Completed") {
+ return badge(
+ <LuCircleCheck className="text-emerald-600" />,
+ <Trans>Received</Trans>
+ );
+ }
+
+ return null;
+}
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 db0f8562af..2d88b92b86 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-12T08:34:31.151Z",
- "totalTools": 1187,
+ "generated": "2026-06-12T12:13:33.200Z",
+ "totalTools": 1188,
"modules": 15,
"tools": [
{
@@ -17355,6 +17355,34 @@
]
}
},
+ {
+ "name": "production_getJobMaterialPurchaseOrderLines",
+ "module": "production",
+ "classification": "READ",
+ "description": "get job material purchase order lines",
+ "paramCount": 2,
+ "serviceParams": [
+ "client",
+ "materials",
+ "locationId"
+ ],
+ "injectAuth": [
+ "companyId"
+ ],
+ "schema": {
+ "type": "object",
+ "properties": {
+ "materials": {},
+ "locationId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "materials",
+ "locationId"
+ ]
+ }
+ },
{
"name": "purchasing_closePurchaseOrder",
"module": "purchasing",
diff --git a/apps/erp/app/routes/x+/job+/$jobId.materials.tsx b/apps/erp/app/routes/x+/job+/$jobId.materials.tsx
index b4bd68e710..5121007342 100644
--- a/apps/erp/app/routes/x+/job+/$jobId.materials.tsx
+++ b/apps/erp/app/routes/x+/job+/$jobId.materials.tsx
@@ -8,6 +8,7 @@ import { redirect, useLoaderData } from "react-router";
import { usePanels } from "~/components/Layout";
import {
getJob,
+ getJobMaterialPurchaseOrderLines,
getJobMaterialsWithQuantityOnHand
} from "~/modules/production";
import { JobMaterialsTable } from "~/modules/production/ui/Jobs";
@@ -91,18 +92,27 @@ export async function loader({ request, params }: LoaderFunctionArgs) {
}
}
+ // Purchase order lines (item + location scoped) for the procurement-status
+ // column — same source the BoM tree uses.
+ const purchaseOrderLines = await getJobMaterialPurchaseOrderLines(
+ client,
+ materials.data ?? [],
+ job.data.locationId ?? ""
+ );
+
return {
count: materials.count ?? 0,
materials: (materials.data ?? []).map((m) => ({
...m,
hasExpiredBatch: expiredItemIds.has(m.jobMaterialItemId ?? "")
})),
+ purchaseOrderLines,
nearExpiryWarningDays
};
}
export default function JobMaterialsRoute() {
- const { count, materials, nearExpiryWarningDays } =
+ const { count, materials, purchaseOrderLines, nearExpiryWarningDays } =
useLoaderData<typeof loader>();
const { setIsExplorerCollapsed } = usePanels();
@@ -115,6 +125,7 @@ export default function JobMaterialsRoute() {
<JobMaterialsTable
data={materials}
count={count}
+ purchaseOrderLines={purchaseOrderLines}
nearExpiryWarningDays={nearExpiryWarningDays}
/>
</VStack>
diff --git a/apps/erp/app/routes/x+/job+/$jobId.tsx b/apps/erp/app/routes/x+/job+/$jobId.tsx
index 3c950d38c6..479d592546 100644
--- a/apps/erp/app/routes/x+/job+/$jobId.tsx
+++ b/apps/erp/app/routes/x+/job+/$jobId.tsx
@@ -20,6 +20,8 @@ import type { JobMethodTreeItem } from "~/modules/production";
import {
getJob,
getJobDocuments,
+ getJobMaterialPurchaseOrderLines,
+ getJobMaterialsWithQuantityOnHand,
getJobMethodTree,
getTrackedEntitiesByJobId
} from "~/modules/production";
@@ -28,10 +30,39 @@ import {
JobHeader,
JobProperties
} from "~/modules/production/ui/Jobs";
+import type { JobOrderStatusData } from "~/modules/production/ui/Jobs/JobBoMExplorer";
import { getTagsList } from "~/modules/shared";
import type { Handle } from "~/utils/handle";
import { path } from "~/utils/path";
+// Resolves each job material's procurement status for the BoM explorer badge:
+// its quantity-on-hand row (for the "needs ordering" shortfall, matching the
+// Materials page) and its purchase order lines (looked up by item + location,
+// not jobId, since planning-generated POs aren't linked to the job). Returned as
+// a promise so the explorer renders immediately and the badges stream in.
+async function getJobOrderStatus(
+ client: Parameters<typeof getJob>[0],
+ jobId: string,
+ companyId: string,
+ locationId: string
+): Promise<JobOrderStatusData> {
+ const materials = await getJobMaterialsWithQuantityOnHand(
+ client,
+ jobId,
+ companyId,
+ locationId
+ );
+
+ return {
+ materials: materials.data ?? [],
+ purchaseOrderLines: await getJobMaterialPurchaseOrderLines(
+ client,
+ materials.data ?? [],
+ locationId
+ )
+ };
+}
+
export const handle: Handle = {
breadcrumb: msg`Jobs`,
to: path.to.jobs,
@@ -69,6 +100,12 @@ export async function loader({ request, params }: LoaderFunctionArgs) {
files: getJobDocuments(client, companyId, job.data),
trackedEntities: getTrackedEntitiesByJobId(client, jobId),
method: getJobMethodTree(client, jobId), // returns a promise
+ orderStatus: getJobOrderStatus(
+ client,
+ jobId,
+ companyId,
+ job.data.locationId ?? ""
+ ), // returns a promise
configurationParameters: getConfigurationParameters(
client,
job.data.itemId!,
@@ -82,7 +119,7 @@ export default function JobRoute() {
const { jobId } = params;
if (!jobId) throw new Error("Could not find jobId");
- const { method } = useLoaderData<typeof loader>();
+ const { method, orderStatus } = useLoaderData<typeof loader>();
return (
<PanelProvider>
@@ -105,6 +142,7 @@ export default function JobRoute() {
{(resolvedMethod) => (
<JobBoMExplorerWrapper
method={resolvedMethod.data ?? []}
+ orderStatus={orderStatus}
/>
)}
</Await>
@@ -126,13 +164,15 @@ export default function JobRoute() {
}
function JobBoMExplorerWrapper({
- method
+ method,
+ orderStatus
}: {
method: JobMethodTreeItem[] | null;
+ orderStatus: Promise<JobOrderStatusData>;
}) {
const memoizedMethod = useMemo(
() => (method && method.length > 0 ? flattenTree(method[0]) : []),
[method]
);
- return <JobBoMExplorer method={memoizedMethod} />;
+ return <JobBoMExplorer method={memoizedMethod} orderStatus={orderStatus} />;
}
diff --git a/packages/database/supabase/migrations/20260612134529_job-quantity-on-hand-null-storage-unit.sql b/packages/database/supabase/migrations/20260612134529_job-quantity-on-hand-null-storage-unit.sql
new file mode 100644
index 0000000000..50e2ffaa94
--- /dev/null
+++ b/packages/database/supabase/migrations/20260612134529_job-quantity-on-hand-null-storage-unit.sql
@@ -0,0 +1,269 @@
+-- Fix get_job_quantity_on_hand dropping stock / demand that has no storage unit.
+--
+-- On-hand and production demand are split into two buckets: "in the material's
+-- storage unit" and "not in it". The "not in" join used
+-- (jm.storageUnitId IS NULL OR jm.storageUnitId != x.storageUnitId)
+-- which, when the material IS pinned to a storage unit but the ledger/demand row
+-- has a NULL storageUnitId, evaluates `'unit' != NULL` -> NULL (not true). So the
+-- row matched neither bucket and silently disappeared, reporting on-hand (and
+-- required) as 0. That produced false "needs ordering" flags (and false
+-- "create order for N items" counts on the Materials page) for any item whose
+-- stock isn't assigned to a shelf.
+--
+-- Fix: treat a NULL storageUnitId on the ledger/demand row as "not in the unit",
+-- by adding `x.storageUnitId IS NULL OR` to both "not in storage unit" joins.
+-- The "in storage unit" joins are unchanged, so storage-unit-specific columns
+-- (e.g. the Materials page "On Storage Unit" indicator) keep the same behavior.
+
+CREATE OR REPLACE FUNCTION get_job_quantity_on_hand(job_id TEXT, company_id TEXT, location_id TEXT)
+ RETURNS TABLE (
+ "id" TEXT,
+ "jobMaterialItemId" TEXT,
+ "jobMakeMethodId" TEXT,
+ "itemReadableId" TEXT,
+ "name" TEXT,
+ "description" TEXT,
+ "itemTrackingType" "itemTrackingType",
+ "methodType" "methodType",
+ "type" "itemType",
+ "thumbnailPath" TEXT,
+ "unitOfMeasureCode" TEXT,
+ "quantityPerParent" NUMERIC,
+ "estimatedQuantity" NUMERIC,
+ "quantityIssued" NUMERIC,
+ "quantityOnHandInStorageUnit" NUMERIC,
+ "quantityOnHandNotInStorageUnit" NUMERIC,
+ "quantityOnSalesOrder" NUMERIC,
+ "quantityOnPurchaseOrder" NUMERIC,
+ "quantityOnProductionOrder" NUMERIC,
+ "quantityFromProductionOrderInStorageUnit" NUMERIC,
+ "quantityFromProductionOrderNotInStorageUnit" NUMERIC,
+ "quantityInTransitToStorageUnit" NUMERIC,
+ "storageUnitId" TEXT,
+ "storageUnitName" TEXT
+ ) AS $$
+ BEGIN
+ RETURN QUERY
+
+WITH
+ job_materials AS (
+ SELECT
+ jm."id",
+ jm."itemId",
+ jm."jobMakeMethodId",
+ jm."description",
+ jm."methodType",
+ jm."quantity",
+ jm."estimatedQuantity",
+ jm."quantityIssued",
+ jm."storageUnitId"
+ FROM
+ "jobMaterial" jm
+ WHERE
+ jm."jobId" = job_id
+ ),
+ open_purchase_orders AS (
+ SELECT
+ pol."itemId" AS "purchaseOrderItemId",
+ SUM(pol."quantityToReceive" * pol."conversionFactor") AS "quantityOnPurchaseOrder"
+ FROM
+ "purchaseOrder" po
+ INNER JOIN "purchaseOrderLine" pol
+ ON pol."purchaseOrderId" = po."id"
+ INNER JOIN job_materials jm
+ ON jm."itemId" = pol."itemId"
+ WHERE
+ po."status" IN (
+ 'To Receive',
+ 'To Receive and Invoice'
+ )
+ AND po."companyId" = company_id
+ AND pol."locationId" = location_id
+ GROUP BY pol."itemId"
+ ),
+ open_stock_transfers_to AS (
+ SELECT
+ stl."itemId",
+ stl."toStorageUnitId" AS "storageUnitId",
+ SUM(stl."outstandingQuantity") AS "quantityOnStockTransferTo"
+ FROM "stockTransferLine" stl
+ INNER JOIN "stockTransfer" st ON stl."stockTransferId" = st."id"
+ INNER JOIN job_materials jm ON jm."itemId" = stl."itemId"
+ WHERE st."status" IN ('Released', 'In Progress')
+ AND st."companyId" = company_id
+ AND st."locationId" = location_id
+ GROUP BY stl."itemId", stl."toStorageUnitId"
+ ),
+ open_stock_transfers_from AS (
+ SELECT
+ stl."itemId",
+ stl."fromStorageUnitId" AS "storageUnitId",
+ SUM(stl."outstandingQuantity") AS "quantityOnStockTransferFrom"
+ FROM "stockTransferLine" stl
+ INNER JOIN "stockTransfer" st ON stl."stockTransferId" = st."id"
+ INNER JOIN job_materials jm ON jm."itemId" = stl."itemId"
+ WHERE st."status" IN ('Released', 'In Progress')
+ AND st."companyId" = company_id
+ AND st."locationId" = location_id
+ GROUP BY stl."itemId", stl."fromStorageUnitId"
+ ),
+ stock_transfers_in_transit AS (
+ SELECT
+ COALESCE(stt."itemId", stf."itemId") AS "itemId",
+ COALESCE(stt."storageUnitId", stf."storageUnitId") AS "storageUnitId",
+ COALESCE(stt."quantityOnStockTransferTo", 0) - COALESCE(stf."quantityOnStockTransferFrom", 0) AS "quantityInTransit"
+ FROM open_stock_transfers_to stt
+ FULL OUTER JOIN open_stock_transfers_from stf ON stt."itemId" = stf."itemId" AND stt."storageUnitId" = stf."storageUnitId"
+ ),
+ open_sales_orders AS (
+ SELECT
+ sol."itemId" AS "salesOrderItemId",
+ SUM(sol."quantityToSend") AS "quantityOnSalesOrder"
+ FROM
+ "salesOrder" so
+ INNER JOIN "salesOrderLine" sol
+ ON sol."salesOrderId" = so."id"
+ INNER JOIN job_materials jm
+ ON jm."itemId" = sol."itemId"
+ WHERE
+ so."status" IN (
+ 'Confirmed',
+ 'To Ship and Invoice',
+ 'To Ship',
+ 'To Invoice',
+ 'In Progress'
+ )
+ AND so."companyId" = company_id
+ AND sol."locationId" = location_id
+ GROUP BY sol."itemId"
+ ),
+ open_jobs AS (
+ SELECT
+ j."itemId" AS "jobItemId",
+ SUM(j."productionQuantity" + j."scrapQuantity" - j."quantityReceivedToInventory" - j."quantityShipped") AS "quantityOnProductionOrder"
+ FROM job j
+ WHERE j."status" IN (
+ 'Ready',
+ 'In Progress',
+ 'Paused'
+ )
+ GROUP BY j."itemId"
+ ),
+ open_job_requirements AS (
+ SELECT
+ jm."itemId",
+ jm."storageUnitId",
+ SUM(jm."quantityToIssue") AS "quantityOnProductionDemand"
+ FROM "jobMaterial" jm
+ INNER JOIN "job" j ON jm."jobId" = j."id"
+ INNER JOIN job_materials jmat
+ ON jmat."itemId" = jm."itemId"
+ WHERE j."status" IN (
+ 'Planned',
+ 'Ready',
+ 'In Progress',
+ 'Paused'
+ )
+ AND jm."methodType" != 'Make to Order'
+ AND j."companyId" = company_id
+ AND j."locationId" = location_id
+ GROUP BY jm."itemId", jm."storageUnitId"
+ ),
+ open_job_requirements_in_storage_unit AS (
+ SELECT
+ ojr."itemId",
+ SUM(ojr."quantityOnProductionDemand") AS "quantityOnProductionDemandInStorageUnit"
+ FROM open_job_requirements ojr
+ INNER JOIN job_materials jm
+ ON jm."itemId" = ojr."itemId" AND jm."storageUnitId" = ojr."storageUnitId"
+ GROUP BY ojr."itemId"
+ ),
+ open_job_requirements_not_in_storage_unit AS (
+ SELECT
+ ojr."itemId",
+ SUM(ojr."quantityOnProductionDemand") AS "quantityOnProductionDemandNotInStorageUnit"
+ FROM open_job_requirements ojr
+ INNER JOIN job_materials jm
+ ON jm."itemId" = ojr."itemId" AND (jm."storageUnitId" IS NULL OR ojr."storageUnitId" IS NULL OR jm."storageUnitId" != ojr."storageUnitId")
+ GROUP BY ojr."itemId"
+ ),
+ item_ledgers AS (
+ SELECT
+ il."itemId" AS "ledgerItemId",
+ il."storageUnitId",
+ -- quantityOnHand excludes only Rejected tracked entities. On Hold
+ -- units are still physically in the warehouse and count toward
+ -- on-hand. Rows with no tracked entity always count.
+ SUM(il."quantity") FILTER (
+ WHERE il."trackedEntityStatus" IS NULL
+ OR il."trackedEntityStatus" != 'Rejected'
+ ) AS "quantityOnHand"
+ FROM "itemLedger" il
+ INNER JOIN job_materials jm
+ ON jm."itemId" = il."itemId"
+ WHERE il."companyId" = company_id
+ AND il."locationId" = location_id
+ GROUP BY il."itemId", il."storageUnitId"
+ ),
+ item_ledgers_in_storage_unit AS (
+ SELECT
+ il."ledgerItemId",
+ SUM(il."quantityOnHand") AS "quantityOnHandInStorageUnit"
+ FROM item_ledgers il
+ INNER JOIN job_materials jm
+ ON jm."itemId" = il."ledgerItemId" AND jm."storageUnitId" = il."storageUnitId"
+ GROUP BY il."ledgerItemId"
+ ),
+ item_ledgers_not_in_storage_unit AS (
+ SELECT
+ il."ledgerItemId",
+ SUM(il."quantityOnHand") AS "quantityOnHandNotInStorageUnit"
+ FROM item_ledgers il
+ INNER JOIN job_materials jm
+ ON jm."itemId" = il."ledgerItemId" AND (jm."storageUnitId" IS NULL OR il."storageUnitId" IS NULL OR jm."storageUnitId" != il."storageUnitId")
+ GROUP BY il."ledgerItemId"
+ )
+
+SELECT
+ jm."id",
+ jm."itemId" AS "jobMaterialItemId",
+ jm."jobMakeMethodId",
+ i."readableId" AS "itemReadableId",
+ i."name",
+ jm."description",
+ i."itemTrackingType",
+ jm."methodType",
+ i."type",
+ CASE
+ WHEN i."thumbnailPath" IS NULL AND mu."thumbnailPath" IS NOT NULL THEN mu."thumbnailPath"
+ ELSE i."thumbnailPath"
+ END AS "thumbnailPath",
+ i."unitOfMeasureCode",
+ jm."quantity" as "quantityPerParent",
+ jm."estimatedQuantity",
+ jm."quantityIssued",
+ COALESCE(ils."quantityOnHandInStorageUnit", 0) AS "quantityOnHandInStorageUnit",
+ COALESCE(ilns."quantityOnHandNotInStorageUnit", 0) AS "quantityOnHandNotInStorageUnit",
+ COALESCE(so."quantityOnSalesOrder", 0) AS "quantityOnSalesOrder",
+ COALESCE(po."quantityOnPurchaseOrder", 0) AS "quantityOnPurchaseOrder",
+ COALESCE(oj."quantityOnProductionOrder", 0) AS "quantityOnProductionOrder",
+ COALESCE(ojis."quantityOnProductionDemandInStorageUnit", 0) AS "quantityFromProductionOrderInStorageUnit",
+ COALESCE(ojns."quantityOnProductionDemandNotInStorageUnit", 0) AS "quantityFromProductionOrderNotInStorageUnit",
+ COALESCE(stit."quantityInTransit", 0) AS "quantityInTransitToStorageUnit",
+ jm."storageUnitId",
+ s."name" AS "storageUnitName"
+FROM
+ job_materials jm
+ INNER JOIN "item" i ON i."id" = jm."itemId"
+ LEFT JOIN "storageUnit" s ON s."id" = jm."storageUnitId"
+ LEFT JOIN item_ledgers_in_storage_unit ils ON i."id" = ils."ledgerItemId"
+ LEFT JOIN item_ledgers_not_in_storage_unit ilns ON i."id" = ilns."ledgerItemId"
+ LEFT JOIN open_sales_orders so ON i."id" = so."salesOrderItemId"
+ LEFT JOIN open_purchase_orders po ON i."id" = po."purchaseOrderItemId"
+ LEFT JOIN open_jobs oj ON i."id" = oj."jobItemId"
+ LEFT JOIN open_job_requirements_in_storage_unit ojis ON i."id" = ojis."itemId"
+ LEFT JOIN open_job_requirements_not_in_storage_unit ojns ON i."id" = ojns."itemId"
+ LEFT JOIN "modelUpload" mu ON mu.id = i."modelUploadId"
+ LEFT JOIN stock_transfers_in_transit stit ON jm."itemId" = stit."itemId" AND jm."storageUnitId" = stit."storageUnitId";
+ END;
+$$ LANGUAGE plpgsql SECURITY DEFINER;
diff --git a/packages/locale/locales/de/erp.po b/packages/locale/locales/de/erp.po
index 6fcfe9a44d..8ef89b431b 100644
--- a/packages/locale/locales/de/erp.po
+++ b/packages/locale/locales/de/erp.po
@@ -1040,6 +1040,9 @@ msgstr "Verfügbar"
msgid "Avg Days to Close"
msgstr "Durchschn. Tage bis Abschluss"
+msgid "Awaiting approval"
+msgstr ""
+
msgid "Back"
msgstr "Zurück"
@@ -3858,6 +3861,9 @@ msgstr "Stunden/1000 Stück"
msgid "Hours/Piece"
msgstr "Stunden/Stück"
+msgid "How the material is sourced (make, purchase, or pull from inventory) and the storage unit it's pulled from."
+msgstr ""
+
msgid "How the resolved price was calculated."
msgstr "Wie der aufgelöste Preis berechnet wurde."
@@ -5445,6 +5451,9 @@ msgstr "In Bearbeitung"
msgid "On Jobs"
msgstr "In Aufträgen"
+msgid "On order"
+msgstr ""
+
msgid "On Purchase Order"
msgstr "In Bestellung"
@@ -5559,6 +5568,9 @@ msgstr "ODER"
msgid "Order"
msgstr "Bestellung"
+msgid "Order {jobQuantity} for this job"
+msgstr ""
+
msgid "Order by"
msgstr "Bestellung bis"
@@ -5820,6 +5832,9 @@ msgstr "Geplante Bestellung"
msgid "Planned order = MRP suggestion to cover projected demand based on the item's reorder policy (or manually added)."
msgstr "Geplante Bestellung = MRP-Vorschlag zur Deckung der prognostizierten Nachfrage basierend auf der Nachbestellungsrichtlinie des Artikels (oder manuell hinzugefügt)."
+msgid "Planned purchase order"
+msgstr ""
+
msgid "Planned Start"
msgstr "Geplanter Start"
@@ -6032,6 +6047,9 @@ msgstr "Prozesstyp"
msgid "Processes"
msgstr "Prozesse"
+msgid "Procurement status — needs ordering, planned, on order, or received. The same indicator shown in the BoM tree."
+msgstr ""
+
msgid "Production"
msgstr "Produktion"
@@ -6201,9 +6219,15 @@ msgstr "Mengen"
msgid "Quantity"
msgstr "Menge"
+msgid "Quantity arriving — on open purchase orders plus on production (make) orders."
+msgstr ""
+
msgid "Quantity Completed"
msgstr "Abgeschlossene Menge"
+msgid "Quantity in transit to the storage unit via open stock transfers."
+msgstr ""
+
msgid "Quantity is derived from completed serials/batches in MES and cannot be edited."
msgstr "Die Menge wird aus abgeschlossenen Seriennummern/Chargen in MES abgeleitet und kann nicht bearbeitet werden."
@@ -6228,6 +6252,9 @@ msgstr "Menge pro Auftrag"
msgid "Quantity per Parent"
msgstr "Menge pro Übergeordnete"
+msgid "Quantity physically on the material's assigned storage unit (shelf). Turns red when it's below what that unit needs to supply."
+msgstr ""
+
msgid "Quantity Type"
msgstr "Mengentyp"
@@ -6341,6 +6368,9 @@ msgstr "Empfangen Sie {0} im Bestand"
msgid "Receive to Inventory"
msgstr "In Bestand empfangen"
+msgid "Received"
+msgstr ""
+
msgid "Received At"
msgstr "Empfangen am"
@@ -6350,6 +6380,9 @@ msgstr "Empfangen von"
msgid "Received Qty"
msgstr "Empfangene Menge"
+msgid "Receiving"
+msgstr ""
+
msgid "Receiving Location"
msgstr "Empfangsort"
@@ -7894,6 +7927,9 @@ msgstr "Dieser Auftrag wird im Bestand eingegangen. Er ist nicht mehr auf der We
msgid "This job will no longer be available on the shop floor."
msgstr "Dieser Auftrag ist auf der Werkstatt nicht mehr verfügbar."
+msgid "This job's own required quantity for the material."
+msgstr ""
+
msgid "This sales order has associated jobs. Choose what to do with them."
msgstr "Diese Bestellung hat zugeordnete Aufträge. Wählen Sie, was damit geschehen soll."
@@ -8050,6 +8086,12 @@ msgstr "Gesamtpreis"
msgid "Total Quantity"
msgstr "Gesamtmenge"
+msgid "Total quantity on hand for the item across all storage units at this location. Turns red when on hand plus incoming can't cover total demand."
+msgstr ""
+
+msgid "Total quantity required across all active jobs and sales orders at this location — not just this job."
+msgstr ""
+
msgid "Total:"
msgstr "Gesamt:"
diff --git a/packages/locale/locales/en/erp.po b/packages/locale/locales/en/erp.po
index 0108684be3..81e2fbbed6 100644
--- a/packages/locale/locales/en/erp.po
+++ b/packages/locale/locales/en/erp.po
@@ -1040,6 +1040,9 @@ msgstr "Available"
msgid "Avg Days to Close"
msgstr "Avg Days to Close"
+msgid "Awaiting approval"
+msgstr "Awaiting approval"
+
msgid "Back"
msgstr "Back"
@@ -3858,6 +3861,9 @@ msgstr "Hours/1000 Pieces"
msgid "Hours/Piece"
msgstr "Hours/Piece"
+msgid "How the material is sourced (make, purchase, or pull from inventory) and the storage unit it's pulled from."
+msgstr "How the material is sourced (make, purchase, or pull from inventory) and the storage unit it's pulled from."
+
msgid "How the resolved price was calculated."
msgstr "How the resolved price was calculated."
@@ -5445,6 +5451,9 @@ msgstr "On Hold"
msgid "On Jobs"
msgstr "On Jobs"
+msgid "On order"
+msgstr "On order"
+
msgid "On Purchase Order"
msgstr "On Purchase Order"
@@ -5559,6 +5568,9 @@ msgstr "OR"
msgid "Order"
msgstr "Order"
+msgid "Order {jobQuantity} for this job"
+msgstr "Order {jobQuantity} for this job"
+
msgid "Order by"
msgstr "Order by"
@@ -5820,6 +5832,9 @@ msgstr "Planned Order"
msgid "Planned order = MRP suggestion to cover projected demand based on the item's reorder policy (or manually added)."
msgstr "Planned order = MRP suggestion to cover projected demand based on the item's reorder policy (or manually added)."
+msgid "Planned purchase order"
+msgstr "Planned purchase order"
+
msgid "Planned Start"
msgstr "Planned Start"
@@ -6032,6 +6047,9 @@ msgstr "Process Type"
msgid "Processes"
msgstr "Processes"
+msgid "Procurement status — needs ordering, planned, on order, or received. The same indicator shown in the BoM tree."
+msgstr "Procurement status — needs ordering, planned, on order, or received. The same indicator shown in the BoM tree."
+
msgid "Production"
msgstr "Production"
@@ -6201,9 +6219,15 @@ msgstr "Quantities"
msgid "Quantity"
msgstr "Quantity"
+msgid "Quantity arriving — on open purchase orders plus on production (make) orders."
+msgstr "Quantity arriving — on open purchase orders plus on production (make) orders."
+
msgid "Quantity Completed"
msgstr "Quantity Completed"
+msgid "Quantity in transit to the storage unit via open stock transfers."
+msgstr "Quantity in transit to the storage unit via open stock transfers."
+
msgid "Quantity is derived from completed serials/batches in MES and cannot be edited."
msgstr "Quantity is derived from completed serials/batches in MES and cannot be edited."
@@ -6228,6 +6252,9 @@ msgstr "Quantity Per Job"
msgid "Quantity per Parent"
msgstr "Quantity per Parent"
+msgid "Quantity physically on the material's assigned storage unit (shelf). Turns red when it's below what that unit needs to supply."
+msgstr "Quantity physically on the material's assigned storage unit (shelf). Turns red when it's below what that unit needs to supply."
+
msgid "Quantity Type"
msgstr "Quantity Type"
@@ -6341,6 +6368,9 @@ msgstr "Receive {0} to Inventory"
msgid "Receive to Inventory"
msgstr "Receive to Inventory"
+msgid "Received"
+msgstr "Received"
+
msgid "Received At"
msgstr "Received At"
@@ -6350,6 +6380,9 @@ msgstr "Received By"
msgid "Received Qty"
msgstr "Received Qty"
+msgid "Receiving"
+msgstr "Receiving"
+
msgid "Receiving Location"
msgstr "Receiving Location"
@@ -7894,6 +7927,9 @@ msgstr "This job will be received to inventory. It will no longer be available o
msgid "This job will no longer be available on the shop floor."
msgstr "This job will no longer be available on the shop floor."
+msgid "This job's own required quantity for the material."
+msgstr "This job's own required quantity for the material."
+
msgid "This sales order has associated jobs. Choose what to do with them."
msgstr "This sales order has associated jobs. Choose what to do with them."
@@ -8050,6 +8086,12 @@ msgstr "Total Price"
msgid "Total Quantity"
msgstr "Total Quantity"
+msgid "Total quantity on hand for the item across all storage units at this location. Turns red when on hand plus incoming can't cover total demand."
+msgstr "Total quantity on hand for the item across all storage units at this location. Turns red when on hand plus incoming can't cover total demand."
+
+msgid "Total quantity required across all active jobs and sales orders at this location — not just this job."
+msgstr "Total quantity required across all active jobs and sales orders at this location — not just this job."
+
msgid "Total:"
msgstr "Total:"
diff --git a/packages/locale/locales/es/erp.po b/packages/locale/locales/es/erp.po
index a6d954e0b5..0b5bcd6956 100644
--- a/packages/locale/locales/es/erp.po
+++ b/packages/locale/locales/es/erp.po
@@ -1040,6 +1040,9 @@ msgstr "Disponible"
msgid "Avg Days to Close"
msgstr "Días promedio para cerrar"
+msgid "Awaiting approval"
+msgstr ""
+
msgid "Back"
msgstr "Atrás"
@@ -3858,6 +3861,9 @@ msgstr "Horas/1000 Piezas"
msgid "Hours/Piece"
msgstr "Horas/Pieza"
+msgid "How the material is sourced (make, purchase, or pull from inventory) and the storage unit it's pulled from."
+msgstr ""
+
msgid "How the resolved price was calculated."
msgstr "Cómo se calculó el precio resuelto."
@@ -5445,6 +5451,9 @@ msgstr "En Espera"
msgid "On Jobs"
msgstr "En Trabajos"
+msgid "On order"
+msgstr ""
+
msgid "On Purchase Order"
msgstr "En Orden de Compra"
@@ -5559,6 +5568,9 @@ msgstr "O"
msgid "Order"
msgstr "Pedido"
+msgid "Order {jobQuantity} for this job"
+msgstr ""
+
msgid "Order by"
msgstr "Ordenar por"
@@ -5820,6 +5832,9 @@ msgstr "Orden Planificada"
msgid "Planned order = MRP suggestion to cover projected demand based on the item's reorder policy (or manually added)."
msgstr "Orden planificada = sugerencia de MRP para cubrir la demanda proyectada basada en la política de reorden del artículo (o agregada manualmente)."
+msgid "Planned purchase order"
+msgstr ""
+
msgid "Planned Start"
msgstr "Inicio Planificado"
@@ -6032,6 +6047,9 @@ msgstr "Tipo de Proceso"
msgid "Processes"
msgstr "Procesos"
+msgid "Procurement status — needs ordering, planned, on order, or received. The same indicator shown in the BoM tree."
+msgstr ""
+
msgid "Production"
msgstr "Producción"
@@ -6201,9 +6219,15 @@ msgstr "Cantidades"
msgid "Quantity"
msgstr "Cantidad"
+msgid "Quantity arriving — on open purchase orders plus on production (make) orders."
+msgstr ""
+
msgid "Quantity Completed"
msgstr "Cantidad Completada"
+msgid "Quantity in transit to the storage unit via open stock transfers."
+msgstr ""
+
msgid "Quantity is derived from completed serials/batches in MES and cannot be edited."
msgstr "La cantidad se deriva de seriales/lotes completados en MES y no se puede editar."
@@ -6228,6 +6252,9 @@ msgstr "Cantidad Por Trabajo"
msgid "Quantity per Parent"
msgstr "Cantidad por Padre"
+msgid "Quantity physically on the material's assigned storage unit (shelf). Turns red when it's below what that unit needs to supply."
+msgstr ""
+
msgid "Quantity Type"
msgstr "Tipo de Cantidad"
@@ -6341,6 +6368,9 @@ msgstr "Recibir {0} al Inventario"
msgid "Receive to Inventory"
msgstr "Recibir al Inventario"
+msgid "Received"
+msgstr ""
+
msgid "Received At"
msgstr "Recibido en"
@@ -6350,6 +6380,9 @@ msgstr "Recibido Por"
msgid "Received Qty"
msgstr "Cantidad Recibida"
+msgid "Receiving"
+msgstr ""
+
msgid "Receiving Location"
msgstr "Ubicación de Recepción"
@@ -7894,6 +7927,9 @@ msgstr "Este trabajo será recibido en el inventario. Ya no estará disponible e
msgid "This job will no longer be available on the shop floor."
msgstr "Este trabajo ya no estará disponible en el piso de producción."
+msgid "This job's own required quantity for the material."
+msgstr ""
+
msgid "This sales order has associated jobs. Choose what to do with them."
msgstr "Este pedido de venta tiene trabajos asociados. Elige qué hacer con ellos."
@@ -8050,6 +8086,12 @@ msgstr "Precio Total"
msgid "Total Quantity"
msgstr "Cantidad Total"
+msgid "Total quantity on hand for the item across all storage units at this location. Turns red when on hand plus incoming can't cover total demand."
+msgstr ""
+
+msgid "Total quantity required across all active jobs and sales orders at this location — not just this job."
+msgstr ""
+
msgid "Total:"
msgstr "Total:"
diff --git a/packages/locale/locales/fr/erp.po b/packages/locale/locales/fr/erp.po
index 838f900176..b795b507d0 100644
--- a/packages/locale/locales/fr/erp.po
+++ b/packages/locale/locales/fr/erp.po
@@ -1040,6 +1040,9 @@ msgstr "Disponible"
msgid "Avg Days to Close"
msgstr "Jours moy. pour fermer"
+msgid "Awaiting approval"
+msgstr ""
+
msgid "Back"
msgstr "Retour"
@@ -3858,6 +3861,9 @@ msgstr "Heures/1000 pièces"
msgid "Hours/Piece"
msgstr "Heures/Pièce"
+msgid "How the material is sourced (make, purchase, or pull from inventory) and the storage unit it's pulled from."
+msgstr ""
+
msgid "How the resolved price was calculated."
msgstr "Comment le prix résolu a été calculé."
@@ -5445,6 +5451,9 @@ msgstr "En attente"
msgid "On Jobs"
msgstr "Sur les commandes"
+msgid "On order"
+msgstr ""
+
msgid "On Purchase Order"
msgstr "En commande d'achat"
@@ -5559,6 +5568,9 @@ msgstr "OU"
msgid "Order"
msgstr "Commande"
+msgid "Order {jobQuantity} for this job"
+msgstr ""
+
msgid "Order by"
msgstr "Commander par"
@@ -5820,6 +5832,9 @@ msgstr "Commande planifiée"
msgid "Planned order = MRP suggestion to cover projected demand based on the item's reorder policy (or manually added)."
msgstr "Commande planifiée = suggestion MRP pour couvrir la demande projetée en fonction de la politique de réapprovisionnement de l'article (ou ajoutée manuellement)."
+msgid "Planned purchase order"
+msgstr ""
+
msgid "Planned Start"
msgstr "Début Prévu"
@@ -6032,6 +6047,9 @@ msgstr "Type de processus"
msgid "Processes"
msgstr "Processus"
+msgid "Procurement status — needs ordering, planned, on order, or received. The same indicator shown in the BoM tree."
+msgstr ""
+
msgid "Production"
msgstr "Production"
@@ -6201,9 +6219,15 @@ msgstr "Quantités"
msgid "Quantity"
msgstr "Quantité"
+msgid "Quantity arriving — on open purchase orders plus on production (make) orders."
+msgstr ""
+
msgid "Quantity Completed"
msgstr "Quantité complétée"
+msgid "Quantity in transit to the storage unit via open stock transfers."
+msgstr ""
+
msgid "Quantity is derived from completed serials/batches in MES and cannot be edited."
msgstr "La quantité est dérivée des numéros de série/lots complétés dans MES et ne peut pas être modifiée."
@@ -6228,6 +6252,9 @@ msgstr "Quantité Par Travail"
msgid "Quantity per Parent"
msgstr "Quantité par Parent"
+msgid "Quantity physically on the material's assigned storage unit (shelf). Turns red when it's below what that unit needs to supply."
+msgstr ""
+
msgid "Quantity Type"
msgstr "Type de quantité"
@@ -6341,6 +6368,9 @@ msgstr "Recevoir {0} à l'inventaire"
msgid "Receive to Inventory"
msgstr "Recevoir en inventaire"
+msgid "Received"
+msgstr ""
+
msgid "Received At"
msgstr "Reçu à"
@@ -6350,6 +6380,9 @@ msgstr "Reçu par"
msgid "Received Qty"
msgstr "Quantité reçue"
+msgid "Receiving"
+msgstr ""
+
msgid "Receiving Location"
msgstr "Lieu de réception"
@@ -7894,6 +7927,9 @@ msgstr "Ce travail sera reçu en inventaire. Il ne sera plus disponible sur l'at
msgid "This job will no longer be available on the shop floor."
msgstr "Ce travail ne sera plus disponible sur l'atelier."
+msgid "This job's own required quantity for the material."
+msgstr ""
+
msgid "This sales order has associated jobs. Choose what to do with them."
msgstr "Cette commande client a des tâches associées. Choisissez ce que vous souhaitez en faire."
@@ -8050,6 +8086,12 @@ msgstr "Prix Total"
msgid "Total Quantity"
msgstr "Quantité Totale"
+msgid "Total quantity on hand for the item across all storage units at this location. Turns red when on hand plus incoming can't cover total demand."
+msgstr ""
+
+msgid "Total quantity required across all active jobs and sales orders at this location — not just this job."
+msgstr ""
+
msgid "Total:"
msgstr "Total :"
diff --git a/packages/locale/locales/hi/erp.po b/packages/locale/locales/hi/erp.po
index 936ed0c92d..654a6d3681 100644
--- a/packages/locale/locales/hi/erp.po
+++ b/packages/locale/locales/hi/erp.po
@@ -1040,6 +1040,9 @@ msgstr "उपलब्ध"
msgid "Avg Days to Close"
msgstr "बंद करने के लिए औसत दिन"
+msgid "Awaiting approval"
+msgstr ""
+
msgid "Back"
msgstr "वापस"
@@ -3858,6 +3861,9 @@ msgstr "घंटे/1000 पीस"
msgid "Hours/Piece"
msgstr "घंटे/टुकड़ा"
+msgid "How the material is sourced (make, purchase, or pull from inventory) and the storage unit it's pulled from."
+msgstr ""
+
msgid "How the resolved price was calculated."
msgstr "हल की गई कीमत की गणना कैसे की गई।"
@@ -5445,6 +5451,9 @@ msgstr "होल्ड पर"
msgid "On Jobs"
msgstr "नौकरियों पर"
+msgid "On order"
+msgstr ""
+
msgid "On Purchase Order"
msgstr "खरीद आदेश पर"
@@ -5559,6 +5568,9 @@ msgstr "या"
msgid "Order"
msgstr "आदेश"
+msgid "Order {jobQuantity} for this job"
+msgstr ""
+
msgid "Order by"
msgstr "आदेश दें"
@@ -5820,6 +5832,9 @@ msgstr "नियोजित आदेश"
msgid "Planned order = MRP suggestion to cover projected demand based on the item's reorder policy (or manually added)."
msgstr "नियोजित आदेश = अनुमानित मांग को कवर करने के लिए MRP सुझाव आइटम की पुनः आदेश नीति के आधार पर (या मैन्युअल रूप से जोड़ा गया)।"
+msgid "Planned purchase order"
+msgstr ""
+
msgid "Planned Start"
msgstr "नियोजित प्रारंभ"
@@ -6032,6 +6047,9 @@ msgstr "प्रक्रिया प्रकार"
msgid "Processes"
msgstr "प्रक्रियाएं"
+msgid "Procurement status — needs ordering, planned, on order, or received. The same indicator shown in the BoM tree."
+msgstr ""
+
msgid "Production"
msgstr "उत्पादन"
@@ -6201,9 +6219,15 @@ msgstr "मात्रा"
msgid "Quantity"
msgstr "मात्रा"
+msgid "Quantity arriving — on open purchase orders plus on production (make) orders."
+msgstr ""
+
msgid "Quantity Completed"
msgstr "पूर्ण मात्रा"
+msgid "Quantity in transit to the storage unit via open stock transfers."
+msgstr ""
+
msgid "Quantity is derived from completed serials/batches in MES and cannot be edited."
msgstr "मात्रा MES में पूर्ण सीरीज़/बैच से प्राप्त है और संपादित नहीं की जा सकती।"
@@ -6228,6 +6252,9 @@ msgstr "प्रति जॉब मात्रा"
msgid "Quantity per Parent"
msgstr "प्रति पैरेंट मात्रा"
+msgid "Quantity physically on the material's assigned storage unit (shelf). Turns red when it's below what that unit needs to supply."
+msgstr ""
+
msgid "Quantity Type"
msgstr "मात्रा प्रकार"
@@ -6341,6 +6368,9 @@ msgstr "{0} को इन्वेंटरी में प्राप्त
msgid "Receive to Inventory"
msgstr "इन्वेंटरी में प्राप्त करें"
+msgid "Received"
+msgstr ""
+
msgid "Received At"
msgstr "प्राप्त किया गया"
@@ -6350,6 +6380,9 @@ msgstr "द्वारा प्राप्त"
msgid "Received Qty"
msgstr "प्राप्त मात्रा"
+msgid "Receiving"
+msgstr ""
+
msgid "Receiving Location"
msgstr "प्राप्ति स्थान"
@@ -7894,6 +7927,9 @@ msgstr "यह जॉब इन्वेंटरी में प्राप
msgid "This job will no longer be available on the shop floor."
msgstr "यह नौकरी अब शॉप फ्लोर पर उपलब्ध नहीं होगी।"
+msgid "This job's own required quantity for the material."
+msgstr ""
+
msgid "This sales order has associated jobs. Choose what to do with them."
msgstr "इस बिक्रय आदेश के संबंधित कार्य हैं। उनके साथ क्या करना है यह चुनें।"
@@ -8050,6 +8086,12 @@ msgstr "कुल मूल्य"
msgid "Total Quantity"
msgstr "कुल मात्रा"
+msgid "Total quantity on hand for the item across all storage units at this location. Turns red when on hand plus incoming can't cover total demand."
+msgstr ""
+
+msgid "Total quantity required across all active jobs and sales orders at this location — not just this job."
+msgstr ""
+
msgid "Total:"
msgstr "कुल:"
diff --git a/packages/locale/locales/it/erp.po b/packages/locale/locales/it/erp.po
index ca165378e8..3d30f3f380 100644
--- a/packages/locale/locales/it/erp.po
+++ b/packages/locale/locales/it/erp.po
@@ -1040,6 +1040,9 @@ msgstr "Disponibile"
msgid "Avg Days to Close"
msgstr "Giorni medi per chiudere"
+msgid "Awaiting approval"
+msgstr ""
+
msgid "Back"
msgstr "Indietro"
@@ -3858,6 +3861,9 @@ msgstr "Ore/1000 Pezzi"
msgid "Hours/Piece"
msgstr "Ore/Pezzo"
+msgid "How the material is sourced (make, purchase, or pull from inventory) and the storage unit it's pulled from."
+msgstr ""
+
msgid "How the resolved price was calculated."
msgstr "Come è stato calcolato il prezzo risolto."
@@ -5445,6 +5451,9 @@ msgstr "In Sospeso"
msgid "On Jobs"
msgstr "Su Lavori"
+msgid "On order"
+msgstr ""
+
msgid "On Purchase Order"
msgstr "In Ordine di Acquisto"
@@ -5559,6 +5568,9 @@ msgstr "O"
msgid "Order"
msgstr "Ordine"
+msgid "Order {jobQuantity} for this job"
+msgstr ""
+
msgid "Order by"
msgstr "Ordina entro"
@@ -5820,6 +5832,9 @@ msgstr "Ordine Pianificato"
msgid "Planned order = MRP suggestion to cover projected demand based on the item's reorder policy (or manually added)."
msgstr "Ordine pianificato = suggerimento MRP per coprire la domanda prevista in base alla politica di riordino dell'articolo (o aggiunto manualmente)."
+msgid "Planned purchase order"
+msgstr ""
+
msgid "Planned Start"
msgstr "Inizio Pianificato"
@@ -6032,6 +6047,9 @@ msgstr "Tipo di Processo"
msgid "Processes"
msgstr "Processi"
+msgid "Procurement status — needs ordering, planned, on order, or received. The same indicator shown in the BoM tree."
+msgstr ""
+
msgid "Production"
msgstr "Produzione"
@@ -6201,9 +6219,15 @@ msgstr "Quantità"
msgid "Quantity"
msgstr "Quantità"
+msgid "Quantity arriving — on open purchase orders plus on production (make) orders."
+msgstr ""
+
msgid "Quantity Completed"
msgstr "Quantità Completata"
+msgid "Quantity in transit to the storage unit via open stock transfers."
+msgstr ""
+
msgid "Quantity is derived from completed serials/batches in MES and cannot be edited."
msgstr "La quantità è derivata dai seriali/lotti completati in MES e non può essere modificata."
@@ -6228,6 +6252,9 @@ msgstr "Quantità Per Lavoro"
msgid "Quantity per Parent"
msgstr "Quantità per Genitore"
+msgid "Quantity physically on the material's assigned storage unit (shelf). Turns red when it's below what that unit needs to supply."
+msgstr ""
+
msgid "Quantity Type"
msgstr "Tipo di Quantità"
@@ -6341,6 +6368,9 @@ msgstr "Ricevi {0} in Inventario"
msgid "Receive to Inventory"
msgstr "Ricevi in Inventario"
+msgid "Received"
+msgstr ""
+
msgid "Received At"
msgstr "Ricevuto il"
@@ -6350,6 +6380,9 @@ msgstr "Ricevuto da"
msgid "Received Qty"
msgstr "Quantità Ricevuta"
+msgid "Receiving"
+msgstr ""
+
msgid "Receiving Location"
msgstr "Ubicazione di ricezione"
@@ -7894,6 +7927,9 @@ msgstr "Questo lavoro sarà ricevuto in inventario. Non sarà più disponibile s
msgid "This job will no longer be available on the shop floor."
msgstr "Questo lavoro non sarà più disponibile in officina."
+msgid "This job's own required quantity for the material."
+msgstr ""
+
msgid "This sales order has associated jobs. Choose what to do with them."
msgstr "Questo ordine di vendita ha processi associati. Scegli cosa fare con loro."
@@ -8050,6 +8086,12 @@ msgstr "Prezzo Totale"
msgid "Total Quantity"
msgstr "Quantità Totale"
+msgid "Total quantity on hand for the item across all storage units at this location. Turns red when on hand plus incoming can't cover total demand."
+msgstr ""
+
+msgid "Total quantity required across all active jobs and sales orders at this location — not just this job."
+msgstr ""
+
msgid "Total:"
msgstr "Totale:"
diff --git a/packages/locale/locales/ja/erp.po b/packages/locale/locales/ja/erp.po
index 2cca47e4b5..4d17685596 100644
--- a/packages/locale/locales/ja/erp.po
+++ b/packages/locale/locales/ja/erp.po
@@ -1040,6 +1040,9 @@ msgstr "利用可能"
msgid "Avg Days to Close"
msgstr "平均クローズ日数"
+msgid "Awaiting approval"
+msgstr ""
+
msgid "Back"
msgstr "戻る"
@@ -3858,6 +3861,9 @@ msgstr "時間/1000個"
msgid "Hours/Piece"
msgstr "時間/個"
+msgid "How the material is sourced (make, purchase, or pull from inventory) and the storage unit it's pulled from."
+msgstr ""
+
msgid "How the resolved price was calculated."
msgstr "解決された価格がどのように計算されたかを示します。"
@@ -5445,6 +5451,9 @@ msgstr "保留中"
msgid "On Jobs"
msgstr "ジョブ上"
+msgid "On order"
+msgstr ""
+
msgid "On Purchase Order"
msgstr "購買注文中"
@@ -5559,6 +5568,9 @@ msgstr "または"
msgid "Order"
msgstr "注文"
+msgid "Order {jobQuantity} for this job"
+msgstr ""
+
msgid "Order by"
msgstr "注文日"
@@ -5820,6 +5832,9 @@ msgstr "計画注文"
msgid "Planned order = MRP suggestion to cover projected demand based on the item's reorder policy (or manually added)."
msgstr "計画注文 = 品目の発注ポリシー(または手動で追加)に基づいて予測需要をカバーするためのMRP提案。"
+msgid "Planned purchase order"
+msgstr ""
+
msgid "Planned Start"
msgstr "計画開始"
@@ -6032,6 +6047,9 @@ msgstr "プロセスタイプ"
msgid "Processes"
msgstr "プロセス"
+msgid "Procurement status — needs ordering, planned, on order, or received. The same indicator shown in the BoM tree."
+msgstr ""
+
msgid "Production"
msgstr "生産"
@@ -6201,9 +6219,15 @@ msgstr "数量"
msgid "Quantity"
msgstr "数量"
+msgid "Quantity arriving — on open purchase orders plus on production (make) orders."
+msgstr ""
+
msgid "Quantity Completed"
msgstr "完了数量"
+msgid "Quantity in transit to the storage unit via open stock transfers."
+msgstr ""
+
msgid "Quantity is derived from completed serials/batches in MES and cannot be edited."
msgstr "数量はMESで完了したシリアル/バッチから導出されており、編集することはできません。"
@@ -6228,6 +6252,9 @@ msgstr "ジョブあたりの数量"
msgid "Quantity per Parent"
msgstr "親あたりの数量"
+msgid "Quantity physically on the material's assigned storage unit (shelf). Turns red when it's below what that unit needs to supply."
+msgstr ""
+
msgid "Quantity Type"
msgstr "数量タイプ"
@@ -6341,6 +6368,9 @@ msgstr "{0}を在庫に受け取る"
msgid "Receive to Inventory"
msgstr "在庫に受け取る"
+msgid "Received"
+msgstr ""
+
msgid "Received At"
msgstr "受け取った日時"
@@ -6350,6 +6380,9 @@ msgstr "受け取った人"
msgid "Received Qty"
msgstr "受け取り数量"
+msgid "Receiving"
+msgstr ""
+
msgid "Receiving Location"
msgstr "受取場所"
@@ -7894,6 +7927,9 @@ msgstr "このジョブはインベントリに受け取られます。ショッ
msgid "This job will no longer be available on the shop floor."
msgstr "このジョブはショップフロアで利用できなくなります。"
+msgid "This job's own required quantity for the material."
+msgstr ""
+
msgid "This sales order has associated jobs. Choose what to do with them."
msgstr "この販売注文には関連するジョブがあります。それらをどうするかを選択してください。"
@@ -8050,6 +8086,12 @@ msgstr "合計価格"
msgid "Total Quantity"
msgstr "合計数量"
+msgid "Total quantity on hand for the item across all storage units at this location. Turns red when on hand plus incoming can't cover total demand."
+msgstr ""
+
+msgid "Total quantity required across all active jobs and sales orders at this location — not just this job."
+msgstr ""
+
msgid "Total:"
msgstr "合計:"
diff --git a/packages/locale/locales/pl/erp.po b/packages/locale/locales/pl/erp.po
index 452f1b2c7d..4f8872e818 100644
--- a/packages/locale/locales/pl/erp.po
+++ b/packages/locale/locales/pl/erp.po
@@ -1040,6 +1040,9 @@ msgstr "Dostępne"
msgid "Avg Days to Close"
msgstr "Średnia liczba dni do zamknięcia"
+msgid "Awaiting approval"
+msgstr ""
+
msgid "Back"
msgstr "Wstecz"
@@ -3858,6 +3861,9 @@ msgstr "Godziny/1000 Sztuk"
msgid "Hours/Piece"
msgstr "Godziny/Sztuka"
+msgid "How the material is sourced (make, purchase, or pull from inventory) and the storage unit it's pulled from."
+msgstr ""
+
msgid "How the resolved price was calculated."
msgstr "Jak została obliczona ostateczna cena."
@@ -5445,6 +5451,9 @@ msgstr "Wstrzymane"
msgid "On Jobs"
msgstr "Na zadaniach"
+msgid "On order"
+msgstr ""
+
msgid "On Purchase Order"
msgstr "Na zamówieniu zakupu"
@@ -5559,6 +5568,9 @@ msgstr "LUB"
msgid "Order"
msgstr "Zamówienie"
+msgid "Order {jobQuantity} for this job"
+msgstr ""
+
msgid "Order by"
msgstr "Zamów do"
@@ -5820,6 +5832,9 @@ msgstr "Zaplanowane Zamówienie"
msgid "Planned order = MRP suggestion to cover projected demand based on the item's reorder policy (or manually added)."
msgstr "Planowane zamówienie = sugestia MRP pokrywająca prognozowany popyt na podstawie polityki zamawiania pozycji (lub dodane ręcznie)."
+msgid "Planned purchase order"
+msgstr ""
+
msgid "Planned Start"
msgstr "Planowany początek"
@@ -6032,6 +6047,9 @@ msgstr "Typ procesu"
msgid "Processes"
msgstr "Procesy"
+msgid "Procurement status — needs ordering, planned, on order, or received. The same indicator shown in the BoM tree."
+msgstr ""
+
msgid "Production"
msgstr "Produkcja"
@@ -6201,9 +6219,15 @@ msgstr "Ilości"
msgid "Quantity"
msgstr "Ilość"
+msgid "Quantity arriving — on open purchase orders plus on production (make) orders."
+msgstr ""
+
msgid "Quantity Completed"
msgstr "Ilość ukończona"
+msgid "Quantity in transit to the storage unit via open stock transfers."
+msgstr ""
+
msgid "Quantity is derived from completed serials/batches in MES and cannot be edited."
msgstr "Ilość pochodzi z ukończonych numerów seryjnych/partii w MES i nie może być edytowana."
@@ -6228,6 +6252,9 @@ msgstr "Ilość na zadanie"
msgid "Quantity per Parent"
msgstr "Ilość na jednostkę nadrzędną"
+msgid "Quantity physically on the material's assigned storage unit (shelf). Turns red when it's below what that unit needs to supply."
+msgstr ""
+
msgid "Quantity Type"
msgstr "Typ ilości"
@@ -6341,6 +6368,9 @@ msgstr "Odbierz {0} do Magazynu"
msgid "Receive to Inventory"
msgstr "Odbierz do Magazynu"
+msgid "Received"
+msgstr ""
+
msgid "Received At"
msgstr "Otrzymano o"
@@ -6350,6 +6380,9 @@ msgstr "Otrzymane od"
msgid "Received Qty"
msgstr "Otrzymana Ilość"
+msgid "Receiving"
+msgstr ""
+
msgid "Receiving Location"
msgstr "Lokalizacja odbioru"
@@ -7894,6 +7927,9 @@ msgstr "To zadanie zostanie przyjęte do magazynu. Nie będzie już dostępne na
msgid "This job will no longer be available on the shop floor."
msgstr "Ta praca nie będzie już dostępna na hali produkcyjnej."
+msgid "This job's own required quantity for the material."
+msgstr ""
+
msgid "This sales order has associated jobs. Choose what to do with them."
msgstr "To zamówienie sprzedaży ma powiązane zadania. Wybierz, co z nimi zrobić."
@@ -8050,6 +8086,12 @@ msgstr "Cena całkowita"
msgid "Total Quantity"
msgstr "Całkowita ilość"
+msgid "Total quantity on hand for the item across all storage units at this location. Turns red when on hand plus incoming can't cover total demand."
+msgstr ""
+
+msgid "Total quantity required across all active jobs and sales orders at this location — not just this job."
+msgstr ""
+
msgid "Total:"
msgstr "Razem:"
diff --git a/packages/locale/locales/pt/erp.po b/packages/locale/locales/pt/erp.po
index f39a2b9a0c..c5b0c2c2ec 100644
--- a/packages/locale/locales/pt/erp.po
+++ b/packages/locale/locales/pt/erp.po
@@ -1040,6 +1040,9 @@ msgstr "Disponível"
msgid "Avg Days to Close"
msgstr "Dias Médios para Fechar"
+msgid "Awaiting approval"
+msgstr ""
+
msgid "Back"
msgstr "Voltar"
@@ -3858,6 +3861,9 @@ msgstr "Horas/1000 Peças"
msgid "Hours/Piece"
msgstr "Horas/Peça"
+msgid "How the material is sourced (make, purchase, or pull from inventory) and the storage unit it's pulled from."
+msgstr ""
+
msgid "How the resolved price was calculated."
msgstr "Como o preço resolvido foi calculado."
@@ -5445,6 +5451,9 @@ msgstr "Em Espera"
msgid "On Jobs"
msgstr "Em Trabalhos"
+msgid "On order"
+msgstr ""
+
msgid "On Purchase Order"
msgstr "Em Ordem de Compra"
@@ -5559,6 +5568,9 @@ msgstr "OU"
msgid "Order"
msgstr "Pedido"
+msgid "Order {jobQuantity} for this job"
+msgstr ""
+
msgid "Order by"
msgstr "Encomendar até"
@@ -5820,6 +5832,9 @@ msgstr "Ordem Planejada"
msgid "Planned order = MRP suggestion to cover projected demand based on the item's reorder policy (or manually added)."
msgstr "Ordem planejada = sugestão de MRP para cobrir a demanda projetada com base na política de reabastecimento do item (ou adicionada manualmente)."
+msgid "Planned purchase order"
+msgstr ""
+
msgid "Planned Start"
msgstr "Início Planejado"
@@ -6032,6 +6047,9 @@ msgstr "Tipo de Processo"
msgid "Processes"
msgstr "Processos"
+msgid "Procurement status — needs ordering, planned, on order, or received. The same indicator shown in the BoM tree."
+msgstr ""
+
msgid "Production"
msgstr "Produção"
@@ -6201,9 +6219,15 @@ msgstr "Quantidades"
msgid "Quantity"
msgstr "Quantidade"
+msgid "Quantity arriving — on open purchase orders plus on production (make) orders."
+msgstr ""
+
msgid "Quantity Completed"
msgstr "Quantidade Concluída"
+msgid "Quantity in transit to the storage unit via open stock transfers."
+msgstr ""
+
msgid "Quantity is derived from completed serials/batches in MES and cannot be edited."
msgstr "A quantidade é derivada de seriais/lotes concluídos no MES e não pode ser editada."
@@ -6228,6 +6252,9 @@ msgstr "Quantidade Por Trabalho"
msgid "Quantity per Parent"
msgstr "Quantidade por Pai"
+msgid "Quantity physically on the material's assigned storage unit (shelf). Turns red when it's below what that unit needs to supply."
+msgstr ""
+
msgid "Quantity Type"
msgstr "Tipo de Quantidade"
@@ -6341,6 +6368,9 @@ msgstr "Receber {0} para Inventário"
msgid "Receive to Inventory"
msgstr "Receber para Inventário"
+msgid "Received"
+msgstr ""
+
msgid "Received At"
msgstr "Recebido em"
@@ -6350,6 +6380,9 @@ msgstr "Recebido Por"
msgid "Received Qty"
msgstr "Qtd. Recebida"
+msgid "Receiving"
+msgstr ""
+
msgid "Receiving Location"
msgstr "Local de Recebimento"
@@ -7894,6 +7927,9 @@ msgstr "Este trabalho será recebido no inventário. Não estará mais disponív
msgid "This job will no longer be available on the shop floor."
msgstr "Este trabalho não estará mais disponível no chão de fábrica."
+msgid "This job's own required quantity for the material."
+msgstr ""
+
msgid "This sales order has associated jobs. Choose what to do with them."
msgstr "Esta ordem de venda tem trabalhos associados. Escolha o que fazer com eles."
@@ -8050,6 +8086,12 @@ msgstr "Preço Total"
msgid "Total Quantity"
msgstr "Quantidade Total"
+msgid "Total quantity on hand for the item across all storage units at this location. Turns red when on hand plus incoming can't cover total demand."
+msgstr ""
+
+msgid "Total quantity required across all active jobs and sales orders at this location — not just this job."
+msgstr ""
+
msgid "Total:"
msgstr "Total:"
diff --git a/packages/locale/locales/ru/erp.po b/packages/locale/locales/ru/erp.po
index f356b2eb6f..424f2fb30e 100644
--- a/packages/locale/locales/ru/erp.po
+++ b/packages/locale/locales/ru/erp.po
@@ -1040,6 +1040,9 @@ msgstr "Доступно"
msgid "Avg Days to Close"
msgstr "Среднее количество дней до закрытия"
+msgid "Awaiting approval"
+msgstr ""
+
msgid "Back"
msgstr "Назад"
@@ -3858,6 +3861,9 @@ msgstr "Часов/1000 Деталей"
msgid "Hours/Piece"
msgstr "Часов/Деталь"
+msgid "How the material is sourced (make, purchase, or pull from inventory) and the storage unit it's pulled from."
+msgstr ""
+
msgid "How the resolved price was calculated."
msgstr "Как была рассчитана окончательная цена."
@@ -5445,6 +5451,9 @@ msgstr "На удержании"
msgid "On Jobs"
msgstr "На заказах"
+msgid "On order"
+msgstr ""
+
msgid "On Purchase Order"
msgstr "На заказе покупки"
@@ -5559,6 +5568,9 @@ msgstr "ИЛИ"
msgid "Order"
msgstr "Заказ"
+msgid "Order {jobQuantity} for this job"
+msgstr ""
+
msgid "Order by"
msgstr "Заказать до"
@@ -5820,6 +5832,9 @@ msgstr "Плановый заказ"
msgid "Planned order = MRP suggestion to cover projected demand based on the item's reorder policy (or manually added)."
msgstr "Плановый заказ = предложение MRP для покрытия прогнозируемого спроса на основе политики переупорядочения товара (или добавлено вручную)."
+msgid "Planned purchase order"
+msgstr ""
+
msgid "Planned Start"
msgstr "Запланированное начало"
@@ -6032,6 +6047,9 @@ msgstr "Тип процесса"
msgid "Processes"
msgstr "Процессы"
+msgid "Procurement status — needs ordering, planned, on order, or received. The same indicator shown in the BoM tree."
+msgstr ""
+
msgid "Production"
msgstr "Производство"
@@ -6201,9 +6219,15 @@ msgstr "Количества"
msgid "Quantity"
msgstr "Количество"
+msgid "Quantity arriving — on open purchase orders plus on production (make) orders."
+msgstr ""
+
msgid "Quantity Completed"
msgstr "Завершено количество"
+msgid "Quantity in transit to the storage unit via open stock transfers."
+msgstr ""
+
msgid "Quantity is derived from completed serials/batches in MES and cannot be edited."
msgstr "Количество определяется на основе завершенных серийных номеров/партий в MES и не может быть отредактировано."
@@ -6228,6 +6252,9 @@ msgstr "Количество на задание"
msgid "Quantity per Parent"
msgstr "Количество на родителя"
+msgid "Quantity physically on the material's assigned storage unit (shelf). Turns red when it's below what that unit needs to supply."
+msgstr ""
+
msgid "Quantity Type"
msgstr "Тип количества"
@@ -6341,6 +6368,9 @@ msgstr "Получить {0} в инвентарь"
msgid "Receive to Inventory"
msgstr "Получить в инвентарь"
+msgid "Received"
+msgstr ""
+
msgid "Received At"
msgstr "Получено в"
@@ -6350,6 +6380,9 @@ msgstr "Получено от"
msgid "Received Qty"
msgstr "Полученное кол-во"
+msgid "Receiving"
+msgstr ""
+
msgid "Receiving Location"
msgstr "Место получения"
@@ -7894,6 +7927,9 @@ msgstr "Эта работа будет получена в инвентарь.
msgid "This job will no longer be available on the shop floor."
msgstr "Эта работа больше не будет доступна на производственном участке."
+msgid "This job's own required quantity for the material."
+msgstr ""
+
msgid "This sales order has associated jobs. Choose what to do with them."
msgstr "Этот заказ на продажу имеет связанные работы. Выберите, что с ними делать."
@@ -8050,6 +8086,12 @@ msgstr "Общая цена"
msgid "Total Quantity"
msgstr "Общее количество"
+msgid "Total quantity on hand for the item across all storage units at this location. Turns red when on hand plus incoming can't cover total demand."
+msgstr ""
+
+msgid "Total quantity required across all active jobs and sales orders at this location — not just this job."
+msgstr ""
+
msgid "Total:"
msgstr "Итого:"
diff --git a/packages/locale/locales/zh/erp.po b/packages/locale/locales/zh/erp.po
index 86820dfc45..ff421b501b 100644
--- a/packages/locale/locales/zh/erp.po
+++ b/packages/locale/locales/zh/erp.po
@@ -1040,6 +1040,9 @@ msgstr "可用"
msgid "Avg Days to Close"
msgstr "平均关闭天数"
+msgid "Awaiting approval"
+msgstr ""
+
msgid "Back"
msgstr "返回"
@@ -3858,6 +3861,9 @@ msgstr "小时/1000件"
msgid "Hours/Piece"
msgstr "小时/件"
+msgid "How the material is sourced (make, purchase, or pull from inventory) and the storage unit it's pulled from."
+msgstr ""
+
msgid "How the resolved price was calculated."
msgstr "已解决价格的计算方式。"
@@ -5445,6 +5451,9 @@ msgstr "暂停"
msgid "On Jobs"
msgstr "在工作中"
+msgid "On order"
+msgstr ""
+
msgid "On Purchase Order"
msgstr "采购订单上"
@@ -5559,6 +5568,9 @@ msgstr "或"
msgid "Order"
msgstr "订单"
+msgid "Order {jobQuantity} for this job"
+msgstr ""
+
msgid "Order by"
msgstr "订购截止日期"
@@ -5820,6 +5832,9 @@ msgstr "计划订单"
msgid "Planned order = MRP suggestion to cover projected demand based on the item's reorder policy (or manually added)."
msgstr "计划订单 = MRP 建议,用于根据物品的重新订购政策(或手动添加)覆盖预计需求。"
+msgid "Planned purchase order"
+msgstr ""
+
msgid "Planned Start"
msgstr "计划开始"
@@ -6032,6 +6047,9 @@ msgstr "流程类型"
msgid "Processes"
msgstr "流程"
+msgid "Procurement status — needs ordering, planned, on order, or received. The same indicator shown in the BoM tree."
+msgstr ""
+
msgid "Production"
msgstr "生产"
@@ -6201,9 +6219,15 @@ msgstr "数量"
msgid "Quantity"
msgstr "数量"
+msgid "Quantity arriving — on open purchase orders plus on production (make) orders."
+msgstr ""
+
msgid "Quantity Completed"
msgstr "完成数量"
+msgid "Quantity in transit to the storage unit via open stock transfers."
+msgstr ""
+
msgid "Quantity is derived from completed serials/batches in MES and cannot be edited."
msgstr "数量来自MES中已完成的序列号/批次,无法编辑。"
@@ -6228,6 +6252,9 @@ msgstr "每个工作的数量"
msgid "Quantity per Parent"
msgstr "每个父项的数量"
+msgid "Quantity physically on the material's assigned storage unit (shelf). Turns red when it's below what that unit needs to supply."
+msgstr ""
+
msgid "Quantity Type"
msgstr "数量类型"
@@ -6341,6 +6368,9 @@ msgstr "将 {0} 接收到库存"
msgid "Receive to Inventory"
msgstr "接收到库存"
+msgid "Received"
+msgstr ""
+
msgid "Received At"
msgstr "接收于"
@@ -6350,6 +6380,9 @@ msgstr "接收人"
msgid "Received Qty"
msgstr "已收货数量"
+msgid "Receiving"
+msgstr ""
+
msgid "Receiving Location"
msgstr "收货地点"
@@ -7894,6 +7927,9 @@ msgstr "此工作将被接收到库存中。它将不再在车间可用。"
msgid "This job will no longer be available on the shop floor."
msgstr "此工作将不再在车间可用。"
+msgid "This job's own required quantity for the material."
+msgstr ""
+
msgid "This sales order has associated jobs. Choose what to do with them."
msgstr "此销售订单有关联的工作。选择如何处理它们。"
@@ -8050,6 +8086,12 @@ msgstr "总价"
msgid "Total Quantity"
msgstr "总数量"
+msgid "Total quantity on hand for the item across all storage units at this location. Turns red when on hand plus incoming can't cover total demand."
+msgstr ""
+
+msgid "Total quantity required across all active jobs and sales orders at this location — not just this job."
+msgstr ""
+
msgid "Total:"
msgstr "总计:"
diff --git a/packages/react/src/Copy.tsx b/packages/react/src/Copy.tsx
index 470a5f2b11..7994789ccd 100644
--- a/packages/react/src/Copy.tsx
+++ b/packages/react/src/Copy.tsx
@@ -9,12 +9,14 @@ const Copy = ({
text,
icon,
className,
+ tooltipClassName,
withTextInTooltip = false,
size = "sm"
}: {
text: string;
icon?: JSX.Element;
className?: string;
+ tooltipClassName?: string;
withTextInTooltip?: boolean;
size?: "sm" | "md" | "lg";
}) => {
@@ -42,7 +44,7 @@ const Copy = ({
onClick={handleCopy}
/>
</TooltipTrigger>
- <TooltipContent>
+ <TooltipContent className={tooltipClassName}>
<span>
{isCopied
? "Copied!"
diff --git a/packages/react/src/PulsingDot.tsx b/packages/react/src/PulsingDot.tsx
index 39f6950663..7ae26540fb 100644
--- a/packages/react/src/PulsingDot.tsx
+++ b/packages/react/src/PulsingDot.tsx
@@ -18,9 +18,9 @@ export function PulsingDot({
return (
<span className={cn("relative flex h-2 w-2", className)} {...props}>
<span
- className={`absolute h-full w-full animate-ping rounded-full border border-emerald-500 opacity-100 duration-1000`}
+ className={`absolute h-full w-full animate-ping rounded-full border border-red-500 opacity-100 duration-1000`}
/>
- <span className={`h-2 w-2 rounded-full bg-emerald-500`} />
+ <span className={`h-2 w-2 rounded-full bg-red-500`} />
</span>
);
}