Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.
TypeScript ai-agentsbill-of-materialserpinventory-managementleanmanufacturingmanufacturing-execution-systemmcp-servermesmrpopen-source-erppostgresqlproduction-planningqmsquality-management-systemreact-routerself-hostedsupabasetraceabilitytypescript
Manufacturing inventory fixes (#1135)
Sidd00da9e58c20
diff --git a/.ai/rules/audit-log-system.md b/.ai/rules/audit-log-system.mdindex 4848620786..539da29823 100644--- a/.ai/rules/audit-log-system.md+++ b/.ai/rules/audit-log-system.md@@ -42,8 +42,9 @@ at the app layer (`requirePermissions`). A separate `auditLogArchive` table tracEntity keys are **not** all bare table names — notably `salesQuote` (label "Quote", tables `quote`/`quoteLine`),`productionJob` (label "Job", tables `job`/...), plus `itemShelfLife`, `supplierQuote`, `customer`, `supplier`,`item`, `salesOrder`, `purchaseOrder`, `salesInvoice`, `purchaseInvoice`, `employee`, `nonConformance`, `gauge`,-`shipment`, `receipt`, `warehouseTransfer`, `stockTransfer`, `workCenter`, `maintenanceSchedule`,-`maintenanceDispatch`, `pricingRule`, `priceOverride`, `priceOverrideBreak`, `fixedAsset`. (~26 entities; the+`shipment`, `receipt`, `warehouseTransfer`, `stockTransfer`, `inventoryCount` (root `inventoryCount` ++child `inventoryCountLine`), `workCenter`, `maintenanceSchedule`,+`maintenanceDispatch`, `pricingRule`, `priceOverride`, `priceOverrideBreak`, `fixedAsset`. (~27 entities; theold `quote`/`job`/`itemCost` entity keys are gone — `itemCost` is now an extension table of `item`.)Other config knobs:@@ -92,7 +93,7 @@ than from config.badges, actor + entity links). `getEntityPath(entityId)` maps the id **prefix** (before first `_`) to a`path.to.*` route: `pi`→purchaseInvoice, `si`→salesInvoice, `po`→purchaseOrder, `so`→salesOrder,`cust`→customer, `sup`→supplier, `item`→part, `job`→job, `quote`→quote, `emp`→employeeAccount, `nc`→issue,- `sh`→shipment, `rec`→receipt, `g`→gauge, `sq`→supplierQuote, `wc`→workCenter, `main`→maintenanceDispatch.+ `sh`→shipment, `rec`→receipt, `ic`→inventoryCount, `g`→gauge, `sq`→supplierQuote, `wc`→workCenter, `main`→maintenanceDispatch.Unknown prefixes render as plain text.- `.../AuditLog/AuditLogSettings.tsx` — enable/disable + archive download list.- `apps/erp/app/components/AuditLog/` — per-entity history `AuditLogDrawer.tsx` + `useAuditLog.tsx` hook,@@ -113,4 +114,5 @@ than from config.`20260212174458_remove_actor_name_from_audit_log.sql`,`20260217120000_audit_log_add_table_name.sql`, `20260218000000_expand_audit_log_entities.sql`,`20260418000000_audit_log_add_record_id.sql`, `20260427120000_audit-event-timestamp.sql`,-`20260513130000_audit-item-shelf-life-history.sql`.+`20260513130000_audit-item-shelf-life-history.sql`,+`20260713095136_attach-inventory-count-audit-triggers.sql` (attaches triggers on `inventoryCount`/`inventoryCountLine`).diff --git a/apps/erp/app/components/Editable/EditableNumber.tsx b/apps/erp/app/components/Editable/EditableNumber.tsxindex 84e56b2f4c..f603fc11e9 100644--- a/apps/erp/app/components/Editable/EditableNumber.tsx+++ b/apps/erp/app/components/Editable/EditableNumber.tsx@@ -10,7 +10,9 @@ const EditableNumber =newValue: string,row: T) => Promise<PostgrestSingleResponse<unknown>>,- numberFieldProps?: NumberFieldProps,+ // Static props, or a function of the row for per-row limits (e.g. a serial+ // line's `maxValue: 1`).+ numberFieldProps?: NumberFieldProps | ((row: T) => NumberFieldProps),// `clearable` lets an empty input persist as a cleared value (sent as "") so// a nullable column can be reset. Off by default so non-nullable columns keep// ignoring empty input.@@ -23,42 +25,74 @@ const EditableNumber =onError,onUpdate}: EditableTableCellComponentProps<T>) => {- return (- <NumberField- {...numberFieldProps}- value={value as number}- onChange={(numberValue) => {- const isEmpty = !Number.isFinite(numberValue);- if (isEmpty) {- // Ignore empty unless clearable, and skip the no-op re-clear of an- // already-empty cell.- if (!options?.clearable || value === null || value === undefined)- return;- } else if (numberValue === value) {- return;- }+ const resolvedProps =+ typeof numberFieldProps === "function"+ ? numberFieldProps(row)+ : numberFieldProps;++ // Postgres NUMERIC columns arrive as strings over the wire — coerce for the+ // NumberField's initial (uncontrolled) value.+ const numericValue =+ value === null || value === undefined || value === ""+ ? undefined+ : Number(value);++ const clamp = (n: number) => {+ const { minValue, maxValue } = resolvedProps ?? {};+ let v = n;+ if (typeof maxValue === "number") v = Math.min(v, maxValue);+ if (typeof minValue === "number") v = Math.max(v, minValue);+ return v;+ };- onUpdate({ [accessorKey]: isEmpty ? null : numberValue });+ // Push an edit into the table's state model + persist it.+ const commit = (raw: number | undefined) => {+ const isEmpty = raw === undefined || !Number.isFinite(raw);+ const next = isEmpty ? null : clamp(raw as number);+ // Nothing changed (or an ignorable empty on a non-clearable/empty cell).+ if (next === (numericValue ?? null)) return;+ if (+ isEmpty &&+ (!options?.clearable || value === null || value === undefined)+ )+ return;- // @ts-ignore - mutation receives the raw cell value ("" clears)- mutation(accessorKey, isEmpty ? "" : numberValue, row)- .then(({ error }) => {- if (error) {- onError();- onUpdate({ [accessorKey]: value });- }- })- .catch(() => {- onError();- onUpdate({ [accessorKey]: value });- });- }}- >+ onUpdate({ [accessorKey]: next });++ // @ts-ignore - mutation receives the raw cell value ("" clears)+ mutation(accessorKey, isEmpty ? "" : next, row)+ .then(({ error }) => {+ if (error) {+ onError();+ onUpdate({ [accessorKey]: value });+ }+ })+ .catch(() => {+ onError();+ onUpdate({ [accessorKey]: value });+ });+ };++ return (+ // UNCONTROLLED (`defaultValue`, not `value`): the editing input only mounts+ // for the selected cell and the surrounding page re-renders often, which+ // would reset a controlled value mid-edit. react-aria's `onChange` commits+ // on blur/Enter — but moving to another cell UNMOUNTS this input, and the+ // unmount races that commit so it never fires. The DOM `onBlur` on the raw+ // input fires synchronously before the unmount, so it is the reliable path+ // that syncs the edit into the table's state model.+ <NumberField {...resolvedProps} defaultValue={numericValue}><NumberInputsize="sm"className="w-full rounded-none outline-none border-none shadow-none focus-visible:ring-0"autoFocusonFocus={(e) => e.currentTarget.select()}+ onBlur={(e) => {+ const text = (e.currentTarget.value ?? "").trim();+ // Empty or unparseable → no value (commit guards against a stray 0).+ const parsed = text === "" ? Number.NaN : Number(text);+ commit(Number.isNaN(parsed) ? undefined : parsed);+ }}/></NumberField>);diff --git a/apps/erp/app/components/Table/Table.tsx b/apps/erp/app/components/Table/Table.tsxindex 7dd1346a55..74f7a7449d 100644--- a/apps/erp/app/components/Table/Table.tsx+++ b/apps/erp/app/components/Table/Table.tsx@@ -20,6 +20,7 @@ import {Tr,useEscape,useMount,+ useOutsideClick,VStack} from "@carbon/react";import { clamp } from "@carbon/utils";@@ -105,6 +106,9 @@ interface TableProps<T extends object> {// Optional node rendered immediately after the title (e.g. a status badge).titleBadge?: ReactNode;withInlineEditing?: boolean;+ // When true, the table starts in edit mode and the Edit/Lock toggle is hidden+ // (editing is always on — e.g. a Draft document that is inherently editable).+ forceEditMode?: boolean;withPagination?: boolean;withSavedView?: boolean;withSearch?: boolean;@@ -112,12 +116,18 @@ interface TableProps<T extends object> {withSimpleSorting?: boolean;sort?: ReactNode;getRowId?: (originalRow: T, index: number) => string;+ // Optional per-row class (e.g. to highlight rows that failed validation).+ getRowClassName?: (originalRow: T) => string | undefined;rowSelection?: RowSelectionState;onRowSelectionChange?: OnChangeFn<RowSelectionState>;onSelectedRowsChange?: (selectedRows: T[]) => void;renderActions?: (selectedRows: T[]) => ReactNode;renderContextMenu?: (row: T) => JSX.Element | null;renderExpandedRow?: (row: T) => ReactNode;+ // When `renderExpandedRow` is set, gates which rows can expand (show a chevron+ // + toggle). Defaults to all rows. Use it so only parents with children get an+ // affordance, like a tree's `hasChildren`.+ canExpandRow?: (row: T) => boolean;}type AggregateFunction = "sum" | "average" | "min" | "max" | "median" | "count";@@ -245,6 +255,7 @@ const Table = <T extends object>({title,titleBadge,withInlineEditing = false,+ forceEditMode = false,withPagination = true,withSavedView = false,withSearch = true,@@ -252,12 +263,14 @@ const Table = <T extends object>({withSimpleSorting = true,sort,getRowId,+ getRowClassName,rowSelection: controlledRowSelection,onRowSelectionChange,onSelectedRowsChange,renderActions,renderContextMenu,- renderExpandedRow+ renderExpandedRow,+ canExpandRow}: TableProps<T>) => {const { i18n } = useLingui();const tableContainerRef = useRef<HTMLDivElement>(null);@@ -430,7 +443,12 @@ const Table = <T extends object>({let result: ColumnDef<T>[] = [];if (renderExpandedRow) {result.push(- ...getExpandColumn<T>(expandedRows, toggleRowExpanded, translateLabel)+ ...getExpandColumn<T>(+ expandedRows,+ toggleRowExpanded,+ translateLabel,+ canExpandRow+ ));}if (withSelectableRows) {@@ -446,6 +464,7 @@ const Table = <T extends object>({renderContextMenu,withSelectableRows,renderExpandedRow,+ canExpandRow,expandedRows,toggleRowExpanded,translateLabel@@ -508,7 +527,7 @@ const Table = <T extends object>({}}, [rowSelection, onSelectedRowsChange]);- const [editMode, setEditMode] = useState(false);+ const [editMode, setEditMode] = useState(forceEditMode);const [isEditing, setIsEditing] = useState(false);const [selectedCell, setSelectedCell] = useState<Position>(null);@@ -531,6 +550,21 @@ const Table = <T extends object>({focusOnSelectedCell();});+ // Clicking outside the table clears the selected cell (and ends any edit). A+ // cell's editable input commits on blur first, so the value is saved before+ // this runs. Portaled dropdowns (e.g. a cell's combobox popover) render+ // outside the container but belong to an active edit — ignore clicks in them.+ useOutsideClick({+ ref: tableContainerRef,+ enabled: selectedCell != null,+ handler: (e) => {+ const target = e.target as HTMLElement | null;+ if (target?.closest("[data-radix-popper-content-wrapper]")) return;+ setIsEditing(false);+ setSelectedCell(null);+ }+ });+const onSelectedCellChange = useCallback((position: Position) => {if (@@ -902,6 +936,7 @@ const Table = <T extends object>({title={title}titleBadge={titleBadge}withInlineEditing={withInlineEditing}+ forceEditMode={forceEditMode}withPagination={withPagination}withSavedView={withSavedView}withSearch={withSearch}@@ -1105,9 +1140,12 @@ const Table = <T extends object>({</Thead><Tbody>{rows.map((row) => {+ const rowExpandable =+ !!renderExpandedRow &&+ (!canExpandRow || canExpandRow(row.original));const isRowExpanded =- renderExpandedRow && expandedRows[row.index];- const handleRowClick = renderExpandedRow+ rowExpandable && expandedRows[row.index];+ const handleRowClick = rowExpandable? () => toggleRowExpanded(row.index): undefined;const rowContent = renderContextMenu ? (@@ -1130,9 +1168,10 @@ const Table = <T extends object>({onCellClick={onCellClick}onCellUpdate={onCellUpdate}onClick={handleRowClick}- className={- renderExpandedRow ? "cursor-pointer" : undefined- }+ className={cn(+ rowExpandable && "cursor-pointer",+ getRowClassName?.(row.original)+ )}/></ContextMenuTrigger><ContextMenuContent className="w-128">@@ -1157,9 +1196,10 @@ const Table = <T extends object>({onCellClick={onCellClick}onCellUpdate={onCellUpdate}onClick={handleRowClick}- className={- renderExpandedRow ? "cursor-pointer" : undefined- }+ className={cn(+ rowExpandable && "cursor-pointer",+ getRowClassName?.(row.original)+ )}/>);@@ -1320,7 +1360,8 @@ function getActionColumn<T>(function getExpandColumn<T>(expandedRows: Record<number, boolean>,toggleRowExpanded: (rowIndex: number) => void,- translateLabel: (value: string) => string+ translateLabel: (value: string) => string,+ canExpandRow?: (row: T) => boolean): ColumnDef<T>[] {return [{@@ -1329,6 +1370,8 @@ function getExpandColumn<T>(enablePinning: true,header: () => <span className="sr-only">{translateLabel("Expand")}</span>,cell: ({ row }) => {+ // No chevron for rows that have nothing to reveal (tree `hasChildren`).+ if (canExpandRow && !canExpandRow(row.original)) return null;const isExpanded = expandedRows[row.index] ?? false;return (<buttondiff --git a/apps/erp/app/components/Table/components/TableHeader.tsx b/apps/erp/app/components/Table/components/TableHeader.tsxindex 7f2c9cd6c5..e9e8b63667 100644--- a/apps/erp/app/components/Table/components/TableHeader.tsx+++ b/apps/erp/app/components/Table/components/TableHeader.tsx@@ -85,6 +85,7 @@ type HeaderProps<T> = {titleBadge?: ReactNode;withSavedView: boolean;withInlineEditing: boolean;+ forceEditMode: boolean;withPagination: boolean;withSearch: boolean;withSelectableRows: boolean;@@ -115,6 +116,7 @@ const TableHeader = <T extends object>({title,titleBadge,withInlineEditing,+ forceEditMode,withPagination,withSavedView,withSearch,@@ -359,6 +361,7 @@ const TableHeader = <T extends object>({)}{withInlineEditing &&+ !forceEditMode &&(editMode ? (<ButtonleftIcon={<LuLock />}diff --git a/apps/erp/app/entry.server.tsx b/apps/erp/app/entry.server.tsxindex f828e40463..46036bc8f4 100644--- a/apps/erp/app/entry.server.tsx+++ b/apps/erp/app/entry.server.tsx@@ -1,11 +1,82 @@+import { getLogger } from "@carbon/logger";import { ensureLoggingConfigured } from "@carbon/logger/config.server";+import { getRequestId } from "@carbon/logger/middleware.server";import { handleRequest as vercelHandleRequest } from "@vercel/react-router/entry.server";import type { EntryContext, RouterContextProvider } from "react-router";+import { isRouteErrorResponse } from "react-router";ensureLoggingConfigured();+const log = getLogger("erp");++// Process-level safety net: errors that escape the request lifecycle entirely+// (background promises, timers, event emitters) never reach React Router's+// `handleError`, so without this they crash or vanish with no context. Log them+// with a stack. Guarded on a global so HMR/re-import doesn't stack duplicate+// listeners (which would trip Node's MaxListeners warning).+const globalForProcessHandlers = globalThis as typeof globalThis & {+ __carbonProcessErrorHandlers?: boolean;+};+if (+ typeof process !== "undefined" &&+ !globalForProcessHandlers.__carbonProcessErrorHandlers+) {+ globalForProcessHandlers.__carbonProcessErrorHandlers = true;+ process.on("unhandledRejection", (reason) => {+ log.error("Unhandled promise rejection: {message}", {+ message: reason instanceof Error ? reason.message : String(reason),+ error: reason+ });+ });+ process.on("uncaughtException", (error) => {+ log.error("Uncaught exception: {message}", {+ message: error.message,+ error+ });+ // An uncaught exception leaves the process in an undefined, possibly+ // corrupted state. These apps are long-lived services, so we exit and let+ // the supervisor restart a clean worker rather than serving from a broken+ // one. (unhandledRejection is left log-only: a stray rejection is usually+ // recoverable and crashing the whole server on each one is worse.)+ process.exit(1);+ });+}+export const streamTimeout = 60_000;+/**+ * React Router v7 server error hook: fires with the actual error thrown by any+ * loader/action/render that RR catches — the "why" behind a `GET 500 …` line+ * that the access-log middleware (which only sees the final status) can't.+ *+ * We skip control-flow throws (redirects, and intentional Response throws like+ * 401/403/404 from `requirePermissions`) and client-aborted requests, logging+ * only genuine 5xx server failures. `requestId` correlates with the `[http]`+ * access-log line for the same request.+ */+export function handleError(+ error: unknown,+ {+ request,+ context+ }: { request: Request; params: unknown; context: RouterContextProvider }+) {+ // Client navigated away / cancelled mid-flight — not a real failure.+ if (request.signal.aborted) return;+ // Redirects and intentional Response throws are control flow, not errors.+ if (error instanceof Response && error.status < 500) return;+ if (isRouteErrorResponse(error) && error.status < 500) return;++ const { pathname } = new URL(request.url);+ log.error("Unhandled error in {method} {pathname}: {message}", {+ method: request.method,+ pathname,+ requestId: getRequestId(context),+ message: error instanceof Error ? error.message : String(error),+ error+ });+}+export default function handleRequest(request: Request,responseStatusCode: number,diff --git a/apps/erp/app/modules/inventory/inventory.models.ts b/apps/erp/app/modules/inventory/inventory.models.tsindex 733cc690ba..3f20a8c8f0 100644--- a/apps/erp/app/modules/inventory/inventory.models.ts+++ b/apps/erp/app/modules/inventory/inventory.models.ts@@ -148,18 +148,34 @@ export const inventoryCountLineValidator = z.object({)});-export const inventoryAdjustmentValidator = z.object({- itemId: z.string().min(1, { message: "Item ID is required" }),- locationId: z.string().min(1, { message: "Location is required" }),- storageUnitId: zfd.text(z.string().optional()),- originalStorageUnitId: zfd.text(z.string().optional()),- adjustmentType: z.enum([...itemLedgerTypes, "Set Quantity"]),- quantity: zfd.numeric(z.number()),- trackedEntityId: zfd.text(z.string().optional()),- readableId: zfd.text(z.string().optional()),- expirationDate: zfd.text(z.string().optional()),- comment: zfd.text(z.string().optional())-});+export const inventoryAdjustmentValidator = z+ .object({+ itemId: z.string().min(1, { message: "Item ID is required" }),+ locationId: z.string().min(1, { message: "Location is required" }),+ storageUnitId: zfd.text(z.string().optional()),+ originalStorageUnitId: zfd.text(z.string().optional()),+ adjustmentType: z.enum([...itemLedgerTypes, "Set Quantity"]),+ quantity: zfd.numeric(z.number()),+ trackedEntityId: zfd.text(z.string().optional()),+ readableId: zfd.text(z.string().optional()),+ expirationDate: zfd.text(z.string().optional()),+ comment: zfd.text(z.string().optional()),+ // Set by serial-tracked forms so the quantity can be capped server-side.+ requiresSerialTracking: zfd+ .text(z.string().optional())+ .transform((val) => val === "true")+ })+ .superRefine((data, ctx) => {+ // A serial number is a single unique unit — whether setting a target or+ // applying a delta, its resulting/moved quantity can never exceed 1.+ if (data.requiresSerialTracking && Math.abs(data.quantity) > 1) {+ ctx.addIssue({+ code: z.ZodIssueCode.custom,+ path: ["quantity"],+ message: "Serial items can only have a quantity of 1"+ });+ }+ });export const itemLedgerValidator = z.object({postingDate: zfd.text(z.string().optional()),@@ -431,25 +447,36 @@ export const stockTransferValidator = z.object({})});-export const stockTransferLineValidator = z.object({- id: zfd.text(z.string().optional()),- stockTransferId: z.string().min(1, { message: "Pick list is required" }),- itemId: z.string().min(1, { message: "Item is required" }),- fromStorageUnitId: zfd.text(z.string().optional()),- toStorageUnitId: zfd.text(z.string().optional()),- quantity: zfd.numeric(- z- .number()- .min(0, { message: "Quantity must be greater than or equal to 0" })- ),- pickedQuantity: zfd.numeric(z.number().min(0).optional()),- requiresBatchTracking: zfd.text(- z.string().transform((val) => val === "true")- ),- requiresSerialTracking: zfd.text(- z.string().transform((val) => val === "true")- )-});+export const stockTransferLineValidator = z+ .object({+ id: zfd.text(z.string().optional()),+ stockTransferId: z.string().min(1, { message: "Pick list is required" }),+ itemId: z.string().min(1, { message: "Item is required" }),+ fromStorageUnitId: zfd.text(z.string().optional()),+ toStorageUnitId: zfd.text(z.string().optional()),+ quantity: zfd.numeric(+ z+ .number()+ .min(0, { message: "Quantity must be greater than or equal to 0" })+ ),+ pickedQuantity: zfd.numeric(z.number().min(0).optional()),+ requiresBatchTracking: zfd.text(+ z.string().transform((val) => val === "true")+ ),+ requiresSerialTracking: zfd.text(+ z.string().transform((val) => val === "true")+ )+ })+ .superRefine((data, ctx) => {+ // A serial number is a single unique unit — its quantity can never exceed 1.+ if (data.requiresSerialTracking && data.quantity > 1) {+ ctx.addIssue({+ code: z.ZodIssueCode.custom,+ path: ["quantity"],+ message: "Serial items can only have a quantity of 1"+ });+ }+ });export const stockTransferLineScanValidator = z.object({id: zfd.text(z.string().optional()),diff --git a/apps/erp/app/modules/inventory/inventory.service.ts b/apps/erp/app/modules/inventory/inventory.service.tsindex 16bcf252e4..081384baa8 100644--- a/apps/erp/app/modules/inventory/inventory.service.ts+++ b/apps/erp/app/modules/inventory/inventory.service.ts@@ -1418,7 +1418,12 @@ export async function getWarehouseTransferLines(export async function insertManualInventoryAdjustment(client: SupabaseClient<Database>,- inventoryAdjustment: z.infer<typeof inventoryAdjustmentValidator> & {+ // `requiresSerialTracking` is a form-only flag for the validator's serial+ // quantity guard — the route strips it before calling this.+ inventoryAdjustment: Omit<+ z.infer<typeof inventoryAdjustmentValidator>,+ "requiresSerialTracking"+ > & {companyId: string;createdBy: string;}@@ -1651,19 +1656,63 @@ export async function insertManualInventoryAdjustment(.select("*").single();}- // No serial number — fall back to legacy (untracked) stock- const legacyQty =- storageUnitQuantities?.data?.find(- (q) =>- q.trackedEntityId == null && q.storageUnitId == data.storageUnitId- )?.quantity ?? 0;- if (data.quantity > legacyQty) {+ // No serial number provided. Prefer untracked (legacy) stock in this bin.+ const legacyRow = storageUnitQuantities?.data?.find(+ (q) => q.trackedEntityId == null && q.storageUnitId == data.storageUnitId+ );+ if (legacyRow) {+ const legacyQty = legacyRow.quantity ?? 0;+ if (data.quantity > legacyQty) {+ return { error: "Insufficient quantity for negative adjustment" };+ }+ return client+ .from("itemLedger")+ .insert([+ { ...data, trackedEntityId: null, quantity: -Math.abs(data.quantity) }+ ])+ .select("*")+ .single();+ }++ // No untracked stock in the bin — resolve a tracked entity sitting in the+ // same storage unit so a negative adjustment can decrement identifiable+ // tracked stock (e.g. serial/batch entities created without a serial number,+ // adjusted via the "Update Inventory" button where no trackedEntityId is+ // pre-selected). Ambiguous when more than one entity holds stock there.+ const trackedRowsInUnit = (storageUnitQuantities?.data ?? []).filter(+ (q) =>+ q.trackedEntityId != null &&+ q.storageUnitId == data.storageUnitId &&+ (q.quantity ?? 0) > 0+ );+ if (trackedRowsInUnit.length === 0) {+ return { error: "Insufficient quantity for negative adjustment" };+ }+ if (trackedRowsInUnit.length > 1) {+ return {+ error:+ "Multiple tracked entities in this storage unit — select a specific row to adjust"+ };+ }+ const targetRow = trackedRowsInUnit[0];+ const targetQty = targetRow.quantity ?? 0;+ if (data.quantity > targetQty) {return { error: "Insufficient quantity for negative adjustment" };}+ const targetId = targetRow.trackedEntityId as string;+ const entityUpdate = await client+ .from("trackedEntity")+ .update({ quantity: targetQty - data.quantity })+ .eq("id", targetId);+ if (entityUpdate.error) return entityUpdate;return client.from("itemLedger").insert([- { ...data, trackedEntityId: null, quantity: -Math.abs(data.quantity) }+ {+ ...data,+ trackedEntityId: targetId,+ quantity: -Math.abs(data.quantity)+ }]).select("*").single();@@ -1807,7 +1856,7 @@ export async function getInventoryCountLines(let query = client.from("inventoryCountLine").select(- "*, item!inner(name, readableIdWithRevision, type, unitOfMeasureCode, thumbnailPath)",+ "*, item!inner(name, readableIdWithRevision, type, itemTrackingType, unitOfMeasureCode, thumbnailPath)",{count: "exact"}@@ -1862,6 +1911,24 @@ export async function getInventoryCountLineSummary(};}+// Every item-ledger adjustment a count posted (including rectify corrections),+// found via the movement's `documentType`/`documentId` back-reference. Used to+// show a posted count what it actually did to inventory. Chronological.+export async function getInventoryCountMovements(+ client: SupabaseClient<Database>,+ companyId: string,+ inventoryCountId: string+) {+ return client+ .from("itemLedgers")+ .select("*")+ .eq("companyId", companyId)+ .eq("documentType", "Inventory Count")+ .eq("documentId", inventoryCountId)+ .order("createdAt", { ascending: true })+ .order("entryNumber", { ascending: true });+}+// Counts are created once and never edited as a header (only their lines and// status change), so this is insert-only — no upsert/update branch.export async function insertInventoryCount(@@ -2027,6 +2094,130 @@ export async function generateInventoryCountLines(});}+// Refresh a count's frozen `systemQuantity` to the current live on-hand WITHOUT+// touching the entered `countedQuantity`. Used by Rectify: reopening a Posted+// count re-baselines the snapshot to now, so re-posting applies the corrected+// count on top of current stock. A full regenerate would wipe the counts; this+// only moves the baseline forward. The calling route guards status; re-stamps+// `snapshotAt`.+type ResnapshotInventoryCountArgs = {+ inventoryCountId: string;+ companyId: string;+ locationId: string;+ updatedBy: string;+};++// Re-baseline each line's `systemQuantity` to fresh live on-hand, inside a+// caller-supplied transaction. A `Transaction` is a `Kysely`, so callers pass+// `trx`; this never opens its own transaction, letting a caller (rectify) bundle+// it with a status guard + status flip atomically.+async function resnapshotInventoryCountLinesInTrx(+ trx: Kysely<KyselyDatabase>,+ args: ResnapshotInventoryCountArgs+) {+ const { inventoryCountId, companyId, locationId, updatedBy } = args;++ const bucketKey = (+ itemId: string,+ storageUnitId: string | null,+ trackedEntityId: string | null+ ) => `${itemId}|${storageUnitId ?? ""}|${trackedEntityId ?? ""}`;++ const lines = await trx+ .selectFrom("inventoryCountLine")+ .select(["id", "itemId", "storageUnitId", "trackedEntityId"])+ .where("inventoryCountId", "=", inventoryCountId)+ .where("companyId", "=", companyId)+ .execute();++ // Fresh status-aware on-hand for the location, grouped by bucket (matches+ // `generateInventoryCountLines` / `get_inventory_quantities`).+ const onHandRows = await trx+ .selectFrom("itemLedger")+ .select(["itemId", "storageUnitId", "trackedEntityId"])+ .select((eb) => eb.fn.sum<number>("quantity").as("quantity"))+ .where("companyId", "=", companyId)+ .where("locationId", "=", locationId)+ .where((eb) =>+ eb.or([+ eb("trackedEntityStatus", "is", null),+ eb("trackedEntityStatus", "!=", "Rejected")+ ])+ )+ .groupBy(["itemId", "storageUnitId", "trackedEntityId"])+ .execute();++ const onHandByBucket = new Map(+ onHandRows.map((r) => [+ bucketKey(r.itemId, r.storageUnitId, r.trackedEntityId),+ Number(r.quantity ?? 0)+ ])+ );++ const now = new Date().toISOString();+ for (const line of lines) {+ await trx+ .updateTable("inventoryCountLine")+ .set({+ systemQuantity:+ onHandByBucket.get(+ bucketKey(line.itemId, line.storageUnitId, line.trackedEntityId)+ ) ?? 0,+ updatedBy,+ updatedAt: now+ })+ .where("id", "=", line.id)+ .where("companyId", "=", companyId)+ .execute();+ }++ await trx+ .updateTable("inventoryCount")+ .set({ snapshotAt: now, updatedBy, updatedAt: now })+ .where("id", "=", inventoryCountId)+ .where("companyId", "=", companyId)+ .execute();++ return lines.length;+}++// Rectify a posted count in one transaction: lock the row, verify it is still+// Posted, re-baseline the lines, and flip it back to Draft — all-or-nothing.+// This closes the race the previous two-step route left open (a count could be+// re-snapshotted while remaining Posted if the second write failed or a+// concurrent request slipped in between). Throws on rollback; the route maps it+// to a flash. Kysely bypasses RLS — authorize at the route first.+export async function rectifyInventoryCount(+ db: Kysely<KyselyDatabase>,+ args: ResnapshotInventoryCountArgs+) {+ const { inventoryCountId, companyId, updatedBy } = args;+ return db.transaction().execute(async (trx) => {+ const locked = await trx+ .selectFrom("inventoryCount")+ .select(["id", "status"])+ .where("id", "=", inventoryCountId)+ .where("companyId", "=", companyId)+ .forUpdate()+ .executeTakeFirst();++ if (!locked) throw new Error("Inventory count not found");+ if (locked.status !== "Posted") {+ throw new Error("Only a posted count can be rectified");+ }++ await resnapshotInventoryCountLinesInTrx(trx, args);++ await trx+ .updateTable("inventoryCount")+ .set({ status: "Draft", updatedBy, updatedAt: new Date().toISOString() })+ .where("id", "=", inventoryCountId)+ .where("companyId", "=", companyId)+ .where("status", "=", "Posted")+ .execute();+ });+}+// Persist a single line's counted quantity. Uses Kysely so the Draft-only guard// is part of the same statement: the EXISTS subquery checks the parent count is// still Draft *atomically* with the write, closing the TOCTOU window a separate@@ -2067,6 +2258,8 @@ export async function updateInventoryCountLine("inventoryCountLine.inventoryCountId").where("inventoryCount.companyId", "=", companyId)+ // Counted quantities are entered while the count is Draft; once it+ // moves on (Pending/Posted) the lines are no longer writable..where("inventoryCount.status", "=", "Draft")))diff --git a/apps/erp/app/modules/inventory/ui/Inventory/InventoryStorageUnits.tsx b/apps/erp/app/modules/inventory/ui/Inventory/InventoryStorageUnits.tsxindex 17cfb3867c..5752409f78 100644--- a/apps/erp/app/modules/inventory/ui/Inventory/InventoryStorageUnits.tsx+++ b/apps/erp/app/modules/inventory/ui/Inventory/InventoryStorageUnits.tsx@@ -380,6 +380,10 @@ const InventoryStorageUnits = ({<ModalBody><Hidden name="itemId" />{isEditing && <Hidden name="originalStorageUnitId" />}+ <Hidden+ name="requiresSerialTracking"+ value={isSerial ? "true" : "false"}+ /><VStack spacing={2}><Location name="locationId" label={t`Location`} isReadOnly />diff --git a/apps/erp/app/modules/inventory/ui/InventoryCount/InventoryCount.tsx b/apps/erp/app/modules/inventory/ui/InventoryCount/InventoryCount.tsxindex bcd818741e..d535624495 100644--- a/apps/erp/app/modules/inventory/ui/InventoryCount/InventoryCount.tsx+++ b/apps/erp/app/modules/inventory/ui/InventoryCount/InventoryCount.tsx@@ -7,15 +7,25 @@ import {ModalContent,ModalHeader,ModalTitle,+ toast,useDisclosure} from "@carbon/react";import { useLingui } from "@lingui/react/macro";-import { LuCheck, LuInfo, LuRotateCcw, LuSend } from "react-icons/lu";+import { useEffect } from "react";+import {+ LuCheck,+ LuHistory,+ LuInfo,+ LuRotateCcw,+ LuSend,+ LuWrench+} from "react-icons/lu";import { useFetcher, useRevalidator } from "react-router";import { usePermissions } from "~/hooks";import type {InventoryCountLine,- InventoryCount as InventoryCountType+ InventoryCount as InventoryCountType,+ StockMovement} from "~/modules/inventory";import {InventoryCountConfirmModal,@@ -23,19 +33,23 @@ import {InventoryCountStatus} from "~/modules/inventory";import { path } from "~/utils/path";+import InventoryCountHistory from "./InventoryCountHistory";type InventoryCountDetailsProps = {inventoryCount: InventoryCountType;lines: InventoryCountLine[];count: number;summary: { uncounted: number; variances: number };+ // Ledger adjustments this count has posted (empty for a never-posted Draft).+ movements: StockMovement[];};const InventoryCountDetails = ({inventoryCount,lines,count,- summary+ summary,+ movements}: InventoryCountDetailsProps) => {const { t } = useLingui();const permissions = usePermissions();@@ -43,12 +57,38 @@ const InventoryCountDetails = ({const confirmModal = useDisclosure();const notesModal = useDisclosure();+ const historyModal = useDisclosure();const revalidator = useRevalidator();const reopenFetcher = useFetcher();- const postFetcher = useFetcher();+ const postFetcher = useFetcher<{+ success: boolean;+ message: string;+ invalidLineIds?: string[];+ }>();+ const rectifyFetcher = useFetcher();++ // Rows the last post attempt rejected (an invalid serial quantity) —+ // highlighted red until the user fixes them and re-posts.+ const invalidLineIds = postFetcher.data?.invalidLineIds;++ // Post submits via a fetcher, so its action returns a validation failure (e.g.+ // a serial line counted > 1) as data rather than a flash toast — surface it+ // here. The fetcher still revalidates, so the count re-renders in place.+ // Success redirects and flashes normally.+ useEffect(() => {+ if (postFetcher.data && postFetcher.data.success === false) {+ toast.error(postFetcher.data.message);+ }+ }, [postFetcher.data]);const status = inventoryCount.status;+ // Counted quantities are entered while Draft; every later state is read-only.const isReadOnly = status !== "Draft";+ // Blind counting withholds System Qty + Variance until the count is Posted, so+ // the counter never sees the expected figure while it can still influence the+ // result. Mirrors the server-side strip in the loader; kept separate from the+ // edit gate (blind spans Draft + Pending, editing is Draft-only).+ const hideSystemQuantity = inventoryCount.isBlind && status !== "Posted";// Actions live in the table header (the `primaryAction` slot) instead of a// dedicated detail header. Notes are surfaced via an info icon → modal.@@ -62,6 +102,15 @@ const InventoryCountDetails = ({onClick={notesModal.onOpen}/>)}+ {movements.length > 0 && (+ <Button+ variant="secondary"+ leftIcon={<LuHistory />}+ onClick={historyModal.onOpen}+ >+ {t`History`}+ </Button>+ )}{status === "Draft" && (<ButtonisDisabled={!canUpdate}@@ -107,6 +156,22 @@ const InventoryCountDetails = ({</postFetcher.Form></>)}+ {status === "Posted" && (+ <rectifyFetcher.Form+ method="post"+ action={path.to.inventoryCountRectify(inventoryCount.id!)}+ >+ <Button+ type="submit"+ variant="secondary"+ isDisabled={!canUpdate}+ isLoading={rectifyFetcher.state !== "idle"}+ leftIcon={<LuWrench />}+ >+ {t`Rectify`}+ </Button>+ </rectifyFetcher.Form>+ )}</HStack>);@@ -116,12 +181,13 @@ const InventoryCountDetails = ({<InventoryCountLineslines={lines}count={count}- isBlind={inventoryCount.isBlind}+ hideSystemQuantity={hideSystemQuantity}isReadOnly={isReadOnly}locationId={inventoryCount.locationId}title={inventoryCount.inventoryCountId}titleBadge={<InventoryCountStatus status={status} />}primaryAction={actions}+ invalidLineIds={invalidLineIds}/></div>@@ -134,6 +200,13 @@ const InventoryCountDetails = ({/>)}+ {historyModal.isOpen && (+ <InventoryCountHistory+ movements={movements}+ onClose={historyModal.onClose}+ />+ )}+<Modalopen={notesModal.isOpen}onOpenChange={(open) => {diff --git a/apps/erp/app/modules/inventory/ui/InventoryCount/InventoryCountConfirmModal.tsx b/apps/erp/app/modules/inventory/ui/InventoryCount/InventoryCountConfirmModal.tsxindex 3ce99df58c..5da0bf9df9 100644--- a/apps/erp/app/modules/inventory/ui/InventoryCount/InventoryCountConfirmModal.tsx+++ b/apps/erp/app/modules/inventory/ui/InventoryCount/InventoryCountConfirmModal.tsx@@ -25,9 +25,9 @@ type InventoryCountConfirmModalProps = {};// Confirm (Draft -> Pending). Surfaces the row-level checks the user must-// acknowledge before the count is locked: uncounted rows (skipped at post) and-// non-zero variances. Counts are computed server-side so they reflect the whole-// count, not just the loaded page.+// acknowledge before posting: uncounted rows (skipped at post) and non-zero+// variances. Counts are computed server-side so they reflect the whole count,+// not just the loaded page.const InventoryCountConfirmModal = ({inventoryCountId,summary,@@ -67,8 +67,8 @@ const InventoryCountConfirmModal = ({<VStack spacing={4}><p className="text-sm text-muted-foreground"><Trans>- Confirming locks the counted quantities. Review the warnings- below, then post the count to apply the adjustments.+ Review the warnings below, then post the count to apply the+ adjustments.</Trans></p>diff --git a/apps/erp/app/modules/inventory/ui/InventoryCount/InventoryCountHistory.tsx b/apps/erp/app/modules/inventory/ui/InventoryCount/InventoryCountHistory.tsxnew file mode 100644index 0000000000..04f23d03e9--- /dev/null+++ b/apps/erp/app/modules/inventory/ui/InventoryCount/InventoryCountHistory.tsx@@ -0,0 +1,202 @@+import {+ Badge,+ Drawer,+ DrawerBody,+ DrawerContent,+ DrawerDescription,+ DrawerHeader,+ DrawerTitle,+ HStack,+ VStack+} from "@carbon/react";+import { useLingui } from "@lingui/react/macro";+import { useMemo } from "react";+import { LuMoveDown, LuMoveUp, LuPencil, LuPlus } from "react-icons/lu";+import { EmployeeAvatar, Hyperlink } from "~/components";+import { Enumerable } from "~/components/Enumerable";+import { useDateFormatter } from "~/hooks";+import { path } from "~/utils/path";+import type { StockMovement } from "../../types";++type InventoryCountHistoryProps = {+ movements: StockMovement[];+ onClose: () => void;+};++// One posting round. Every ledger row written by a single post shares the same+// `createdAt` (Postgres `now()` = transaction_timestamp, constant per txn), so a+// distinct `createdAt` is exactly one post — the original count or a later+// rectification.+type Version = {+ createdAt: string;+ createdBy: string | null;+ movements: StockMovement[];+ isRectification: boolean;+};++// Deep-link to the item's Activity panel with this exact ledger row flashed.+function movementActivityPath(m: StockMovement) {+ const params = new URLSearchParams();+ if (m.itemReadableId) params.set("search", m.itemReadableId);+ if (m.locationId) params.set("location", m.locationId);+ params.set("highlight", m.id ?? "");+ return `${path.to.inventoryItemActivity(m.itemId ?? "")}?${params.toString()}`;+}++// Signed quantity with a direction arrow (NUMERIC arrives as a string).+const QuantityDelta = ({ value }: { value: number | string | null }) => {+ const n = value == null ? 0 : Number(value);+ return (+ <HStack spacing={1} className="font-medium tabular-nums">+ {n >= 0 ? (+ <LuMoveUp className="text-success text-base" />+ ) : (+ <LuMoveDown className="text-red-500 text-base" />+ )}+ <span>{Math.abs(n)}</span>+ </HStack>+ );+};++// Group movements into posting rounds and order them newest-first. The earliest+// round is the original count; every later round is a rectification (it also+// carries `correctionOfItemLedgerId` links back to the rows it fixes).+function toVersions(movements: StockMovement[]): Version[] {+ const byCreatedAt = new Map<string, StockMovement[]>();+ for (const m of movements) {+ const key = m.createdAt ?? "";+ const bucket = byCreatedAt.get(key);+ if (bucket) bucket.push(m);+ else byCreatedAt.set(key, [m]);+ }++ return [...byCreatedAt.entries()]+ .sort(([a], [b]) => a.localeCompare(b))+ .map(([createdAt, rows], index) => ({+ createdAt,+ createdBy: rows[0]?.createdBy ?? null,+ movements: rows,+ // First round = original post; anything after is a rectification.+ isRectification: index > 0+ }))+ .reverse();+}++const InventoryCountHistory = ({+ movements,+ onClose+}: InventoryCountHistoryProps) => {+ const { t } = useLingui();+ const { formatDateTime } = useDateFormatter();++ const versions = useMemo(() => toVersions(movements), [movements]);+ const rectifications = versions.filter((v) => v.isRectification).length;++ return (+ <Drawer+ open+ onOpenChange={(open) => {+ if (!open) onClose();+ }}+ >+ <DrawerContent+ size="xl"+ position="right"+ className="w-max lg:w-max max-w-max min-w-0"+ >+ <DrawerHeader>+ <DrawerTitle>{t`Count History`}</DrawerTitle>+ <DrawerDescription>+ {rectifications === 0+ ? t`Posted once, no rectifications.`+ : rectifications === 1+ ? t`Posted once, rectified 1 time.`+ : t`Posted once, rectified ${rectifications} times.`}+ </DrawerDescription>+ </DrawerHeader>+ <DrawerBody>+ <div className="w-full space-y-6">+ {versions.map((version, index) => {+ // versions are newest-first; the rectification number counts up+ // from the oldest, so derive it from the tail distance.+ const rectifyNumber = versions.length - 1 - index;+ return (+ <div key={version.createdAt} className="relative w-full">+ {/* timeline rail */}+ {index < versions.length - 1 && (+ <span className="absolute left-4 top-9 bottom-[-1.5rem] w-px bg-border" />+ )}++ <HStack spacing={3} className="mb-3 items-start">+ <div+ className={+ version.isRectification+ ? "z-10 flex size-8 items-center justify-center rounded-full bg-yellow-100 text-yellow-700 dark:bg-yellow-500/15 dark:text-yellow-500"+ : "z-10 flex size-8 items-center justify-center rounded-full bg-emerald-100 text-emerald-700 dark:bg-emerald-500/15 dark:text-emerald-500"+ }+ >+ {version.isRectification ? (+ <LuPencil className="size-4" />+ ) : (+ <LuPlus className="size-4" />+ )}+ </div>+ <VStack spacing={0} className="min-w-0 flex-1">+ <HStack className="justify-between">+ <HStack spacing={2}>+ <span className="font-semibold text-sm">+ {version.isRectification+ ? t`Rectification ${rectifyNumber}`+ : t`Original Count`}+ </span>+ {version.isRectification && (+ <Badge variant="yellow">{t`Correction`}</Badge>+ )}+ </HStack>+ <span className="whitespace-nowrap text-muted-foreground text-xs tabular-nums">+ {formatDateTime(version.createdAt)}+ </span>+ </HStack>+ <EmployeeAvatar employeeId={version.createdBy} />+ </VStack>+ </HStack>++ <div className="ml-11 rounded-xl border border-border divide-y divide-border">+ {version.movements.map((m) => (+ <div+ key={m.id}+ className="grid grid-cols-[minmax(0,1fr)_auto_auto] items-center gap-4 px-4 py-2.5"+ >+ <VStack spacing={0} className="min-w-0">+ <Hyperlink to={movementActivityPath(m)}>+ {m.itemReadableId}+ </Hyperlink>+ {m.itemDescription && (+ <span className="truncate text-muted-foreground text-xs">+ {m.itemDescription}+ </span>+ )}+ </VStack>+ <HStack spacing={3} className="shrink-0">+ <Enumerable value={m.entryType} />+ <span className="whitespace-nowrap text-muted-foreground text-xs">+ {m.storageUnitName ?? "—"}+ </span>+ </HStack>+ <div className="justify-self-end">+ <QuantityDelta value={m.quantity} />+ </div>+ </div>+ ))}+ </div>+ </div>+ );+ })}+ </div>+ </DrawerBody>+ </DrawerContent>+ </Drawer>+ );+};++export default InventoryCountHistory;diff --git a/apps/erp/app/modules/inventory/ui/InventoryCount/InventoryCountLines.tsx b/apps/erp/app/modules/inventory/ui/InventoryCount/InventoryCountLines.tsxindex 6cad248dba..699c110a79 100644--- a/apps/erp/app/modules/inventory/ui/InventoryCount/InventoryCountLines.tsx+++ b/apps/erp/app/modules/inventory/ui/InventoryCount/InventoryCountLines.tsx@@ -14,26 +14,37 @@ import { path } from "~/utils/path";type InventoryCountLinesProps = {lines: InventoryCountLine[];count: number;- isBlind: boolean;+ // Blind counting withholds System Qty + Variance until Posted; the caller+ // decides when — kept separate from the read-only (Draft) edit gate.+ hideSystemQuantity: boolean;isReadOnly: boolean;locationId: string;title?: string;titleBadge?: ReactNode;primaryAction?: ReactNode;+ // Line ids the last post attempt rejected (snapshot drift or invalid serial+ // quantity) — highlighted red until fixed.+ invalidLineIds?: string[];};const InventoryCountLines = ({lines,count,- isBlind,+ hideSystemQuantity,isReadOnly,locationId,title,titleBadge,- primaryAction+ primaryAction,+ invalidLineIds}: InventoryCountLinesProps) => {const { t } = useLingui();+ const invalidLineIdSet = useMemo(+ () => new Set(invalidLineIds ?? []),+ [invalidLineIds]+ );+// Build the inventory query filter: scope to this count's location and search// the quantities page for the item's readable id.const buildItemLink = useCallback((itemId: string, readableId?: string) => {@@ -42,9 +53,7 @@ const InventoryCountLines = ({return `${path.to.inventoryItem(itemId)}?${next.toString()}`;}, []);- // Blind mode hides System Qty + Variance while the count is editable; the- // figures reappear once the document is locked (Pending/Posted).- const hideSystem = isBlind && !isReadOnly;+ const hideSystem = hideSystemQuantity;const storageUnits = useStorageUnits(locationId);// The options resolve asynchronously; until they do, render a loading@@ -198,7 +207,16 @@ const InventoryCountLines = ({() => ({countedQuantity: EditableNumber<InventoryCountLine>(onCellEdit,- { minValue: 0 },+ // Serial-tracked lines are a single unique unit — cap the counted+ // quantity at 1 (per row, since tracking type varies by line).+ (row) => ({+ minValue: 0,+ maxValue:+ (row as { item?: { itemTrackingType?: string } }).item+ ?.itemTrackingType === "Serial"+ ? 1+ : undefined+ }),{ clearable: true })}),@@ -212,10 +230,17 @@ const InventoryCountLines = ({data={lines}count={count}editableComponents={editableComponents}+ getRowClassName={(row) =>+ invalidLineIdSet.has(row.id ?? "")+ ? "bg-destructive/30 hover:bg-destructive/40"+ : undefined+ }primaryAction={primaryAction}title={title ?? t`Lines`}titleBadge={titleBadge}withInlineEditing={!isReadOnly}+ // Draft counts are inherently editable — no Edit/Lock toggle, always on.+ forceEditMode={!isReadOnly}/>);};diff --git a/apps/erp/app/modules/inventory/ui/StockMovements/StockMovementsTable.tsx b/apps/erp/app/modules/inventory/ui/StockMovements/StockMovementsTable.tsxindex 048198c96f..b1983730cd 100644--- a/apps/erp/app/modules/inventory/ui/StockMovements/StockMovementsTable.tsx+++ b/apps/erp/app/modules/inventory/ui/StockMovements/StockMovementsTable.tsx@@ -1,11 +1,12 @@-import { HStack, VStack } from "@carbon/react";+import { Badge, HStack, VStack } from "@carbon/react";import { useLingui } from "@lingui/react/macro";import type { ColumnDef } from "@tanstack/react-table";-import { memo, useMemo } from "react";+import { memo, useCallback, useMemo } from "react";import {LuArrowRightLeft,LuBlocks,LuCalendar,+ LuCornerDownRight,LuFileText,LuHash,LuMapPin,@@ -13,7 +14,8 @@ import {LuMoveUp,LuQrCode,LuUser,- LuWarehouse+ LuWarehouse,+ LuWrench} from "react-icons/lu";import { Link } from "react-router";import { EmployeeAvatar, Hyperlink, ItemThumbnail, Table } from "~/components";@@ -110,33 +112,34 @@ const StockMovementsTable = memo(icon: <LuFileText />}},+ {+ accessorKey: "isCorrection",+ header: t`Correction`,+ cell: ({ row }) =>+ isCorrectionRow(row.original) ? (+ <Badge variant="yellow">{t`Correction`}</Badge>+ ) : (+ ""+ ),+ meta: {+ filter: {+ type: "static",+ options: [+ { value: "true", label: t`Correction` },+ { value: "false", label: t`Original` }+ ]+ },+ pluralHeader: t`Corrections`,+ icon: <LuWrench />,+ // Export the corrected movement's id so the CSV keeps the linkage.+ exportValue: (row: StockMovement) =>+ row.correctionOfItemLedgerId ?? ""+ }+ },{accessorKey: "quantity",header: t`Quantity`,- cell: ({ row }) => {- const value = row.original.quantity;- if (!value)- return (- <HStack- spacing={1}- className="font-medium text-muted-foreground"- >- <LuMoveUp className="invisible text-lg" />- <span>{value}</span>- </HStack>- );- const isPositive = value > 0;- return (- <HStack spacing={1} className="font-medium">- {isPositive ? (- <LuMoveUp className="text-success text-lg" />- ) : (- <LuMoveDown className="text-destructive text-lg" />- )}- <span>{Math.abs(value)}</span>- </HStack>- );- },+ cell: ({ row }) => <QuantityDelta value={row.original.quantity} />,meta: {icon: <LuHash />}@@ -230,14 +233,111 @@ const StockMovementsTable = memo(];}, [people, locations, locationsById, t, formatDate]);+ // Group corrections under the movement they fix. Corrections whose original+ // is on this page are hidden from the flat list and revealed by expanding the+ // original (chevron), like the accounting/audit-log expandable rows. A+ // correction whose original isn't on the page stays inline (still badged).+ const { displayData, correctionsByOriginal } = useMemo(() => {+ const byId = new Map(data.map((m) => [m.id, m]));++ // Walk a correction up its `correctionOfItemLedgerId` chain to the topmost+ // ancestor present on this page. Corrections can chain (a rectification of+ // a rectification links to the prior correction, not the original), so we+ // must resolve to the ULTIMATE root — otherwise a grandchild correction+ // would be hidden but never re-shown under any visible row.+ const rootOf = (m: StockMovement) => {+ let cur = m;+ const seen = new Set<string>();+ while (+ cur.correctionOfItemLedgerId &&+ byId.has(cur.correctionOfItemLedgerId) &&+ cur.id &&+ !seen.has(cur.id)+ ) {+ seen.add(cur.id);+ cur = byId.get(cur.correctionOfItemLedgerId) as StockMovement;+ }+ return cur;+ };++ const byOriginal = new Map<string, StockMovement[]>();+ const nestedIds = new Set<string>();+ for (const m of data) {+ if (!m.correctionOfItemLedgerId) continue;+ const root = rootOf(m);+ // No on-page ancestor (root resolves back to itself) → leave inline.+ if (!root.id || root.id === m.id) continue;+ const list = byOriginal.get(root.id) ?? [];+ list.push(m);+ byOriginal.set(root.id, list);+ if (m.id) nestedIds.add(m.id);+ }+ // Order each group oldest-first so a chain reads original → fix → fix.+ for (const list of byOriginal.values()) {+ list.sort((a, b) => (a.entryNumber ?? 0) - (b.entryNumber ?? 0));+ }+ return {+ correctionsByOriginal: byOriginal,+ displayData:+ nestedIds.size === 0+ ? data+ : data.filter((m) => !(m.id && nestedIds.has(m.id)))+ };+ }, [data]);++ const canExpandRow = useCallback(+ (row: StockMovement) => !!row.id && correctionsByOriginal.has(row.id),+ [correctionsByOriginal]+ );++ const renderExpandedRow = useCallback(+ (row: StockMovement) => {+ const corrections = row.id+ ? correctionsByOriginal.get(row.id)+ : undefined;+ if (!corrections?.length) return null;+ return (+ <div className="pl-[52px] pr-4">+ {corrections.map((c) => (+ <div+ key={c.id}+ className="grid grid-cols-[16px_minmax(0,1fr)_auto] items-center gap-x-3 py-2 text-sm"+ >+ <LuCornerDownRight className="size-3.5 shrink-0 text-muted-foreground" />+ <div className="flex min-w-0 items-center gap-2.5">+ <Badge variant="yellow" className="shrink-0">+ {t`Correction`}+ </Badge>+ <Enumerable value={c.entryType} />+ <QuantityDelta value={c.quantity} />+ <span className="truncate text-muted-foreground">+ {c.storageUnitName ?? c.locationName ?? "—"}+ </span>+ </div>+ <div className="flex shrink-0 items-center gap-2 text-muted-foreground">+ <span className="tabular-nums text-xs">+ {formatDate(c.postingDate)}+ </span>+ <EmployeeAvatar employeeId={c.createdBy} />+ </div>+ </div>+ ))}+ </div>+ );+ },+ [correctionsByOriginal, formatDate, t]+ );+return (<Table<(typeof data)[number]>- data={data}+ data={displayData}columns={columns}count={count}defaultColumnPinning={{left: ["itemReadableId"]}}+ renderExpandedRow={renderExpandedRow}+ canExpandRow={canExpandRow}title={t`Stock Movements`}table="itemLedger"withSavedView@@ -249,6 +349,38 @@ const StockMovementsTable = memo(StockMovementsTable.displayName = "StockMovementsTable";export default StockMovementsTable;+// A movement is a correction when it points back at the movement it fixes.+// Prefer the view's computed `isCorrection` flag; fall back to the raw link.+function isCorrectionRow(movement: StockMovement) {+ return (+ (movement as { isCorrection?: boolean }).isCorrection ??+ movement.correctionOfItemLedgerId != null+ );+}++// Signed quantity with a direction arrow (NUMERIC arrives as a string).+function QuantityDelta({ value }: { value: number | string | null }) {+ const n = value == null ? 0 : Number(value);+ if (!n) {+ return (+ <HStack spacing={1} className="font-medium text-muted-foreground">+ <LuMoveUp className="invisible text-lg" />+ <span className="tabular-nums">{n}</span>+ </HStack>+ );+ }+ return (+ <HStack spacing={1} className="font-medium">+ {n > 0 ? (+ <LuMoveUp className="text-success text-lg" />+ ) : (+ <LuMoveDown className="text-destructive text-lg" />+ )}+ <span className="tabular-nums">{Math.abs(n)}</span>+ </HStack>+ );+}+// Opens the item's side panel on the Activity tab inside the Inventory// (Quantities) layout:// - `search` filters the list behind it to this item (readableIdWithRevision)diff --git a/apps/erp/app/modules/settings/ui/AuditLog/AuditLogTable.tsx b/apps/erp/app/modules/settings/ui/AuditLog/AuditLogTable.tsxindex c965e837eb..dcf393d6ce 100644--- a/apps/erp/app/modules/settings/ui/AuditLog/AuditLogTable.tsx+++ b/apps/erp/app/modules/settings/ui/AuditLog/AuditLogTable.tsx@@ -68,6 +68,7 @@ function getEntityPath(entityId: string): string | null {nc: path.to.issue,sh: path.to.shipment,rec: path.to.receipt,+ ic: path.to.inventoryCount,g: path.to.gauge,sq: path.to.supplierQuote,wc: path.to.workCenter,diff --git a/apps/erp/app/routes/api+/mcp+/lib/tool-metadata.json b/apps/erp/app/routes/api+/mcp+/lib/tool-metadata.jsonindex dd27c0872d..9447a7d6e7 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-07-13T00:26:41.147Z",- "totalTools": 1325,+ "generated": "2026-07-13T13:11:38.566Z",+ "totalTools": 1327,"modules": 15,"tools": [{@@ -5976,10 +5976,10 @@"module": "inventory","classification": "WRITE","description": "insert manual inventory adjustment",- "paramCount": 10,+ "paramCount": 1,"serviceParams": ["client",- "inventoryAdjustment"+ "// `requiresSerialTracking` is a form-only flag for the validator's serial\n // quantity guard — the route strips it before calling this.\n inventoryAdjustment"],"injectAuth": ["companyId",@@ -5988,45 +5988,10 @@"schema": {"type": "object","properties": {- "itemId": {- "type": "string"- },- "locationId": {- "type": "string"- },- "storageUnitId": {- "type": "string"- },- "originalStorageUnitId": {- "type": "string"- },- "adjustmentType": {- "type": "string",- "enum": [- "...itemLedgerTypes",- "Set Quantity"- ]- },- "quantity": {- "type": "number"- },- "trackedEntityId": {- "type": "string"- },- "readableId": {- "type": "string"- },- "expirationDate": {- "type": "string"- },- "comment": {- "type": "string"- }+ "// `requiresSerialTracking` is a form-only flag for the validator's serial\n // quantity guard — the route strips it before calling this.\n inventoryAdjustment": {}},"required": [- "itemId",- "locationId",- "adjustmentType"+ "// `requiresSerialTracking` is a form-only flag for the validator's serial\n // quantity guard — the route strips it before calling this.\n inventoryAdjustment"]}},@@ -6168,6 +6133,32 @@]}},+ {+ "name": "inventory_getInventoryCountMovements",+ "module": "inventory",+ "classification": "READ",+ "description": "get inventory count movements",+ "paramCount": 1,+ "serviceParams": [+ "client",+ "companyId",+ "inventoryCountId"+ ],+ "injectAuth": [+ "companyId"+ ],+ "schema": {+ "type": "object",+ "properties": {+ "inventoryCountId": {+ "type": "string"+ }+ },+ "required": [+ "inventoryCountId"+ ]+ }+ },{"name": "inventory_insertInventoryCount","module": "inventory",@@ -6277,6 +6268,29 @@]}},+ {+ "name": "inventory_rectifyInventoryCount",+ "module": "inventory",+ "classification": "WRITE",+ "description": "rectify inventory count",+ "paramCount": 1,+ "serviceParams": [+ "db",+ "args"+ ],+ "injectAuth": [+ "companyId"+ ],+ "schema": {+ "type": "object",+ "properties": {+ "args": {}+ },+ "required": [+ "args"+ ]+ }+ },{"name": "inventory_updateInventoryCountLine","module": "inventory",@@ -6665,7 +6679,7 @@"module": "inventory","classification": "WRITE","description": "upsert stock transfer line",- "paramCount": 8,+ "paramCount": 1,"serviceParams": ["client","stockTransferLine"@@ -6678,34 +6692,10 @@"schema": {"type": "object","properties": {- "id": {- "type": "string"- },- "stockTransferId": {- "type": "string"- },- "itemId": {- "type": "string"- },- "fromStorageUnitId": {- "type": "string"- },- "toStorageUnitId": {- "type": "string"- },- "quantity": {- "type": "number"- },- "pickedQuantity": {- "type": "number"- },- "requiresBatchTracking": {- "type": "string"- }+ "stockTransferLine": {}},"required": [- "stockTransferId",- "itemId"+ "stockTransferLine"]}},diff --git a/apps/erp/app/routes/x+/inventory+/quantities+/$itemId.adjustment.tsx b/apps/erp/app/routes/x+/inventory+/quantities+/$itemId.adjustment.tsxindex 909d90b1e8..76590d02ce 100644--- a/apps/erp/app/routes/x+/inventory+/quantities+/$itemId.adjustment.tsx+++ b/apps/erp/app/routes/x+/inventory+/quantities+/$itemId.adjustment.tsx@@ -32,7 +32,10 @@ export async function action({ request, params }: ActionFunctionArgs) {if (validation.error) {return validationError(validation.error);}- const { ...d } = validation.data;+ // `requiresSerialTracking` is a form-only flag for the serial quantity guard —+ // strip it before the service call (not an `insertManualInventoryAdjustment` arg).+ const { requiresSerialTracking: _requiresSerialTracking, ...d } =+ validation.data;const acknowledged = formData.get("acknowledged") === "true";// Business rule evaluation. Item rules fire on the `inventoryAdjustment`@@ -109,7 +112,10 @@ export async function action({ request, params }: ActionFunctionArgs) {? "Insufficient quantity for negative adjustment": itemLedger.error === "Serial number not found"? "Serial number not found"- : "Failed to create manual inventory adjustment";+ : itemLedger.error ===+ "Multiple tracked entities in this storage unit — select a specific row to adjust"+ ? "Multiple tracked entities in this storage unit — select a specific row to adjust"+ : "Failed to create manual inventory adjustment";return {error: { message },diff --git a/apps/erp/app/routes/x+/inventory-count+/$id.confirm.tsx b/apps/erp/app/routes/x+/inventory-count+/$id.confirm.tsxindex 7ddba38454..e2f44aae54 100644--- a/apps/erp/app/routes/x+/inventory-count+/$id.confirm.tsx+++ b/apps/erp/app/routes/x+/inventory-count+/$id.confirm.tsx@@ -9,7 +9,7 @@ import {} from "~/modules/inventory";import { path } from "~/utils/path";-// Confirm (Draft -> Pending): locks the counted quantities for review. The+// Confirm (Draft -> Pending): moves the count out of entry into review. The// acknowledgement of row-level warnings happens in the confirm dialog.export async function action({ request, params }: ActionFunctionArgs) {assertIsPost(request);diff --git a/apps/erp/app/routes/x+/inventory-count+/$id.post.tsx b/apps/erp/app/routes/x+/inventory-count+/$id.post.tsxindex 09db8c3437..407f809e8d 100644--- a/apps/erp/app/routes/x+/inventory-count+/$id.post.tsx+++ b/apps/erp/app/routes/x+/inventory-count+/$id.post.tsx@@ -1,10 +1,11 @@-import { assertIsPost, error, success } from "@carbon/auth";+import { assertIsPost, success } from "@carbon/auth";import { requirePermissions } from "@carbon/auth/auth.server";import { getCarbonServiceRole } from "@carbon/auth/client.server";import { flash } from "@carbon/auth/session.server";import type { ActionFunctionArgs } from "react-router";-import { redirect } from "react-router";+import { data, redirect } from "react-router";import { getInventoryCount } from "~/modules/inventory";+import { getEdgeFunctionErrorBody } from "~/utils/error";import { path } from "~/utils/path";// Post (Pending -> Posted): atomically posts the variance as inventory@@ -20,12 +21,13 @@ export async function action({ request, params }: ActionFunctionArgs) {const header = await getInventoryCount(client, id, companyId);if (header.data?.status !== "Pending") {- throw redirect(- path.to.inventoryCount(id),- await flash(- request,- error(null, "Only a confirmed (pending) count can be made effective")- )+ // Fetcher submit — return data so the component toasts it (see below).+ return data(+ {+ success: false,+ message: "Only a confirmed (pending) count can be made effective"+ },+ { status: 400 });}@@ -35,10 +37,21 @@ export async function action({ request, params }: ActionFunctionArgs) {});if (post.error) {- throw redirect(- path.to.inventoryCount(id),- await flash(request, error(post.error, "Failed to post inventory count"))- );+ // The Post button submits via a fetcher, so a redirect+flash toast is not+ // reliably surfaced. Return the error as fetcher data (with the real message+ // and, for line-level validation errors like snapshot drift or serial-qty,+ // the `invalidLineIds`) so the component can toast it and highlight the+ // offending rows; the fetcher still revalidates, so the count stays Pending+ // and re-renders.+ const body = await getEdgeFunctionErrorBody(post.error);+ const message =+ typeof body?.message === "string"+ ? body.message+ : "Failed to post inventory count";+ const invalidLineIds = Array.isArray(body?.invalidLineIds)+ ? (body.invalidLineIds as string[])+ : undefined;+ return data({ success: false, message, invalidLineIds }, { status: 400 });}throw redirect(diff --git a/apps/erp/app/routes/x+/inventory-count+/$id.rectify.tsx b/apps/erp/app/routes/x+/inventory-count+/$id.rectify.tsxnew file mode 100644index 0000000000..e97892fb75--- /dev/null+++ b/apps/erp/app/routes/x+/inventory-count+/$id.rectify.tsx@@ -0,0 +1,60 @@+import { assertIsPost, error, success } from "@carbon/auth";+import { requirePermissions } from "@carbon/auth/auth.server";+import { flash } from "@carbon/auth/session.server";+import type { ActionFunctionArgs } from "react-router";+import { redirect } from "react-router";+import { getInventoryCount, rectifyInventoryCount } from "~/modules/inventory";+import { getDatabaseClient } from "~/services/database.server";+import { path } from "~/utils/path";++// Rectify (Posted -> Draft): reopen a posted count in place to fix wrong counted+// quantities, then re-post. `rectifyInventoryCount` does the whole thing in ONE+// transaction — lock the row, verify it is still Posted, re-baseline each line's+// system quantity to current live on-hand (so the reopened count starts+// drift-free and unchanged lines post nothing), and flip to Draft — so a failure+// or concurrent request can't leave it re-snapshotted-but-still-Posted.+// Re-posting later writes a new adjustment for each changed line, linked to its+// original movement (`itemLedger.correctionOfItemLedgerId`), so both stay visible+// in Stock Movements. The original posted movements are never mutated.+export async function action({ request, params }: ActionFunctionArgs) {+ assertIsPost(request);+ const { client, companyId, userId } = await requirePermissions(request, {+ update: "inventory"+ });++ const { id } = params;+ if (!id) throw new Error("Could not find id");++ const header = await getInventoryCount(client, id, companyId);+ if (!header.data) {+ throw redirect(+ path.to.inventoryCounts,+ await flash(+ request,+ error(header.error, "Failed to load inventory count")+ )+ );+ }++ try {+ await rectifyInventoryCount(getDatabaseClient(), {+ inventoryCountId: id,+ companyId,+ locationId: header.data.locationId,+ updatedBy: userId+ });+ } catch (err) {+ throw redirect(+ path.to.inventoryCount(id),+ await flash(+ request,+ error(err, "Failed to reopen count for rectification")+ )+ );+ }++ throw redirect(+ path.to.inventoryCount(id),+ await flash(request, success("Count reopened for rectification"))+ );+}diff --git a/apps/erp/app/routes/x+/inventory-count+/$id.reopen.tsx b/apps/erp/app/routes/x+/inventory-count+/$id.reopen.tsxindex c7ecebffc4..a48113be84 100644--- a/apps/erp/app/routes/x+/inventory-count+/$id.reopen.tsx+++ b/apps/erp/app/routes/x+/inventory-count+/$id.reopen.tsx@@ -9,7 +9,8 @@ import {} from "~/modules/inventory";import { path } from "~/utils/path";-// Reopen (Pending -> Draft): unlocks the count for further edits before posting.+// Reopen (Pending -> Draft): returns the count to entry so lines can be edited+// again before posting.export async function action({ request, params }: ActionFunctionArgs) {assertIsPost(request);const { client, companyId, userId } = await requirePermissions(request, {diff --git a/apps/erp/app/routes/x+/inventory-count+/$id.tsx b/apps/erp/app/routes/x+/inventory-count+/$id.tsxindex d439258b5e..5830d8a661 100644--- a/apps/erp/app/routes/x+/inventory-count+/$id.tsx+++ b/apps/erp/app/routes/x+/inventory-count+/$id.tsx@@ -8,6 +8,7 @@ import {getInventoryCount,getInventoryCountLineSummary,getInventoryCountLines,+ getInventoryCountMovements,InventoryCountDetails} from "~/modules/inventory";import type { Handle } from "~/utils/handle";@@ -44,7 +45,7 @@ export async function loader({ request, params }: LoaderFunctionArgs) {const { limit, offset, sorts, filters } =getGenericQueryFilters(searchParams);- const [lines, summary] = await Promise.all([+ const [lines, summary, movements] = await Promise.all([getInventoryCountLines(client, id, companyId, {search,limit,@@ -52,16 +53,19 @@ export async function loader({ request, params }: LoaderFunctionArgs) {sorts,filters}),- getInventoryCountLineSummary(client, id, companyId)+ getInventoryCountLineSummary(client, id, companyId),+ // Adjustments this count has posted (empty for a never-posted Draft).+ getInventoryCountMovements(client, companyId, id)]);// True blind counting: the system quantity (and the variance it can be derived- // from) must not reach the client while the count is still being entered- // (Draft). Hiding the columns client-side isn't enough — the values would ship- // in the loader payload and CSV export. Strip them server-side; they are- // revealed once the count is locked (Pending and later).+ // from) must not reach the client until the count is Posted, so the counter+ // never sees the expected figure while it can still influence the result.+ // Hiding the columns client-side isn't enough — the values would ship in the+ // loader payload and CSV export. Strip them server-side through Draft AND+ // Pending; they are revealed only once Posted.const isBlindEntry =- inventoryCount.data.isBlind && inventoryCount.data.status === "Draft";+ inventoryCount.data.isBlind && inventoryCount.data.status !== "Posted";const lineData = (lines.data ?? []).map((line) =>isBlindEntry? // Withhold System Qty (and the variance it can be derived from). Use null,@@ -75,12 +79,13 @@ export async function loader({ request, params }: LoaderFunctionArgs) {inventoryCount: inventoryCount.data,lines: lineData,count: lines.count ?? 0,- summary+ summary,+ movements: movements.data ?? []};}export default function InventoryCountDetailRoute() {- const { inventoryCount, lines, count, summary } =+ const { inventoryCount, lines, count, summary, movements } =useLoaderData<typeof loader>();return (@@ -91,6 +96,7 @@ export default function InventoryCountDetailRoute() {lines={lines}count={count}summary={summary}+ movements={movements}/></div><Outlet />diff --git a/apps/erp/app/utils/error.ts b/apps/erp/app/utils/error.tsindex 0e772945ee..a32e223a2a 100644--- a/apps/erp/app/utils/error.ts+++ b/apps/erp/app/utils/error.ts@@ -33,3 +33,26 @@ export async function getEdgeFunctionErrorMessage(}return fallback;}++/**+ * Parse the full JSON body of a `FunctionsHttpError` (the edge function's+ * `{ message, ...extra }` payload). Use when the edge function returns structured+ * data alongside the message — e.g. `invalidLineIds` for row highlighting.+ * Returns `null` when there is no readable JSON body.+ */+export async function getEdgeFunctionErrorBody(+ err: unknown+): Promise<Record<string, unknown> | null> {+ const ctx = (err as { context?: Response })?.context;+ if (ctx && typeof ctx.clone === "function") {+ try {+ const body = await ctx.clone().json();+ if (body && typeof body === "object") {+ return body as Record<string, unknown>;+ }+ } catch {+ // body wasn't JSON or already consumed+ }+ }+ return null;+}diff --git a/apps/erp/app/utils/path.ts b/apps/erp/app/utils/path.tsindex 4a91fc9f2b..6a36486002 100644--- a/apps/erp/app/utils/path.ts+++ b/apps/erp/app/utils/path.ts@@ -1681,6 +1681,8 @@ export const path = {generatePath(`${x}/inventory-count/${id}/reopen`),inventoryCountPost: (id: string) =>generatePath(`${x}/inventory-count/${id}/post`),+ inventoryCountRectify: (id: string) =>+ generatePath(`${x}/inventory-count/${id}/rectify`),inventoryCountDelete: (id: string) =>generatePath(`${x}/inventory-count/${id}/delete`),inventoryCountLineUpdate: `${x}/inventory-count/lines/update`,diff --git a/apps/mes/app/components/JobOperation/components/IssueMaterialModal.tsx b/apps/mes/app/components/JobOperation/components/IssueMaterialModal.tsxindex f6a67739c9..81904006e0 100644--- a/apps/mes/app/components/JobOperation/components/IssueMaterialModal.tsx+++ b/apps/mes/app/components/JobOperation/components/IssueMaterialModal.tsx@@ -331,16 +331,30 @@ export function IssueMaterialModal({}: undefined);+ // When a picking list HAS allocated this material, seed the exact lots it+ // picked (from pickingListLineTrackedEntity) rather than a fresh suggestion.+ const shouldLoadPickedAllocation =+ !!material?.id &&+ hasPickingAllocation &&+ (trackingType === "Batch" || trackingType === "Serial");+ const { data: pickedAllocation } = usePickedAllocation(+ shouldLoadPickedAllocation ? (material?.id ?? undefined) : undefined+ );+ // One source feeds the seeding + add-row logic below: the picked lots when a+ // picking list exists, otherwise the on-the-fly suggestion.+ const seedAllocation = hasPickingAllocation+ ? pickedAllocation+ : suggestedAllocation;const hasSeededSuggestionRef = useRef(false);useEffect(() => {if (hasSeededSuggestionRef.current) return;- if (!suggestedAllocation.length) return;+ if (!seedAllocation.length) return;if (trackingType === "Batch") {// Don't clobber a selection the operator already started if the (async)// suggestion arrives after they picked.if (selectedBatchNumbers.some((b) => b.id)) return;setSelectedBatchNumbers(- suggestedAllocation.map((lot, index) => ({+ seedAllocation.map((lot, index) => ({index,id: lot.trackedEntityId,quantity: lot.quantity@@ -352,8 +366,8 @@ export function IssueMaterialModal({if (selectedSerialNumbers.some((s) => s.id)) return;setSelectedSerialNumbers((prev) =>prev.map((row, i) =>- suggestedAllocation[i]- ? { ...row, id: suggestedAllocation[i].trackedEntityId }+ seedAllocation[i]+ ? { ...row, id: seedAllocation[i].trackedEntityId }: row));@@ -361,7 +375,7 @@ export function IssueMaterialModal({hasSeededSuggestionRef.current = true;}}, [- suggestedAllocation,+ seedAllocation,trackingType,selectedBatchNumbers,selectedSerialNumbers@@ -506,7 +520,7 @@ export function IssueMaterialModal({// consistent with the seeded ones; only fall back to the picker's default// FEFO/FIFO order once the suggestion is exhausted. Editable either way.const used = new Set(prev.map((s) => s.id).filter(Boolean));- const fromSuggestion = suggestedAllocation.find(+ const fromSuggestion = seedAllocation.find((lot) => !used.has(lot.trackedEntityId));const next = fromSuggestion@@ -514,7 +528,7 @@ export function IssueMaterialModal({: serialOptions.find((o) => !used.has(o.value) && !o.isExpired);return [...prev, { index: prev.length, id: next?.value ?? "" }];});- }, [serialOptions, suggestedAllocation]);+ }, [serialOptions, seedAllocation]);const removeSerialNumber = useCallback((indexToRemove: number) => {setSelectedSerialNumbers((prev) => {@@ -556,7 +570,7 @@ export function IssueMaterialModal({// seeded ones; fall back to the picker's default FEFO/FIFO order once the// suggestion is exhausted. Default qty is clamped to the lot's on-hand.const used = new Set(prev.map((b) => b.id).filter(Boolean));- const fromSuggestion = suggestedAllocation.find(+ const fromSuggestion = seedAllocation.find((lot) => !used.has(lot.trackedEntityId));const next = fromSuggestion@@ -571,7 +585,7 @@ export function IssueMaterialModal({}];});- }, [batchOptions, suggestedAllocation]);+ }, [batchOptions, seedAllocation]);const removeBatchNumber = useCallback((indexToRemove: number) => {setSelectedBatchNumbers((prev) => {@@ -2015,3 +2029,18 @@ function useSuggestedAllocation(args?: {return { data: fetcher.data?.data ?? [] };}++// Hook for the lots a picking list already picked for this job material. Loads+// only when a picking allocation exists (jobMaterialId provided).+function usePickedAllocation(jobMaterialId?: string) {+ const fetcher = useFetcher<{ data: SuggestedAllocationLot[]; error: null }>();++ // biome-ignore lint/correctness/useExhaustiveDependencies: keyed on jobMaterialId+ useEffect(() => {+ if (jobMaterialId) {+ fetcher.load(path.to.api.pickedAllocation(jobMaterialId));+ }+ }, [jobMaterialId]);++ return { data: fetcher.data?.data ?? [] };+}diff --git a/apps/mes/app/entry.server.tsx b/apps/mes/app/entry.server.tsxindex f828e40463..9a1b267ce7 100644--- a/apps/mes/app/entry.server.tsx+++ b/apps/mes/app/entry.server.tsx@@ -1,11 +1,82 @@+import { getLogger } from "@carbon/logger";import { ensureLoggingConfigured } from "@carbon/logger/config.server";+import { getRequestId } from "@carbon/logger/middleware.server";import { handleRequest as vercelHandleRequest } from "@vercel/react-router/entry.server";import type { EntryContext, RouterContextProvider } from "react-router";+import { isRouteErrorResponse } from "react-router";ensureLoggingConfigured();+const log = getLogger("mes");++// Process-level safety net: errors that escape the request lifecycle entirely+// (background promises, timers, event emitters) never reach React Router's+// `handleError`, so without this they crash or vanish with no context. Log them+// with a stack. Guarded on a global so HMR/re-import doesn't stack duplicate+// listeners (which would trip Node's MaxListeners warning).+const globalForProcessHandlers = globalThis as typeof globalThis & {+ __carbonProcessErrorHandlers?: boolean;+};+if (+ typeof process !== "undefined" &&+ !globalForProcessHandlers.__carbonProcessErrorHandlers+) {+ globalForProcessHandlers.__carbonProcessErrorHandlers = true;+ process.on("unhandledRejection", (reason) => {+ log.error("Unhandled promise rejection: {message}", {+ message: reason instanceof Error ? reason.message : String(reason),+ error: reason+ });+ });+ process.on("uncaughtException", (error) => {+ log.error("Uncaught exception: {message}", {+ message: error.message,+ error+ });+ // An uncaught exception leaves the process in an undefined, possibly+ // corrupted state. These apps are long-lived services, so we exit and let+ // the supervisor restart a clean worker rather than serving from a broken+ // one. (unhandledRejection is left log-only: a stray rejection is usually+ // recoverable and crashing the whole server on each one is worse.)+ process.exit(1);+ });+}+export const streamTimeout = 60_000;+/**+ * React Router v7 server error hook: fires with the actual error thrown by any+ * loader/action/render that RR catches — the "why" behind a `GET 500 …` line+ * that the access-log middleware (which only sees the final status) can't.+ *+ * We skip control-flow throws (redirects, and intentional Response throws like+ * 401/403/404 from `requirePermissions`) and client-aborted requests, logging+ * only genuine 5xx server failures. `requestId` correlates with the `[http]`+ * access-log line for the same request.+ */+export function handleError(+ error: unknown,+ {+ request,+ context+ }: { request: Request; params: unknown; context: RouterContextProvider }+) {+ // Client navigated away / cancelled mid-flight — not a real failure.+ if (request.signal.aborted) return;+ // Redirects and intentional Response throws are control flow, not errors.+ if (error instanceof Response && error.status < 500) return;+ if (isRouteErrorResponse(error) && error.status < 500) return;++ const { pathname } = new URL(request.url);+ log.error("Unhandled error in {method} {pathname}: {message}", {+ method: request.method,+ pathname,+ requestId: getRequestId(context),+ message: error instanceof Error ? error.message : String(error),+ error+ });+}+export default function handleRequest(request: Request,responseStatusCode: number,diff --git a/apps/mes/app/routes/api+/picked-allocation.ts b/apps/mes/app/routes/api+/picked-allocation.tsnew file mode 100644index 0000000000..4c808f0228--- /dev/null+++ b/apps/mes/app/routes/api+/picked-allocation.ts@@ -0,0 +1,26 @@+import { requirePermissions } from "@carbon/auth/auth.server";+import type { LoaderFunctionArgs } from "react-router";+import { getPickedTrackedEntitiesForMaterial } from "~/services/inventory.service";++/**+ * The lots a picking list already picked for a job material — used to pre-select+ * the Issue modal when a picking allocation exists. `companyId` is derived from+ * the session, never trusted from the client.+ */+export async function loader({ request }: LoaderFunctionArgs) {+ const { client, companyId } = await requirePermissions(request, {});++ const url = new URL(request.url);+ const jobMaterialId = url.searchParams.get("jobMaterialId");++ if (!jobMaterialId) {+ return { data: [], error: null };+ }++ const data = await getPickedTrackedEntitiesForMaterial(client, {+ jobMaterialId,+ companyId+ });++ return { data, error: null };+}diff --git a/apps/mes/app/services/inventory.service.ts b/apps/mes/app/services/inventory.service.tsindex 7dac14b935..7e685f570f 100644--- a/apps/mes/app/services/inventory.service.ts+++ b/apps/mes/app/services/inventory.service.ts@@ -381,6 +381,61 @@ export async function getPickedQuantitiesByJobMaterial(return picked;}+/**+ * The exact lots a picking list already picked for a job material — read from+ * `pickingListLineTrackedEntity`, summed by `trackedEntityId` across every live+ * picking line (a material can span several lines/lists). Same live-list filter+ * as `getPickedQuantitiesByJobMaterial`: only "In Progress"/"Completed" lists, and+ * never a Cancelled line. Shaped as `SuggestedAllocationLot[]` so the Issue modal+ * can seed it through the same path the no-picking-list suggestion uses. On a+ * partial-batch pick the original entity keeps the picked qty on the lineside+ * shelf (still `Available`), so these ids are valid picker options. Never throws+ * (returns []).+ */+export async function getPickedTrackedEntitiesForMaterial(+ client: SupabaseClient<Database>,+ args: { jobMaterialId: string; companyId: string }+): Promise<SuggestedAllocationLot[]> {+ const { data, error } = await client+ .from("pickingListLine")+ .select(+ "companyId, pickingList!inner(status), pickingListLineTrackedEntity(trackedEntityId, quantityPicked, trackedEntity(readableId, expirationDate))"+ )+ .eq("jobMaterialId", args.jobMaterialId)+ .eq("companyId", args.companyId)+ .neq("status", "Cancelled")+ .in("pickingList.status", ["In Progress", "Completed"]);++ if (error || !data) return [];++ const byEntity = new Map<string, SuggestedAllocationLot>();+ for (const line of data) {+ for (const picked of line.pickingListLineTrackedEntity ?? []) {+ const quantity = Number(picked.quantityPicked ?? 0);+ if (!picked.trackedEntityId || quantity <= 0) continue;+ const existing = byEntity.get(picked.trackedEntityId);+ if (existing) {+ existing.quantity += quantity;+ } else {+ const entity = picked.trackedEntity as {+ readableId: string | null;+ expirationDate: string | null;+ } | null;+ byEntity.set(picked.trackedEntityId, {+ trackedEntityId: picked.trackedEntityId,+ readableId: entity?.readableId ?? null,+ quantity,+ expirationDate: entity?.expirationDate ?? null,+ storageUnitId: null,+ storageUnitName: null+ });+ }+ }+ }++ return [...byEntity.values()];+}+export async function insertManualInventoryAdjustment(client: SupabaseClient<Database>,inventoryAdjustment: z.infer<typeof inventoryAdjustmentValidator> & {diff --git a/apps/mes/app/utils/path.ts b/apps/mes/app/utils/path.tsindex 2de5b8d87c..18ff7471f5 100644--- a/apps/mes/app/utils/path.ts+++ b/apps/mes/app/utils/path.ts@@ -14,6 +14,8 @@ export const path = {batchNumbers: (itemId: string) =>generatePath(`${api}/batch-numbers?itemId=${itemId}`),failureModes: `${api}/failure-modes`,+ pickedAllocation: (jobMaterialId: string) =>+ generatePath(`${api}/picked-allocation?jobMaterialId=${jobMaterialId}`),qualityIssueTypes: `${api}/quality-issue-types`,serialNumbers: (itemId: string) =>generatePath(`${api}/serial-numbers?itemId=${itemId}`),diff --git a/packages/database/src/audit.config.ts b/packages/database/src/audit.config.tsindex 19e9c146e8..5dd4d81c04 100644--- a/packages/database/src/audit.config.ts+++ b/packages/database/src/audit.config.ts@@ -340,6 +340,16 @@ export const auditConfig = {}},+ inventoryCount: {+ label: "Inventory Count",+ tables: {+ inventoryCount: { role: "root" },+ // Line INSERTs (bulk snapshot generation) are auto-skipped for non-root+ // tables; only UPDATE/DELETE on a counted line are logged.+ inventoryCountLine: { entityIdColumn: "inventoryCountId" }+ }+ },+workCenter: {label: "Work Center",tables: {@@ -475,6 +485,8 @@ export const auditConfig = {warehouseTransferLine: "Line Item",stockTransfer: "Stock Transfer",stockTransferLine: "Line Item",+ inventoryCount: "Inventory Count",+ inventoryCountLine: "Line Item",workCenter: "Work Center",workCenterProcess: "Process",maintenanceSchedule: "Maintenance Schedule",diff --git a/packages/database/src/types.ts b/packages/database/src/types.tsindex 17bca5f8be..98f23323b8 100644--- a/packages/database/src/types.ts+++ b/packages/database/src/types.ts@@ -16906,6 +16906,7 @@ export type Database = {Row: {comment: string | nullcompanyId: string+ correctionOfItemLedgerId: string | nullcreatedAt: stringcreatedBy: stringdocumentId: string | null@@ -16931,6 +16932,7 @@ export type Database = {Insert: {comment?: string | nullcompanyId: string+ correctionOfItemLedgerId?: string | nullcreatedAt?: stringcreatedBy?: stringdocumentId?: string | null@@ -16956,6 +16958,7 @@ export type Database = {Update: {comment?: string | nullcompanyId?: string+ correctionOfItemLedgerId?: string | nullcreatedAt?: stringcreatedBy?: stringdocumentId?: string | null@@ -56761,6 +56764,7 @@ export type Database = {Row: {comment: string | nullcompanyId: string | null+ correctionOfItemLedgerId: string | nullcreatedAt: string | nullcreatedBy: string | nulldocumentId: string | null@@ -56788,6 +56792,7 @@ export type Database = {trackedEntityStatus:| Database["public"]["Enums"]["trackedEntityStatus"]| null+ updatedBy: string | null}Relationships: [{@@ -56888,6 +56893,41 @@ export type Database = {referencedRelation: "trackedEntity"referencedColumns: ["id"]},+ {+ foreignKeyName: "itemLedger_updatedBy_fkey"+ columns: ["updatedBy"]+ isOneToOne: false+ referencedRelation: "employees"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "itemLedger_updatedBy_fkey"+ columns: ["updatedBy"]+ isOneToOne: false+ referencedRelation: "employeesAcrossCompanies"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "itemLedger_updatedBy_fkey"+ columns: ["updatedBy"]+ isOneToOne: false+ referencedRelation: "employeeSummary"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "itemLedger_updatedBy_fkey"+ columns: ["updatedBy"]+ isOneToOne: false+ referencedRelation: "user"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "itemLedger_updatedBy_fkey"+ columns: ["updatedBy"]+ isOneToOne: false+ referencedRelation: "userDefaults"+ referencedColumns: ["userId"]+ },{foreignKeyName: "partLeger_companyId_fkey"columns: ["companyId"]@@ -60043,14 +60083,14 @@ export type Database = {},{foreignKeyName: "partner_id_fkey"- columns: ["supplierLocationId"]+ columns: ["id"]isOneToOne: falsereferencedRelation: "supplierLocation"referencedColumns: ["id"]},{foreignKeyName: "partner_id_fkey"- columns: ["id"]+ columns: ["supplierLocationId"]isOneToOne: falsereferencedRelation: "supplierLocation"referencedColumns: ["id"]@@ -65074,14 +65114,14 @@ export type Database = {Relationships: [{foreignKeyName: "address_countryCode_fkey"- columns: ["customerCountryCode"]+ columns: ["invoiceCountryCode"]isOneToOne: falsereferencedRelation: "country"referencedColumns: ["alpha2"]},{foreignKeyName: "address_countryCode_fkey"- columns: ["invoiceCountryCode"]+ columns: ["customerCountryCode"]isOneToOne: falsereferencedRelation: "country"referencedColumns: ["alpha2"]diff --git a/packages/database/supabase/functions/lib/types.ts b/packages/database/supabase/functions/lib/types.tsindex 17bca5f8be..98f23323b8 100644--- a/packages/database/supabase/functions/lib/types.ts+++ b/packages/database/supabase/functions/lib/types.ts@@ -16906,6 +16906,7 @@ export type Database = {Row: {comment: string | nullcompanyId: string+ correctionOfItemLedgerId: string | nullcreatedAt: stringcreatedBy: stringdocumentId: string | null@@ -16931,6 +16932,7 @@ export type Database = {Insert: {comment?: string | nullcompanyId: string+ correctionOfItemLedgerId?: string | nullcreatedAt?: stringcreatedBy?: stringdocumentId?: string | null@@ -16956,6 +16958,7 @@ export type Database = {Update: {comment?: string | nullcompanyId?: string+ correctionOfItemLedgerId?: string | nullcreatedAt?: stringcreatedBy?: stringdocumentId?: string | null@@ -56761,6 +56764,7 @@ export type Database = {Row: {comment: string | nullcompanyId: string | null+ correctionOfItemLedgerId: string | nullcreatedAt: string | nullcreatedBy: string | nulldocumentId: string | null@@ -56788,6 +56792,7 @@ export type Database = {trackedEntityStatus:| Database["public"]["Enums"]["trackedEntityStatus"]| null+ updatedBy: string | null}Relationships: [{@@ -56888,6 +56893,41 @@ export type Database = {referencedRelation: "trackedEntity"referencedColumns: ["id"]},+ {+ foreignKeyName: "itemLedger_updatedBy_fkey"+ columns: ["updatedBy"]+ isOneToOne: false+ referencedRelation: "employees"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "itemLedger_updatedBy_fkey"+ columns: ["updatedBy"]+ isOneToOne: false+ referencedRelation: "employeesAcrossCompanies"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "itemLedger_updatedBy_fkey"+ columns: ["updatedBy"]+ isOneToOne: false+ referencedRelation: "employeeSummary"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "itemLedger_updatedBy_fkey"+ columns: ["updatedBy"]+ isOneToOne: false+ referencedRelation: "user"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "itemLedger_updatedBy_fkey"+ columns: ["updatedBy"]+ isOneToOne: false+ referencedRelation: "userDefaults"+ referencedColumns: ["userId"]+ },{foreignKeyName: "partLeger_companyId_fkey"columns: ["companyId"]@@ -60043,14 +60083,14 @@ export type Database = {},{foreignKeyName: "partner_id_fkey"- columns: ["supplierLocationId"]+ columns: ["id"]isOneToOne: falsereferencedRelation: "supplierLocation"referencedColumns: ["id"]},{foreignKeyName: "partner_id_fkey"- columns: ["id"]+ columns: ["supplierLocationId"]isOneToOne: falsereferencedRelation: "supplierLocation"referencedColumns: ["id"]@@ -65074,14 +65114,14 @@ export type Database = {Relationships: [{foreignKeyName: "address_countryCode_fkey"- columns: ["customerCountryCode"]+ columns: ["invoiceCountryCode"]isOneToOne: falsereferencedRelation: "country"referencedColumns: ["alpha2"]},{foreignKeyName: "address_countryCode_fkey"- columns: ["invoiceCountryCode"]+ columns: ["customerCountryCode"]isOneToOne: falsereferencedRelation: "country"referencedColumns: ["alpha2"]diff --git a/packages/database/supabase/functions/post-inventory-count/index.ts b/packages/database/supabase/functions/post-inventory-count/index.tsindex cb5bdaec4c..60e9a89b3e 100644--- a/packages/database/supabase/functions/post-inventory-count/index.ts+++ b/packages/database/supabase/functions/post-inventory-count/index.ts@@ -5,20 +5,45 @@ import { DB, getConnectionPool, getDatabaseClient } from "../lib/database.ts";import { corsHeaders } from "../lib/headers.ts";import { requirePermissions } from "../lib/supabase.ts";import type { Database } from "../lib/types.ts";+import { planInventoryCountPost } from "./plan-post.ts";const pool = getConnectionPool(1);const db = getDatabaseClient<DB>(pool);type ItemLedgerInsert = Database["public"]["Tables"]["itemLedger"]["Insert"];-// Inventory Count posting reconciles on-hand to the counted value-// (Set-Quantity-to-counted semantics): for each counted line we post a single-// Positive/Negative inventory adjustment for the delta between the counted-// quantity and the *live* on-hand at post time. Because the counted quantity is-// always >= 0, on-hand can never go negative. Like the manual inventory-// adjustment path (`insertManualInventoryAdjustment`), this writes to the item-// ledger only (on-hand is derived from `itemLedger`); it does not post GL-// journal lines.+// Base for post-blocking validation errors. Carries the offending line ids so+// the response can hand them to the UI to highlight the rows.+class InvalidLinesError extends Error {+ lineIds: string[];+ constructor(message: string, lineIds: string[]) {+ super(message);+ this.name = "InvalidLinesError";+ this.lineIds = lineIds;+ }+}++// Thrown when a serial-tracked line is counted as anything other than 0 or 1+// (a serial entity is a single unique unit).+class SerialQuantityError extends InvalidLinesError {+ constructor(lineIds: string[]) {+ super(+ `${lineIds.length} serial line(s) must be counted as 0 or 1 — a serial number is a single unit.`,+ lineIds+ );+ this.name = "SerialQuantityError";+ }+}++// Inventory Count posting uses snapshot-delta reconciliation: for each counted+// line we post a single Positive/Negative adjustment for the variance the counter+// reviewed — `counted - systemQuantity` (the FROZEN snapshot on the line), NOT+// `counted - live on-hand`. This preserves any stock movements that posted between+// the snapshot and the post (a receipt/shipment isn't clobbered; the correction is+// applied on top of it). Like `insertManualInventoryAdjustment`, this writes to the+// item ledger only (on-hand is derived from `itemLedger`); no GL journal lines.+// (Rectify re-snapshots `systemQuantity` to current live on-hand first, so for a+// correction the same formula resolves to "set to counted".)const payloadValidator = z.object({type: z.literal("post"),inventoryCountId: z.string(),@@ -63,41 +88,60 @@ serve(async (req: Request) => {if (lines.error) throw new Error(lines.error.message);const comment = `Inventory Count ${inventoryCount.data.inventoryCountId}`;+ const countedLines = (lines.data ?? []).filter(+ (line) => line.countedQuantity !== null+ );++ // Serial validation: a serial-tracked item is a single unique unit, so each+ // serial line can only be counted 0 or 1. Block the post (before any write)+ // and return the offending line ids so the UI can highlight them.+ const itemIds = [...new Set(countedLines.map((line) => line.itemId))];+ const items = itemIds.length+ ? await client+ .from("item")+ .select("id, itemTrackingType")+ .in("id", itemIds)+ .eq("companyId", companyId)+ : null;+ if (items?.error) throw new Error(items.error.message);++ const trackingTypeByItem = new Map<string, string | null>(+ (items?.data ?? []).map((item) => [item.id, item.itemTrackingType])+ );+ const serialInvalidLineIds = countedLines+ .filter((line) => {+ if (trackingTypeByItem.get(line.itemId) !== "Serial") return false;+ const counted = Number(line.countedQuantity);+ return counted !== 0 && counted !== 1;+ })+ .map((line) => line.id);+ if (serialInvalidLineIds.length > 0) {+ throw new SerialQuantityError(serialInvalidLineIds);+ }++ // Reconcile against the frozen snapshot — no live on-hand read needed.+ const { planned } = planInventoryCountPost(countedLines);await db.transaction().execute(async (trx) => {- for (const line of lines.data ?? []) {- if (line.countedQuantity === null) continue;-- // Live on-hand for this exact bucket (item / location / storage unit /- // tracked entity). Mirror the snapshot's status-aware definition (and- // `get_inventory_quantities`): exclude Rejected stock so the delta is- // measured against the same on-hand the count was built from.- let onHandQuery = trx- .selectFrom("itemLedger")- .select((eb) => eb.fn.sum<number>("quantity").as("quantity"))- .where("companyId", "=", companyId)- .where("itemId", "=", line.itemId)- .where((eb) =>- eb.or([- eb("trackedEntityStatus", "is", null),- eb("trackedEntityStatus", "!=", "Rejected")- ])- );-- onHandQuery = line.locationId- ? onHandQuery.where("locationId", "=", line.locationId)- : onHandQuery.where("locationId", "is", null);- onHandQuery = line.storageUnitId- ? onHandQuery.where("storageUnitId", "=", line.storageUnitId)- : onHandQuery.where("storageUnitId", "is", null);- onHandQuery = line.trackedEntityId- ? onHandQuery.where("trackedEntityId", "=", line.trackedEntityId)- : onHandQuery.where("trackedEntityId", "is", null);-- const onHandRow = await onHandQuery.executeTakeFirst();- const currentOnHand = Number(onHandRow?.quantity ?? 0);-- const delta = line.countedQuantity - currentOnHand;+ // Concurrency guard: lock the header and re-assert it is still Pending so+ // two concurrent posts can't both apply the delta (double-post). Mirrors+ // the FOR UPDATE guard in post-payment / post-memo; the end-of-transaction+ // guarded UPDATE below is the backstop.+ const locked = await trx+ .selectFrom("inventoryCount")+ .select(["id", "status"])+ .where("id", "=", inventoryCountId)+ .where("companyId", "=", companyId)+ .forUpdate()+ .executeTakeFirst();++ if (!locked) throw new Error("Inventory count not found");+ if (locked.status !== "Pending") {+ throw new Error("Inventory count is no longer pending");+ }++ // Post the reviewed variance for each line as an inventory adjustment.+ for (const { line, delta } of planned) {if (delta === 0) continue;const ledgerEntry: ItemLedgerInsert = {@@ -110,6 +154,11 @@ serve(async (req: Request) => {entryType: delta > 0 ? "Positive Adjmt." : "Negative Adjmt.",documentType: "Inventory Count",documentId: inventoryCountId,+ // In-place rectify: if this line already posted a movement (the count+ // was rectified), link the new fix movement back to that prior one so+ // both stay visible and linked in the movements screens. Null on the+ // first post.+ correctionOfItemLedgerId: line.postedItemLedgerId ?? null,comment,companyId,createdBy: userId@@ -121,11 +170,12 @@ serve(async (req: Request) => {.returning(["id"]).executeTakeFirstOrThrow();- // Tracked lines: set that entity's quantity to the counted value.+ // Tracked lines: apply the same delta to the entity's quantity (not a+ // set-to-counted) so movements since the snapshot aren't overwritten.if (line.trackedEntityId) {await trx.updateTable("trackedEntity")- .set({ quantity: line.countedQuantity })+ .set((eb) => ({ quantity: eb("quantity", "+", delta) })).where("id", "=", line.trackedEntityId).where("companyId", "=", companyId).execute();@@ -173,9 +223,25 @@ serve(async (req: Request) => {// as it was (Pending). We do NOT touch the status here: reverting a failed// post to Draft would silently discard the user's confirmation. Pending is// the correct retryable state.- return new Response(JSON.stringify({ error: (err as Error).message }), {- headers: { ...corsHeaders, "Content-Type": "application/json" },- status: 500- });+ // Body key is `message` so the route's `getEdgeFunctionErrorMessage` can pull+ // the real reason (e.g. the snapshot-drift or serial text) out of the response+ // body — supabase-js otherwise only exposes a generic FunctionsHttpError.message.+ // For line-level validation errors we also return `invalidLineIds` so the UI+ // can highlight the offending rows.+ // Only line-level validation failures are client errors (400). Everything+ // else — "not found", "no longer pending", DB/runtime failures — is a 500 so+ // real outages surface in monitoring instead of hiding as a 400.+ const isValidationError = err instanceof InvalidLinesError;+ const invalidLineIds = isValidationError ? err.lineIds : undefined;+ return new Response(+ JSON.stringify({+ message: (err as Error).message,+ ...(invalidLineIds ? { invalidLineIds } : {})+ }),+ {+ headers: { ...corsHeaders, "Content-Type": "application/json" },+ status: isValidationError ? 400 : 500+ }+ );}});diff --git a/packages/database/supabase/functions/post-inventory-count/plan-post.ts b/packages/database/supabase/functions/post-inventory-count/plan-post.tsnew file mode 100644index 0000000000..6b702efa0c--- /dev/null+++ b/packages/database/supabase/functions/post-inventory-count/plan-post.ts@@ -0,0 +1,32 @@+// Pure planning core for posting an inventory count, extracted so the delta math+// can be unit-tested without a database.+//+// Reconciliation model: post the variance the counter reviewed against the+// FROZEN snapshot — `delta = counted - systemQuantity` — NOT against live on-hand.+// This preserves any stock movements that posted between the snapshot and the+// post (a receipt/shipment isn't clobbered; the count's correction is applied on+// top of it). A line whose delta is 0 is still returned; the caller skips writing+// it.++export type PlannableLine = {+ id: string;+ itemId: string;+ systemQuantity: number | string | null;+ // Callers pass only counted lines; null is tolerated for the row type and+ // coerces to 0 (delta = −systemQuantity), never actually reached.+ countedQuantity: number | string | null;+};++export type PlanResult<L extends PlannableLine> = {+ planned: { line: L; delta: number }[];+};++export function planInventoryCountPost<L extends PlannableLine>(+ lines: L[]+): PlanResult<L> {+ const planned = lines.map((line) => ({+ line,+ delta: Number(line.countedQuantity) - Number(line.systemQuantity)+ }));+ return { planned };+}diff --git a/packages/database/supabase/functions/post-inventory-count/post-inventory-count.test.ts b/packages/database/supabase/functions/post-inventory-count/post-inventory-count.test.tsnew file mode 100644index 0000000000..64c9e720b4--- /dev/null+++ b/packages/database/supabase/functions/post-inventory-count/post-inventory-count.test.ts@@ -0,0 +1,74 @@+import { assertEquals } from "https://deno.land/[email protected]/testing/asserts.ts";+import {+ planInventoryCountPost,+ type PlannableLine,+} from "./plan-post.ts";++// Unit tests for the pure planning core: the reconciliation delta math+// (`counted - systemQuantity`). The FOR UPDATE lock, status flip, and serial 0/1+// validation are DB-level and exercised in the browser/integration verification.++type Line = PlannableLine & { postedItemLedgerId: string | null };++const line = (overrides: Partial<Line>): Line => ({+ id: "icl_1",+ itemId: "item_1",+ systemQuantity: 10,+ countedQuantity: 10,+ postedItemLedgerId: null,+ ...overrides,+});++Deno.test("delta = counted - snapshot (positive)", () => {+ const { planned } = planInventoryCountPost([+ line({ systemQuantity: 8, countedQuantity: 10 }),+ ]);+ assertEquals(planned[0].delta, 2);+});++Deno.test("delta is negative when counted is below snapshot", () => {+ const { planned } = planInventoryCountPost([+ line({ systemQuantity: 5, countedQuantity: 3 }),+ ]);+ assertEquals(planned[0].delta, -2);+});++Deno.test("delta is 0 when counted matches the snapshot", () => {+ const { planned } = planInventoryCountPost([+ line({ systemQuantity: 7, countedQuantity: 7 }),+ ]);+ assertEquals(planned[0].delta, 0);+});++Deno.test("reconciliation posts the reviewed variance, not counted - live", () => {+ // Snapshot 10, counter found 8 (−2). A +5 receipt landed since the snapshot;+ // the delta must still be −2 (applied on top of the receipt), NOT 8 − 15.+ const { planned } = planInventoryCountPost([+ line({ systemQuantity: 10, countedQuantity: 8 }),+ ]);+ assertEquals(planned[0].delta, -2);+});++Deno.test("string NUMERIC quantities are coerced", () => {+ const { planned } = planInventoryCountPost([+ line({ systemQuantity: "8", countedQuantity: "10.5" }),+ ]);+ assertEquals(planned[0].delta, 2.5);+});++Deno.test("the full line is preserved on the plan (e.g. postedItemLedgerId)", () => {+ const { planned } = planInventoryCountPost([+ line({ systemQuantity: 12, countedQuantity: 8, postedItemLedgerId: "il_orig" }),+ ]);+ assertEquals(planned[0].delta, -4);+ assertEquals(planned[0].line.postedItemLedgerId, "il_orig");+});++Deno.test("plans every line", () => {+ const { planned } = planInventoryCountPost([+ line({ id: "a", systemQuantity: 5, countedQuantity: 5 }),+ line({ id: "b", systemQuantity: 5, countedQuantity: 9 }),+ line({ id: "c", systemQuantity: 5, countedQuantity: 1 }),+ ]);+ assertEquals(planned.map((p) => p.delta), [0, 4, -4]);+});diff --git a/packages/database/supabase/migrations/20260713015508_harden-inventory-count-correction.sql b/packages/database/supabase/migrations/20260713015508_harden-inventory-count-correction.sqlnew file mode 100644index 0000000000..2cb09b65ec--- /dev/null+++ b/packages/database/supabase/migrations/20260713015508_harden-inventory-count-correction.sql@@ -0,0 +1,45 @@+-- Rectify an already-posted inventory count in place: reopening it (via Rectify)+-- and re-posting the changed lines writes new adjustment movements that point back+-- at the original movement they correct, so both the original adjustment and the+-- fix stay visible and linked in the stock-movements screens.++-- ============================================================================+-- itemLedger.correctionOfItemLedgerId — the movement->movement link: a "fix"+-- adjustment points at the original adjustment it corrects. Append-only self+-- reference (no FK, matching costLedger.appliesToCostLedgerId).+-- ============================================================================+ALTER TABLE "itemLedger"+ ADD COLUMN "correctionOfItemLedgerId" TEXT;++CREATE INDEX "itemLedger_correctionOfItemLedgerId_idx"+ ON "itemLedger" ("correctionOfItemLedgerId")+ WHERE "correctionOfItemLedgerId" IS NOT NULL;++-- ============================================================================+-- Recreate the itemLedgers view so its `il.*` expansion picks up the new+-- correctionOfItemLedgerId column (Postgres freezes `*` at definition time, and+-- the new column lands mid-list so CREATE OR REPLACE can't reorder — drop first).+-- ============================================================================+DROP VIEW IF EXISTS "itemLedgers";++CREATE VIEW "itemLedgers" WITH (security_invoker = true) AS+SELECT+ il.*,+ (il."correctionOfItemLedgerId" IS NOT NULL) AS "isCorrection",+ i."readableIdWithRevision" AS "itemReadableId",+ i."name" AS "itemDescription",+ i."type" AS "itemType",+ l."name" AS "locationName",+ su."name" AS "storageUnitName",+ te."readableId" AS "trackedEntityReadableId",+ CASE+ WHEN i."thumbnailPath" IS NULL AND mu."thumbnailPath" IS NOT NULL+ THEN mu."thumbnailPath"+ ELSE i."thumbnailPath"+ END AS "thumbnailPath"+FROM "itemLedger" il+INNER JOIN "item" i ON i."id" = il."itemId" AND i."companyId" = il."companyId"+LEFT JOIN "modelUpload" mu ON mu."id" = i."modelUploadId"+LEFT JOIN "location" l ON l."id" = il."locationId"+LEFT JOIN "storageUnit" su ON su."id" = il."storageUnitId"+LEFT JOIN "trackedEntity" te ON te."id" = il."trackedEntityId";diff --git a/packages/database/supabase/migrations/20260713095136_attach-inventory-count-audit-triggers.sql b/packages/database/supabase/migrations/20260713095136_attach-inventory-count-audit-triggers.sqlnew file mode 100644index 0000000000..531818a5eb--- /dev/null+++ b/packages/database/supabase/migrations/20260713095136_attach-inventory-count-audit-triggers.sql@@ -0,0 +1,10 @@+-- Attach async event triggers so inventoryCount changes flow to the AUDIT handler.+-- The AUDIT eventSystemSubscription rows are created at runtime by+-- syncAuditSubscriptions (on every /api/audit-log fetch), so no subscription SQL+-- is needed here.+--+-- Pass all three args explicitly: a 2-arg call is ambiguous because both the+-- legacy 2-arg overload and the 3-arg overload (defaulted after_sync_functions,+-- added 20260410030406) match. Empty arrays = async-only (no sync/after-sync).+SELECT attach_event_trigger('inventoryCount'::text, ARRAY[]::TEXT[], ARRAY[]::TEXT[]);+SELECT attach_event_trigger('inventoryCountLine'::text, ARRAY[]::TEXT[], ARRAY[]::TEXT[]);diff --git a/packages/database/supabase/migrations/20260713130718_harden-item-ledgers-view-company-scope.sql b/packages/database/supabase/migrations/20260713130718_harden-item-ledgers-view-company-scope.sqlnew file mode 100644index 0000000000..1b72825345--- /dev/null+++ b/packages/database/supabase/migrations/20260713130718_harden-item-ledgers-view-company-scope.sql@@ -0,0 +1,27 @@+-- Defense-in-depth: scope the tenant-owned joins in the itemLedgers view by+-- companyId so reused/colliding ids can never attach another tenant's metadata.+-- `item` was already scoped; add the same to location, storageUnit, and+-- trackedEntity. (`modelUpload` is reached through `item.modelUploadId`, i.e.+-- already company-scoped via the item join, so it stays as-is.)+-- Column list/order is unchanged, so CREATE OR REPLACE is valid here.+CREATE OR REPLACE VIEW "itemLedgers" WITH (security_invoker = true) AS+SELECT+ il.*,+ (il."correctionOfItemLedgerId" IS NOT NULL) AS "isCorrection",+ i."readableIdWithRevision" AS "itemReadableId",+ i."name" AS "itemDescription",+ i."type" AS "itemType",+ l."name" AS "locationName",+ su."name" AS "storageUnitName",+ te."readableId" AS "trackedEntityReadableId",+ CASE+ WHEN i."thumbnailPath" IS NULL AND mu."thumbnailPath" IS NOT NULL+ THEN mu."thumbnailPath"+ ELSE i."thumbnailPath"+ END AS "thumbnailPath"+FROM "itemLedger" il+INNER JOIN "item" i ON i."id" = il."itemId" AND i."companyId" = il."companyId"+LEFT JOIN "modelUpload" mu ON mu."id" = i."modelUploadId"+LEFT JOIN "location" l ON l."id" = il."locationId" AND l."companyId" = il."companyId"+LEFT JOIN "storageUnit" su ON su."id" = il."storageUnitId" AND su."companyId" = il."companyId"+LEFT JOIN "trackedEntity" te ON te."id" = il."trackedEntityId" AND te."companyId" = il."companyId";diff --git a/packages/locale/locales/de/erp.po b/packages/locale/locales/de/erp.poindex 2aeae38e52..75cae5b7e9 100644--- a/packages/locale/locales/de/erp.po+++ b/packages/locale/locales/de/erp.po@@ -2435,9 +2435,6 @@ msgstr "Bestätigter eingehender Bestand — Kauf- und Produktionsaufträge (Balmsgid "Confirmed outgoing stock — sales orders & job materials (bars below zero)."msgstr "Bestätigter ausgehender Bestand — Verkaufsaufträge & Auftragsmaterial (Balken unter Null)."-msgid "Confirming locks the counted quantities. Review the warnings below, then post the count to apply the adjustments."-msgstr "Das Bestätigen sperrt die gezählten Mengen. Überprüfen Sie die Warnungen unten und buchen Sie dann die Inventur, um die Anpassungen anzuwenden."-msgid "Confirms every posted journal entry in the period has equal debits and credits. If any entry is out of balance the trial balance won't tie out, so it must be corrected before the period can close."msgstr "Bestätigt, dass jeder gebuchte Journaleintrag in der Periode gleiche Belastungen und Gutschriften hat. Wenn ein Eintrag nicht ausgeglichen ist, stimmt die Probebilanz nicht überein, daher muss er korrigiert werden, bevor die Periode geschlossen werden kann."@@ -2723,6 +2720,12 @@ msgstr "Richtige Antwort"msgid "Correct Answers"msgstr "Richtige Antworten"+msgid "Correction"+msgstr "Korrektur"++msgid "Corrections"+msgstr "Korrektionen"+msgid "Corrective action"msgstr "Korrekturmaßnahme"@@ -2794,6 +2797,9 @@ msgstr "Der Auftrag konnte nicht umgeplant werden. Bitte versuchen Sie es erneutmsgid "Count"msgstr "Anzahl"+msgid "Count History"+msgstr "Zählverlauf"+msgid "Count ID"msgstr "Zählung-ID"@@ -8350,6 +8356,12 @@ msgstr "Bestellungen eingereicht"msgid "Origin"msgstr "Ursprung"+msgid "Original"+msgstr "Original"++msgid "Original Count"+msgstr "Ursprüngliche Anzahl"+msgid "Other Income account for FX gains when a payment settles a foreign-currency invoice at a more favorable rate"msgstr "Sonstige Einnahmen für Wechselkursgewinne, wenn eine Zahlung eine Rechnung in Fremdwährung zu einem günstigeren Kurs ausgleicht"@@ -8837,6 +8849,15 @@ msgstr "Gepostet am"msgid "Posted By"msgstr "Gepostet von"+msgid "Posted once, no rectifications."+msgstr "Einmal gepostet, keine Berichtigungen."++msgid "Posted once, rectified {rectifications} times."+msgstr "Einmal gepostet, {rectifications} Mal berichtigt."++msgid "Posted once, rectified 1 time."+msgstr "Einmal gepostet, 1 Mal berichtigt."+msgid "Posting"msgstr "Vorauszahlungen"@@ -9576,6 +9597,12 @@ msgstr "Aufzeichnungen"msgid "Recovery Period"msgstr "Registrieren"+msgid "Rectification {rectifyNumber}"+msgstr "Berichtigung {rectifyNumber}"++msgid "Rectify"+msgstr "Berichtigen"+msgid "Redirecting to verification page..."msgstr "Wird zur Verifizierungsseite weitergeleitet..."@@ -9903,6 +9930,9 @@ msgstr "Kehren Sie die zugehörigen Journaleinträge um"msgid "Review the period's balance sheet and income statement and confirm the figures look right. This is a manual sign-off — mark it done once you have reviewed them."msgstr "Überprüfen Sie die Bilanz und die Gewinn- und Verlustrechnung der Periode und bestätigen Sie, dass die Zahlen korrekt aussehen. Dies ist eine manuelle Genehmigung – markieren Sie sie als erledigt, sobald Sie diese überprüft haben."+msgid "Review the warnings below, then post the count to apply the adjustments."+msgstr "Überprüfen Sie die folgenden Warnungen und posten Sie dann die Anzahl, um die Anpassungen anzuwenden."+msgid "Revision"msgstr "Revision"diff --git a/packages/locale/locales/en/erp.po b/packages/locale/locales/en/erp.poindex 4a321052fd..096c3d96ed 100644--- a/packages/locale/locales/en/erp.po+++ b/packages/locale/locales/en/erp.po@@ -2435,9 +2435,6 @@ msgstr "Confirmed incoming stock — purchase & production orders (bars above zemsgid "Confirmed outgoing stock — sales orders & job materials (bars below zero)."msgstr "Confirmed outgoing stock — sales orders & job materials (bars below zero)."-msgid "Confirming locks the counted quantities. Review the warnings below, then post the count to apply the adjustments."-msgstr "Confirming locks the counted quantities. Review the warnings below, then post the count to apply the adjustments."-msgid "Confirms every posted journal entry in the period has equal debits and credits. If any entry is out of balance the trial balance won't tie out, so it must be corrected before the period can close."msgstr "Confirms every posted journal entry in the period has equal debits and credits. If any entry is out of balance the trial balance won't tie out, so it must be corrected before the period can close."@@ -2723,6 +2720,12 @@ msgstr "Correct Answer"msgid "Correct Answers"msgstr "Correct Answers"+msgid "Correction"+msgstr "Correction"++msgid "Corrections"+msgstr "Corrections"+msgid "Corrective action"msgstr "Corrective action"@@ -2794,6 +2797,9 @@ msgstr "Couldn't reschedule the job. Please try again."msgid "Count"msgstr "Count"+msgid "Count History"+msgstr "Count History"+msgid "Count ID"msgstr "Count ID"@@ -8350,6 +8356,12 @@ msgstr "Orders submitted"msgid "Origin"msgstr "Origin"+msgid "Original"+msgstr "Original"++msgid "Original Count"+msgstr "Original Count"+msgid "Other Income account for FX gains when a payment settles a foreign-currency invoice at a more favorable rate"msgstr "Other Income account for FX gains when a payment settles a foreign-currency invoice at a more favorable rate"@@ -8837,6 +8849,15 @@ msgstr "Posted At"msgid "Posted By"msgstr "Posted By"+msgid "Posted once, no rectifications."+msgstr "Posted once, no rectifications."++msgid "Posted once, rectified {rectifications} times."+msgstr "Posted once, rectified {rectifications} times."++msgid "Posted once, rectified 1 time."+msgstr "Posted once, rectified 1 time."+msgid "Posting"msgstr "Posting"@@ -9576,6 +9597,12 @@ msgstr "Records"msgid "Recovery Period"msgstr "Recovery Period"+msgid "Rectification {rectifyNumber}"+msgstr "Rectification {rectifyNumber}"++msgid "Rectify"+msgstr "Rectify"+msgid "Redirecting to verification page..."msgstr "Redirecting to verification page..."@@ -9903,6 +9930,9 @@ msgstr "Reverse the related journal entries"msgid "Review the period's balance sheet and income statement and confirm the figures look right. This is a manual sign-off — mark it done once you have reviewed them."msgstr "Review the period's balance sheet and income statement and confirm the figures look right. This is a manual sign-off — mark it done once you have reviewed them."+msgid "Review the warnings below, then post the count to apply the adjustments."+msgstr "Review the warnings below, then post the count to apply the adjustments."+msgid "Revision"msgstr "Revision"diff --git a/packages/locale/locales/es/erp.po b/packages/locale/locales/es/erp.poindex 4982b78271..a8bb39ff71 100644--- a/packages/locale/locales/es/erp.po+++ b/packages/locale/locales/es/erp.po@@ -2435,9 +2435,6 @@ msgstr "Existencias entrantes confirmadas — órdenes de compra y producción (msgid "Confirmed outgoing stock — sales orders & job materials (bars below zero)."msgstr "Existencias salientes confirmadas — órdenes de venta y materiales de trabajo (barras por debajo de cero)."-msgid "Confirming locks the counted quantities. Review the warnings below, then post the count to apply the adjustments."-msgstr "Confirmar bloquea las cantidades contadas. Revisa las advertencias a continuación y luego publica el conteo para aplicar los ajustes."-msgid "Confirms every posted journal entry in the period has equal debits and credits. If any entry is out of balance the trial balance won't tie out, so it must be corrected before the period can close."msgstr "Confirma que cada asiento de diario contabilizado en el período tiene débitos y créditos iguales. Si algún asiento está desbalanceado, el balance de prueba no cuadrará, por lo que debe corregirse antes de que el período pueda cerrarse."@@ -2723,6 +2720,12 @@ msgstr "Respuesta Correcta"msgid "Correct Answers"msgstr "Respuestas Correctas"+msgid "Correction"+msgstr "Corrección"++msgid "Corrections"+msgstr "Correcciones"+msgid "Corrective action"msgstr "Acción correctiva"@@ -2794,6 +2797,9 @@ msgstr "No se pudo reprogramar el trabajo. Por favor, inténtelo de nuevo."msgid "Count"msgstr "Cantidad"+msgid "Count History"+msgstr "Historial de Conteo"+msgid "Count ID"msgstr "ID de Conteo"@@ -8350,6 +8356,12 @@ msgstr "Pedidos enviados"msgid "Origin"msgstr "Origen"+msgid "Original"+msgstr "Original"++msgid "Original Count"+msgstr "Conteo Original"+msgid "Other Income account for FX gains when a payment settles a foreign-currency invoice at a more favorable rate"msgstr "Cuenta de Otros Ingresos para ganancias de divisas cuando un pago liquida una factura en moneda extranjera a una tasa más favorable"@@ -8837,6 +8849,15 @@ msgstr "Publicado en"msgid "Posted By"msgstr "Publicado por"+msgid "Posted once, no rectifications."+msgstr "Registrado una vez, sin rectificaciones."++msgid "Posted once, rectified {rectifications} times."+msgstr "Registrado una vez, rectificado {rectifications} veces."++msgid "Posted once, rectified 1 time."+msgstr "Registrado una vez, rectificado 1 vez."+msgid "Posting"msgstr "Anticipos"@@ -9576,6 +9597,12 @@ msgstr "Registros"msgid "Recovery Period"msgstr "Registrar"+msgid "Rectification {rectifyNumber}"+msgstr "Rectificación {rectifyNumber}"++msgid "Rectify"+msgstr "Rectificar"+msgid "Redirecting to verification page..."msgstr "Redirigiendo a la página de verificación..."@@ -9903,6 +9930,9 @@ msgstr "Revertir los asientos de diario relacionados"msgid "Review the period's balance sheet and income statement and confirm the figures look right. This is a manual sign-off — mark it done once you have reviewed them."msgstr "Revise el balance general y el estado de resultados del período y confirme que las cifras se ven correctas. Este es un visto bueno manual — marque como hecho una vez que los haya revisado."+msgid "Review the warnings below, then post the count to apply the adjustments."+msgstr "Revise las advertencias a continuación, luego registre el conteo para aplicar los ajustes."+msgid "Revision"msgstr "Revisión"diff --git a/packages/locale/locales/fr/erp.po b/packages/locale/locales/fr/erp.poindex c1139f9e43..dad0703fa8 100644--- a/packages/locale/locales/fr/erp.po+++ b/packages/locale/locales/fr/erp.po@@ -2435,9 +2435,6 @@ msgstr "Stock entrant confirmé — commandes d'achat et de production (barres amsgid "Confirmed outgoing stock — sales orders & job materials (bars below zero)."msgstr "Stock sortant confirmé — commandes de vente et matériaux de travail (barres en dessous de zéro)."-msgid "Confirming locks the counted quantities. Review the warnings below, then post the count to apply the adjustments."-msgstr "La confirmation verrouille les quantités comptées. Examinez les avertissements ci-dessous, puis publiez le décompte pour appliquer les ajustements."-msgid "Confirms every posted journal entry in the period has equal debits and credits. If any entry is out of balance the trial balance won't tie out, so it must be corrected before the period can close."msgstr "Confirme que chaque écriture de journal comptabilisée au cours de la période a des débits et des crédits égaux. Si une écriture est déséquilibrée, la balance de vérification ne concordera pas, elle doit donc être corrigée avant que la période puisse être clôturée."@@ -2723,6 +2720,12 @@ msgstr "Réponse correcte"msgid "Correct Answers"msgstr "Réponses correctes"+msgid "Correction"+msgstr "Correction"++msgid "Corrections"+msgstr "Corrections"+msgid "Corrective action"msgstr "Action corrective"@@ -2794,6 +2797,9 @@ msgstr "Impossible de reprogrammer le travail. Veuillez réessayer."msgid "Count"msgstr "Nombre"+msgid "Count History"+msgstr "Historique des comptages"+msgid "Count ID"msgstr "ID de comptage"@@ -8350,6 +8356,12 @@ msgstr "Commandes soumises"msgid "Origin"msgstr "Origine"+msgid "Original"+msgstr "Original"++msgid "Original Count"+msgstr "Comptage initial"+msgid "Other Income account for FX gains when a payment settles a foreign-currency invoice at a more favorable rate"msgstr "Compte de revenus divers pour les gains de change lorsqu'un paiement règle une facture en devise étrangère à un taux plus favorable"@@ -8837,6 +8849,15 @@ msgstr "Publié à"msgid "Posted By"msgstr "Publié par"+msgid "Posted once, no rectifications."+msgstr "Posté une fois, sans rectifications."++msgid "Posted once, rectified {rectifications} times."+msgstr "Posté une fois, rectifié {rectifications} fois."++msgid "Posted once, rectified 1 time."+msgstr "Posté une fois, rectifié 1 fois."+msgid "Posting"msgstr "Acomptes"@@ -9576,6 +9597,12 @@ msgstr "Enregistrements"msgid "Recovery Period"msgstr "Enregistrer"+msgid "Rectification {rectifyNumber}"+msgstr "Rectification {rectifyNumber}"++msgid "Rectify"+msgstr "Rectifier"+msgid "Redirecting to verification page..."msgstr "Redirection vers la page de vérification..."@@ -9903,6 +9930,9 @@ msgstr "Inverser les écritures comptables associées"msgid "Review the period's balance sheet and income statement and confirm the figures look right. This is a manual sign-off — mark it done once you have reviewed them."msgstr "Examinez le bilan et le compte de résultat de la période et confirmez que les chiffres semblent corrects. Ceci est une approbation manuelle — marquez-la comme terminée une fois que vous les avez examinés."+msgid "Review the warnings below, then post the count to apply the adjustments."+msgstr "Examinez les avertissements ci-dessous, puis validez le comptage pour appliquer les ajustements."+msgid "Revision"msgstr "Révision"diff --git a/packages/locale/locales/hi/erp.po b/packages/locale/locales/hi/erp.poindex 6756c5a882..17167bc04c 100644--- a/packages/locale/locales/hi/erp.po+++ b/packages/locale/locales/hi/erp.po@@ -2435,9 +2435,6 @@ msgstr "पुष्टि की गई आने वाली स्टॉकmsgid "Confirmed outgoing stock — sales orders & job materials (bars below zero)."msgstr "पुष्टि की गई आने वाली स्टॉक — बिक्री आदेश और नौकरी सामग्री (बार शून्य से नीचे)।"-msgid "Confirming locks the counted quantities. Review the warnings below, then post the count to apply the adjustments."-msgstr "पुष्टि करने से गिनी गई मात्राएं लॉक हो जाती हैं। नीचे दी गई चेतावनियों की समीक्षा करें, फिर समायोजन लागू करने के लिए गणना पोस्ट करें।"-msgid "Confirms every posted journal entry in the period has equal debits and credits. If any entry is out of balance the trial balance won't tie out, so it must be corrected before the period can close."msgstr "पुष्टि करता है कि अवधि में हर पोस्ट की गई जर्नल प्रविष्टि में बराबर डेबिट और क्रेडिट हैं। यदि कोई प्रविष्टि असंतुलित है तो ट्रायल बैलेंस मेल नहीं खाएगा, इसलिए अवधि बंद होने से पहले इसे ठीक किया जाना चाहिए।"@@ -2723,6 +2720,12 @@ msgstr "सही उत्तर"msgid "Correct Answers"msgstr "सही उत्तर"+msgid "Correction"+msgstr "सुधार"++msgid "Corrections"+msgstr "सुधार"+msgid "Corrective action"msgstr "सुधारात्मक कार्रवाई"@@ -2794,6 +2797,9 @@ msgstr "कार्य पुनर्निर्धारित नहींmsgid "Count"msgstr "गिनती"+msgid "Count History"+msgstr "गणना इतिहास"+msgid "Count ID"msgstr "गणना आईडी"@@ -8350,6 +8356,12 @@ msgstr "ऑर्डर जमा किए गए"msgid "Origin"msgstr "मूल"+msgid "Original"+msgstr "मूल"++msgid "Original Count"+msgstr "मूल गणना"+msgid "Other Income account for FX gains when a payment settles a foreign-currency invoice at a more favorable rate"msgstr "विदेशी मुद्रा लाभ के लिए अन्य आय खाता जब कोई भुगतान विदेशी-मुद्रा चालान को अधिक अनुकूल दर पर निपटाता है"@@ -8837,6 +8849,15 @@ msgstr "पोस्ट किया गया"msgid "Posted By"msgstr "द्वारा पोस्ट किया गया"+msgid "Posted once, no rectifications."+msgstr "एक बार पोस्ट किया गया, कोई सुधार नहीं।"++msgid "Posted once, rectified {rectifications} times."+msgstr "एक बार पोस्ट किया गया, {rectifications} बार सुधारा गया।"++msgid "Posted once, rectified 1 time."+msgstr "एक बार पोस्ट किया गया, 1 बार सुधारा गया।"+msgid "Posting"msgstr "अग्रिम भुगतान"@@ -9576,6 +9597,12 @@ msgstr "रिकॉर्ड"msgid "Recovery Period"msgstr "पंजीकृत करें"+msgid "Rectification {rectifyNumber}"+msgstr "सुधार {rectifyNumber}"++msgid "Rectify"+msgstr "सुधारें"+msgid "Redirecting to verification page..."msgstr "सत्यापन पृष्ठ पर पुनः निर्देशित किया जा रहा है..."@@ -9903,6 +9930,9 @@ msgstr "संबंधित जर्नल प्रविष्टियोmsgid "Review the period's balance sheet and income statement and confirm the figures look right. This is a manual sign-off — mark it done once you have reviewed them."msgstr "अवधि की बैलेंस शीट और आय विवरण की समीक्षा करें और पुष्टि करें कि आंकड़े सही लगते हैं। यह एक मैनुअल साइन-ऑफ है — एक बार समीक्षा करने के बाद इसे पूर्ण चिह्नित करें।"+msgid "Review the warnings below, then post the count to apply the adjustments."+msgstr "नीचे दी गई चेतावनियों की समीक्षा करें, फिर समायोजन लागू करने के लिए गणना पोस्ट करें।"+msgid "Revision"msgstr "संस्करण"diff --git a/packages/locale/locales/it/erp.po b/packages/locale/locales/it/erp.poindex 33c12f493b..fc09caecca 100644--- a/packages/locale/locales/it/erp.po+++ b/packages/locale/locales/it/erp.po@@ -2435,9 +2435,6 @@ msgstr "Stock in entrata confermato — ordini di acquisto e di produzione (barrmsgid "Confirmed outgoing stock — sales orders & job materials (bars below zero)."msgstr "Stock in uscita confermato — ordini di vendita e materiali di lavoro (barre sotto zero)."-msgid "Confirming locks the counted quantities. Review the warnings below, then post the count to apply the adjustments."-msgstr "La conferma blocca le quantità conteggiate. Rivedi gli avvisi di seguito, quindi pubblica il conteggio per applicare gli adeguamenti."-msgid "Confirms every posted journal entry in the period has equal debits and credits. If any entry is out of balance the trial balance won't tie out, so it must be corrected before the period can close."msgstr "Conferma che ogni registrazione contabile registrata nel periodo abbia debiti e crediti uguali. Se una registrazione è squilibrata, il bilancio di prova non sarà bilanciato, quindi deve essere corretta prima che il periodo possa chiudersi."@@ -2723,6 +2720,12 @@ msgstr "Risposta Corretta"msgid "Correct Answers"msgstr "Risposte Corrette"+msgid "Correction"+msgstr "Correzione"++msgid "Corrections"+msgstr "Correzioni"+msgid "Corrective action"msgstr "Azione correttiva"@@ -2794,6 +2797,9 @@ msgstr "Impossibile ripianificare il lavoro. Riprova."msgid "Count"msgstr "Conteggio"+msgid "Count History"+msgstr "Storico dei Conteggi"+msgid "Count ID"msgstr "ID Conteggio"@@ -8350,6 +8356,12 @@ msgstr "Ordini inviati"msgid "Origin"msgstr "Origine"+msgid "Original"+msgstr "Originale"++msgid "Original Count"+msgstr "Conteggio Originale"+msgid "Other Income account for FX gains when a payment settles a foreign-currency invoice at a more favorable rate"msgstr "Account di Altro Reddito per guadagni in valuta estera quando un pagamento regola una fattura in valuta estera a un tasso più favorevole"@@ -8837,6 +8849,15 @@ msgstr "Pubblicato il"msgid "Posted By"msgstr "Pubblicato da"+msgid "Posted once, no rectifications."+msgstr "Pubblicato una volta, nessuna rettifica."++msgid "Posted once, rectified {rectifications} times."+msgstr "Pubblicato una volta, rettificato {rectifications} volte."++msgid "Posted once, rectified 1 time."+msgstr "Pubblicato una volta, rettificato 1 volta."+msgid "Posting"msgstr "Anticipi"@@ -9576,6 +9597,12 @@ msgstr "Registri"msgid "Recovery Period"msgstr "Registrare"+msgid "Rectification {rectifyNumber}"+msgstr "Rettifica {rectifyNumber}"++msgid "Rectify"+msgstr "Rettificare"+msgid "Redirecting to verification page..."msgstr "Reindirizzamento alla pagina di verifica..."@@ -9903,6 +9930,9 @@ msgstr "Storna le relative registrazioni contabili"msgid "Review the period's balance sheet and income statement and confirm the figures look right. This is a manual sign-off — mark it done once you have reviewed them."msgstr "Rivedi il bilancio e il conto economico del periodo e conferma che i dati sembrino corretti. Questo è un completamento manuale — contrassegnalo come eseguito una volta revisionati."+msgid "Review the warnings below, then post the count to apply the adjustments."+msgstr "Rivedi gli avvisi di seguito, quindi pubblica il conteggio per applicare gli aggiustamenti."+msgid "Revision"msgstr "Revisione"diff --git a/packages/locale/locales/ja/erp.po b/packages/locale/locales/ja/erp.poindex 2fee72b70a..0f1e27821b 100644--- a/packages/locale/locales/ja/erp.po+++ b/packages/locale/locales/ja/erp.po@@ -2435,9 +2435,6 @@ msgstr "確認された入荷在庫 — 購買および生産注文(ゼロ以msgid "Confirmed outgoing stock — sales orders & job materials (bars below zero)."msgstr "確認された出荷在庫 — 販売注文とジョブ材料(ゼロ未満のバー)。"-msgid "Confirming locks the counted quantities. Review the warnings below, then post the count to apply the adjustments."-msgstr "確認すると、カウント済みの数量がロックされます。以下の警告を確認してから、カウントを転記して調整を適用してください。"-msgid "Confirms every posted journal entry in the period has equal debits and credits. If any entry is out of balance the trial balance won't tie out, so it must be corrected before the period can close."msgstr "当期中に転記されたすべての仕訳が借方と貸方で一致していることを確認します。仕訳が不均衡な場合、試算表が合致しないため、当期を終了する前に修正する必要があります。"@@ -2723,6 +2720,12 @@ msgstr "正解"msgid "Correct Answers"msgstr "正解"+msgid "Correction"+msgstr "修正"++msgid "Corrections"+msgstr "修正"+msgid "Corrective action"msgstr "是正処置"@@ -2794,6 +2797,9 @@ msgstr "ジョブを再スケジュールできませんでした。もう一度msgid "Count"msgstr "数"+msgid "Count History"+msgstr "カウント履歴"+msgid "Count ID"msgstr "カウントID"@@ -8350,6 +8356,12 @@ msgstr "注文が送信されました"msgid "Origin"msgstr "オリジン"+msgid "Original"+msgstr "元"++msgid "Original Count"+msgstr "元のカウント"+msgid "Other Income account for FX gains when a payment settles a foreign-currency invoice at a more favorable rate"msgstr "支払いが外貨建て請求書をより有利なレートで決済する場合のFX利益に対するその他の収益勘定"@@ -8837,6 +8849,15 @@ msgstr "投稿日時"msgid "Posted By"msgstr "投稿者"+msgid "Posted once, no rectifications."+msgstr "1回投稿され、修正がありません。"++msgid "Posted once, rectified {rectifications} times."+msgstr "1回投稿され、{rectifications}回修正されました。"++msgid "Posted once, rectified 1 time."+msgstr "1回投稿され、1回修正されました。"+msgid "Posting"msgstr "前払金"@@ -9576,6 +9597,12 @@ msgstr "記録"msgid "Recovery Period"msgstr "登録"+msgid "Rectification {rectifyNumber}"+msgstr "修正 {rectifyNumber}"++msgid "Rectify"+msgstr "修正"+msgid "Redirecting to verification page..."msgstr "検証ページにリダイレクト中..."@@ -9903,6 +9930,9 @@ msgstr "関連する仕訳エントリを取り消す"msgid "Review the period's balance sheet and income statement and confirm the figures look right. This is a manual sign-off — mark it done once you have reviewed them."msgstr "当期の貸借対照表と損益計算書を確認し、数字が正しいことを確認してください。これは手動による認可です。確認後、完了とマークしてください。"+msgid "Review the warnings below, then post the count to apply the adjustments."+msgstr "下の警告を確認してから、カウントを投稿して調整を適用してください。"+msgid "Revision"msgstr "リビジョン"diff --git a/packages/locale/locales/ko/erp.po b/packages/locale/locales/ko/erp.poindex 120b040e43..7d99ef471e 100644--- a/packages/locale/locales/ko/erp.po+++ b/packages/locale/locales/ko/erp.po@@ -2435,9 +2435,6 @@ msgstr "확정된 입고 재고 — 구매주문 및 생산주문(0 이상 막msgid "Confirmed outgoing stock — sales orders & job materials (bars below zero)."msgstr "확정된 출고 재고 — 판매주문 및 작업 자재(0 이하 막대)."-msgid "Confirming locks the counted quantities. Review the warnings below, then post the count to apply the adjustments."-msgstr "확정하면 실사 수량이 고정됩니다. 아래 경고를 검토한 뒤 실사를 전기하여 조정 사항을 적용하세요."-msgid "Confirms every posted journal entry in the period has equal debits and credits. If any entry is out of balance the trial balance won't tie out, so it must be corrected before the period can close."msgstr "기간 내 모든 전기된 분개의 차변과 대변이 일치하는지 확인합니다. 어떤 분개라도 불균형이면 시산표가 맞지 않으므로 기간을 종료하기 전에 수정해야 합니다."@@ -2723,6 +2720,12 @@ msgstr "정답"msgid "Correct Answers"msgstr "정답"+msgid "Correction"+msgstr "수정"++msgid "Corrections"+msgstr "수정"+msgid "Corrective action"msgstr "시정 조치"@@ -2794,6 +2797,9 @@ msgstr "작업 일정을 변경할 수 없습니다. 다시 시도하세요."msgid "Count"msgstr "실사"+msgid "Count History"+msgstr "계산 기록"+msgid "Count ID"msgstr "실사 ID"@@ -8350,6 +8356,12 @@ msgstr "제출된 주문"msgid "Origin"msgstr "출처"+msgid "Original"+msgstr "원본"++msgid "Original Count"+msgstr "원본 계산"+msgid "Other Income account for FX gains when a payment settles a foreign-currency invoice at a more favorable rate"msgstr "외화 인보이스가 더 유리한 환율로 결제될 때 발생하는 환차익에 대한 기타수익 계정"@@ -8837,6 +8849,15 @@ msgstr "전기 일시"msgid "Posted By"msgstr "전기자"+msgid "Posted once, no rectifications."+msgstr "1회 게시, 수정 없음."++msgid "Posted once, rectified {rectifications} times."+msgstr "1회 게시, {rectifications}회 수정됨."++msgid "Posted once, rectified 1 time."+msgstr "1회 게시, 1회 수정됨."+msgid "Posting"msgstr "전기"@@ -9576,6 +9597,12 @@ msgstr "레코드"msgid "Recovery Period"msgstr "회수 기간"+msgid "Rectification {rectifyNumber}"+msgstr "수정 {rectifyNumber}"++msgid "Rectify"+msgstr "수정"+msgid "Redirecting to verification page..."msgstr "인증 페이지로 이동 중..."@@ -9903,6 +9930,9 @@ msgstr "관련 분개 취소"msgid "Review the period's balance sheet and income statement and confirm the figures look right. This is a manual sign-off — mark it done once you have reviewed them."msgstr "기간의 대차대조표와 손익계산서를 검토하고 수치가 올바른지 확인하세요. 이것은 수동 승인입니다. 검토가 끝나면 완료로 표시하세요."+msgid "Review the warnings below, then post the count to apply the adjustments."+msgstr "아래의 경고를 검토한 후 계산을 게시하여 조정을 적용하세요."+msgid "Revision"msgstr "리비전"diff --git a/packages/locale/locales/pl/erp.po b/packages/locale/locales/pl/erp.poindex 325940d8c4..9b64262948 100644--- a/packages/locale/locales/pl/erp.po+++ b/packages/locale/locales/pl/erp.po@@ -2435,9 +2435,6 @@ msgstr "Potwierdzone zapasy przychodzące — zamówienia zakupu i produkcji (smsgid "Confirmed outgoing stock — sales orders & job materials (bars below zero)."msgstr "Potwierdzone zapasy wychodzące — zamówienia sprzedaży i materiały pracy (słupki poniżej zera)."-msgid "Confirming locks the counted quantities. Review the warnings below, then post the count to apply the adjustments."-msgstr "Potwierdzenie blokuje zliczone ilości. Przejrzyj ostrzeżenia poniżej, a następnie opublikuj liczenie, aby zastosować korekty."-msgid "Confirms every posted journal entry in the period has equal debits and credits. If any entry is out of balance the trial balance won't tie out, so it must be corrected before the period can close."msgstr "Potwierdza, że każdy opublikowany wpis dziennika w okresie ma równe obciążenia i kredyty. Jeśli jakiś wpis jest niezrównoważony, bilans próbny się nie zgramadzi, więc musi być poprawiony przed zamknięciem okresu."@@ -2723,6 +2720,12 @@ msgstr "Prawidłowa odpowiedź"msgid "Correct Answers"msgstr "Prawidłowe odpowiedzi"+msgid "Correction"+msgstr "Korekta"++msgid "Corrections"+msgstr "Korekty"+msgid "Corrective action"msgstr "Działanie naprawcze"@@ -2794,6 +2797,9 @@ msgstr "Nie można przeplanować zadania. Spróbuj ponownie."msgid "Count"msgstr "Liczba"+msgid "Count History"+msgstr "Historia Liczenia"+msgid "Count ID"msgstr "ID Liczenia"@@ -8350,6 +8356,12 @@ msgstr "Zamówienia przesłane"msgid "Origin"msgstr "Pochodzenie"+msgid "Original"+msgstr "Oryginalne"++msgid "Original Count"+msgstr "Oryginalne Liczenie"+msgid "Other Income account for FX gains when a payment settles a foreign-currency invoice at a more favorable rate"msgstr "Konto dochodów pozostałych dla zysków walutowych, gdy płatność rozlicza fakturę w walucie obcej po kursie bardziej korzystnym"@@ -8837,6 +8849,15 @@ msgstr "Opublikowano o"msgid "Posted By"msgstr "Opublikowano przez"+msgid "Posted once, no rectifications."+msgstr "Opublikowane raz, bez sprostowań."++msgid "Posted once, rectified {rectifications} times."+msgstr "Opublikowane raz, sprostowane {rectifications} razy."++msgid "Posted once, rectified 1 time."+msgstr "Opublikowane raz, sprostowane 1 raz."+msgid "Posting"msgstr "Przedpłaty"@@ -9576,6 +9597,12 @@ msgstr "Rekordy"msgid "Recovery Period"msgstr "Zarejestruj"+msgid "Rectification {rectifyNumber}"+msgstr "Sprostowanie {rectifyNumber}"++msgid "Rectify"+msgstr "Sprostuj"+msgid "Redirecting to verification page..."msgstr "Przekierowanie na stronę weryfikacji..."@@ -9903,6 +9930,9 @@ msgstr "Odwróć powiązane wpisy w dzienniku"msgid "Review the period's balance sheet and income statement and confirm the figures look right. This is a manual sign-off — mark it done once you have reviewed them."msgstr "Przejrzyj bilans i rachunek zysków i strat okresu i potwierdź, że liczby wyglądają prawidłowo. To jest ręczne zatwierdzenie — oznacz jako gotowe po ich przejrzeniu."+msgid "Review the warnings below, then post the count to apply the adjustments."+msgstr "Przejrzyj ostrzeżenia poniżej, a następnie opublikuj liczenie, aby zastosować korekty."+msgid "Revision"msgstr "Wersja"diff --git a/packages/locale/locales/pt/erp.po b/packages/locale/locales/pt/erp.poindex afa2c2fb66..c7ea806148 100644--- a/packages/locale/locales/pt/erp.po+++ b/packages/locale/locales/pt/erp.po@@ -2435,9 +2435,6 @@ msgstr "Estoque de entrada confirmado — pedidos de compra e produção (barrasmsgid "Confirmed outgoing stock — sales orders & job materials (bars below zero)."msgstr "Estoque de saída confirmado — pedidos de vendas e materiais de trabalho (barras abaixo de zero)."-msgid "Confirming locks the counted quantities. Review the warnings below, then post the count to apply the adjustments."-msgstr "Confirmar bloqueia as quantidades contadas. Revise os avisos abaixo e, em seguida, poste a contagem para aplicar os ajustes."-msgid "Confirms every posted journal entry in the period has equal debits and credits. If any entry is out of balance the trial balance won't tie out, so it must be corrected before the period can close."msgstr "Confirma que cada lançamento de diário lançado no período tem débitos e créditos iguais. Se algum lançamento estiver fora de equilíbrio, o balancete não se equilibrará, portanto deve ser corrigido antes do fechamento do período."@@ -2723,6 +2720,12 @@ msgstr "Resposta Correta"msgid "Correct Answers"msgstr "Respostas Corretas"+msgid "Correction"+msgstr "Correção"++msgid "Corrections"+msgstr "Correções"+msgid "Corrective action"msgstr "Ação Corretiva"@@ -2794,6 +2797,9 @@ msgstr "Não foi possível reagendar o trabalho. Por favor, tente novamente."msgid "Count"msgstr "Contagem"+msgid "Count History"+msgstr "Histórico de Contagem"+msgid "Count ID"msgstr "ID de Contagem"@@ -8350,6 +8356,12 @@ msgstr "Pedidos enviados"msgid "Origin"msgstr "Origem"+msgid "Original"+msgstr "Original"++msgid "Original Count"+msgstr "Contagem Original"+msgid "Other Income account for FX gains when a payment settles a foreign-currency invoice at a more favorable rate"msgstr "Conta de Outras Receitas para ganhos de câmbio quando um pagamento liquida uma fatura em moeda estrangeira a uma taxa mais favorável"@@ -8837,6 +8849,15 @@ msgstr "Postado em"msgid "Posted By"msgstr "Postado Por"+msgid "Posted once, no rectifications."+msgstr "Postado uma vez, sem retificações."++msgid "Posted once, rectified {rectifications} times."+msgstr "Postado uma vez, retificado {rectifications} vezes."++msgid "Posted once, rectified 1 time."+msgstr "Postado uma vez, retificado 1 vez."+msgid "Posting"msgstr "Adiantamentos"@@ -9576,6 +9597,12 @@ msgstr "Registros"msgid "Recovery Period"msgstr "Registrar"+msgid "Rectification {rectifyNumber}"+msgstr "Retificação {rectifyNumber}"++msgid "Rectify"+msgstr "Retificar"+msgid "Redirecting to verification page..."msgstr "Redirecionando para página de verificação..."@@ -9903,6 +9930,9 @@ msgstr "Reverter os lançamentos contábeis relacionados"msgid "Review the period's balance sheet and income statement and confirm the figures look right. This is a manual sign-off — mark it done once you have reviewed them."msgstr "Revise o balanço patrimonial e demonstração de resultado do período e confirme se os valores parecem corretos. Esta é uma aprovação manual — marque como concluído depois de tê-los revisado."+msgid "Review the warnings below, then post the count to apply the adjustments."+msgstr "Revise os avisos abaixo, depois poste a contagem para aplicar os ajustes."+msgid "Revision"msgstr "Revisão"diff --git a/packages/locale/locales/ru/erp.po b/packages/locale/locales/ru/erp.poindex e0a990e9b8..bfd4b214aa 100644--- a/packages/locale/locales/ru/erp.po+++ b/packages/locale/locales/ru/erp.po@@ -2435,9 +2435,6 @@ msgstr "Подтвержденный входящий запас — заказmsgid "Confirmed outgoing stock — sales orders & job materials (bars below zero)."msgstr "Подтвержденный исходящий запас — заказы на продажу и материалы работ (столбцы ниже нуля)."-msgid "Confirming locks the counted quantities. Review the warnings below, then post the count to apply the adjustments."-msgstr "Подтверждение блокирует подсчитанные количества. Проверьте предупреждения ниже, а затем опубликуйте подсчет, чтобы применить корректировки."-msgid "Confirms every posted journal entry in the period has equal debits and credits. If any entry is out of balance the trial balance won't tie out, so it must be corrected before the period can close."msgstr "Проверяет, что каждая опубликованная запись в журнале за период имеет равные дебеты и кредиты. Если какая-либо запись не сбалансирована, пробный баланс не совпадёт, поэтому её необходимо исправить перед закрытием периода."@@ -2723,6 +2720,12 @@ msgstr "Правильный ответ"msgid "Correct Answers"msgstr "Правильные ответы"+msgid "Correction"+msgstr "Исправление"++msgid "Corrections"+msgstr "Исправления"+msgid "Corrective action"msgstr "Корректирующее действие"@@ -2794,6 +2797,9 @@ msgstr "Не удалось перепланировать задание. Поmsgid "Count"msgstr "Количество"+msgid "Count History"+msgstr "История подсчета"+msgid "Count ID"msgstr "ID подсчета"@@ -8350,6 +8356,12 @@ msgstr "Заказы отправлены"msgid "Origin"msgstr "Источник"+msgid "Original"+msgstr "Оригинал"++msgid "Original Count"+msgstr "Исходный подсчет"+msgid "Other Income account for FX gains when a payment settles a foreign-currency invoice at a more favorable rate"msgstr "Счет прочих доходов для прибыли от валютных операций при расчете по иностранной валюте по более выгодному курсу"@@ -8837,6 +8849,15 @@ msgstr "Опубликовано в"msgid "Posted By"msgstr "Опубликовано"+msgid "Posted once, no rectifications."+msgstr "Опубликовано один раз, без исправлений."++msgid "Posted once, rectified {rectifications} times."+msgstr "Опубликовано один раз, исправлено {rectifications} раз(а)."++msgid "Posted once, rectified 1 time."+msgstr "Опубликовано один раз, исправлено 1 раз."+msgid "Posting"msgstr "Авансовые платежи"@@ -9576,6 +9597,12 @@ msgstr "Записи"msgid "Recovery Period"msgstr "Зарегистрировать"+msgid "Rectification {rectifyNumber}"+msgstr "Исправление {rectifyNumber}"++msgid "Rectify"+msgstr "Исправить"+msgid "Redirecting to verification page..."msgstr "Перенаправление на страницу проверки..."@@ -9903,6 +9930,9 @@ msgstr "Отменить связанные записи в журнале"msgid "Review the period's balance sheet and income statement and confirm the figures look right. This is a manual sign-off — mark it done once you have reviewed them."msgstr "Проверьте балансовый лист и отчёт о прибылях и убытках за период и подтвердите, что цифры выглядят правильно. Это ручное утверждение — отметьте как завершённое после их проверки."+msgid "Review the warnings below, then post the count to apply the adjustments."+msgstr "Просмотрите предупреждения ниже, а затем опубликуйте подсчет для применения корректировок."+msgid "Revision"msgstr "Редакция"diff --git a/packages/locale/locales/tr/erp.po b/packages/locale/locales/tr/erp.poindex 2955168fd5..4795cd33e7 100644--- a/packages/locale/locales/tr/erp.po+++ b/packages/locale/locales/tr/erp.po@@ -2435,9 +2435,6 @@ msgstr "Onaylanan gelen stok — satın alma ve üretim siparişleri (sıfırınmsgid "Confirmed outgoing stock — sales orders & job materials (bars below zero)."msgstr "Onaylanan giden stok — satış siparişleri ve iş malzemeleri (sıfırın altındaki çubuklar)."-msgid "Confirming locks the counted quantities. Review the warnings below, then post the count to apply the adjustments."-msgstr "Sayıyı onaylamak, sayılan miktarları kilitler. Aşağıdaki uyarıları gözden geçirin, ardından ayarlamaları uygulamak için sayıyı gönderin."-msgid "Confirms every posted journal entry in the period has equal debits and credits. If any entry is out of balance the trial balance won't tie out, so it must be corrected before the period can close."msgstr "Dönem içinde deftere geçen her muhasebe kaydının eşit borç ve alacak tutarlarına sahip olduğunu doğrular. Herhangi bir kayıt dengeli değilse, deneme dengesi uyuşmayacak, bu nedenle dönem kapatılmadan önce düzeltilmesi gerekir."@@ -2723,6 +2720,12 @@ msgstr "Doğru Cevap"msgid "Correct Answers"msgstr "Doğru Cevaplar"+msgid "Correction"+msgstr "Düzeltme"++msgid "Corrections"+msgstr "Düzeltmeler"+msgid "Corrective action"msgstr "Düzeltici Eylem"@@ -2794,6 +2797,9 @@ msgstr "İş yeniden planlanamadı. Lütfen tekrar deneyin."msgid "Count"msgstr "Adet"+msgid "Count History"+msgstr "Sayım Geçmişi"+msgid "Count ID"msgstr "Sayım Kimliği"@@ -8350,6 +8356,12 @@ msgstr "Siparişler gönderildi"msgid "Origin"msgstr "Kaynak"+msgid "Original"+msgstr "Orijinal"++msgid "Original Count"+msgstr "Orijinal Sayım"+msgid "Other Income account for FX gains when a payment settles a foreign-currency invoice at a more favorable rate"msgstr "Bir ödeme yabancı para birimindeki bir faturayı daha uygun bir oranda kapatırken FX kazançları için Diğer Gelir hesabı"@@ -8837,6 +8849,15 @@ msgstr "Gönderilen Tarih"msgid "Posted By"msgstr "Gönderen"+msgid "Posted once, no rectifications."+msgstr "Bir kez gönderildi, düzeltme yapılmadı."++msgid "Posted once, rectified {rectifications} times."+msgstr "Bir kez gönderildi, {rectifications} kez düzeltildi."++msgid "Posted once, rectified 1 time."+msgstr "Bir kez gönderildi, 1 kez düzeltildi."+msgid "Posting"msgstr "Ön Ödemeler"@@ -9576,6 +9597,12 @@ msgstr "Kayıtlar"msgid "Recovery Period"msgstr "Kayıt Yap"+msgid "Rectification {rectifyNumber}"+msgstr "Düzeltme {rectifyNumber}"++msgid "Rectify"+msgstr "Düzelt"+msgid "Redirecting to verification page..."msgstr "Doğrulama sayfasına yönlendiriliyor..."@@ -9903,6 +9930,9 @@ msgstr "İlgili günlük girişlerini tersine çevir"msgid "Review the period's balance sheet and income statement and confirm the figures look right. This is a manual sign-off — mark it done once you have reviewed them."msgstr "Dönemin bilançosunu ve gelir tablosunu gözden geçirin ve rakamların doğru göründüğünü doğrulayın. Bu manuel bir onay — bunları gözden geçirdikten sonra bitti olarak işaretleyin."+msgid "Review the warnings below, then post the count to apply the adjustments."+msgstr "Aşağıdaki uyarıları gözden geçirin, ardından ayarlamaları uygulamak için sayımı gönderin."+msgid "Revision"msgstr "Revizyon"diff --git a/packages/locale/locales/zh/erp.po b/packages/locale/locales/zh/erp.poindex 0171ea0b88..04458859ec 100644--- a/packages/locale/locales/zh/erp.po+++ b/packages/locale/locales/zh/erp.po@@ -2435,9 +2435,6 @@ msgstr "确认的入库存货 — 采购和生产订单(零以上的条形图msgid "Confirmed outgoing stock — sales orders & job materials (bars below zero)."msgstr "确认的出库存货 — 销售订单和工作物料(零以下的条形图)。"-msgid "Confirming locks the counted quantities. Review the warnings below, then post the count to apply the adjustments."-msgstr "确认将锁定计数数量。查看下面的警告,然后发布计数以应用调整。"-msgid "Confirms every posted journal entry in the period has equal debits and credits. If any entry is out of balance the trial balance won't tie out, so it must be corrected before the period can close."msgstr "确认期间内每笔已过账日记账条目都有相等的借贷金额。如果任何条目不平衡,试算平衡表将无法对账,因此必须在期间结束前进行更正。"@@ -2723,6 +2720,12 @@ msgstr "正确答案"msgid "Correct Answers"msgstr "正确答案"+msgid "Correction"+msgstr "纠正"++msgid "Corrections"+msgstr "纠正"+msgid "Corrective action"msgstr "纠正措施"@@ -2794,6 +2797,9 @@ msgstr "无法重新安排作业。请重试。"msgid "Count"msgstr "数量"+msgid "Count History"+msgstr "盘点历史"+msgid "Count ID"msgstr "盘点ID"@@ -8350,6 +8356,12 @@ msgstr "订单已提交"msgid "Origin"msgstr "来源"+msgid "Original"+msgstr "原始"++msgid "Original Count"+msgstr "原始盘点"+msgid "Other Income account for FX gains when a payment settles a foreign-currency invoice at a more favorable rate"msgstr "当付款以更优惠的汇率结清外币发票时,外汇收益的其他收入账户"@@ -8837,6 +8849,15 @@ msgstr "发布于"msgid "Posted By"msgstr "发布者"+msgid "Posted once, no rectifications."+msgstr "已过账一次,无纠正。"++msgid "Posted once, rectified {rectifications} times."+msgstr "已过账一次,已纠正 {rectifications} 次。"++msgid "Posted once, rectified 1 time."+msgstr "已过账一次,已纠正 1 次。"+msgid "Posting"msgstr "预付款"@@ -9576,6 +9597,12 @@ msgstr "记录"msgid "Recovery Period"msgstr "注册"+msgid "Rectification {rectifyNumber}"+msgstr "纠正 {rectifyNumber}"++msgid "Rectify"+msgstr "纠正"+msgid "Redirecting to verification page..."msgstr "正在重定向到验证页面..."@@ -9903,6 +9930,9 @@ msgstr "反转相关日记账分录"msgid "Review the period's balance sheet and income statement and confirm the figures look right. This is a manual sign-off — mark it done once you have reviewed them."msgstr "审查期间的资产负债表和损益表,并确认数字正确。这是手动签核 — 审查后标记为完成。"+msgid "Review the warnings below, then post the count to apply the adjustments."+msgstr "查看下面的警告,然后过账盘点以应用调整。"+msgid "Revision"msgstr "修订版"diff --git a/packages/logger/package.json b/packages/logger/package.jsonindex 16e57e3eab..7fd3c006c8 100644--- a/packages/logger/package.json+++ b/packages/logger/package.json@@ -3,7 +3,7 @@"dependencies": {"@logtape/logtape": "catalog:","@logtape/redaction": "catalog:",- "nanoid": "catalog:"+ "@paralleldrive/cuid2": "catalog:"},"peerDependencies": {"react-router": "catalog:"diff --git a/packages/logger/src/middleware.server.ts b/packages/logger/src/middleware.server.tsindex b60af71338..e26a7c7f23 100644--- a/packages/logger/src/middleware.server.ts+++ b/packages/logger/src/middleware.server.ts@@ -1,6 +1,6 @@import { withContext } from "@logtape/logtape";import { DEFAULT_REDACT_FIELDS } from "@logtape/redaction";-import { nanoid } from "nanoid";+import { createId } from "@paralleldrive/cuid2";import {createContext,type MiddlewareFunction,@@ -131,7 +131,7 @@ export const requestIdMiddleware: MiddlewareFunction<Response> = async ({ request, context },next) => {- const requestId = request.headers.get(REQUEST_ID_HEADER) ?? nanoid();+ const requestId = request.headers.get(REQUEST_ID_HEADER) ?? createId();context.set(requestIdContext, requestId);const { method } = request;diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 1eb9cc7f66..2beace32e1 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -54,6 +54,9 @@ catalogs:'@nanostores/react':specifier: 0.7.3version: 0.7.3+ '@paralleldrive/cuid2':+ specifier: 2.2.2+ version: 2.2.2'@react-aria/i18n':specifier: 3.12.16version: 3.12.16@@ -301,7 +304,7 @@ importers:version: 1.40.0'@react-router/remix-routes-option-adapter':specifier: 'catalog:'- version: 7.15.1(@react-router/[email protected](patch_hash=77f56df34c4642159bb889b71903a3953827448e994174779d32db487727da95)(@react-router/[email protected]([email protected]([email protected]([email protected]))([email protected]))([email protected]))(@types/[email protected])([email protected])([email protected])([email protected])([email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected]))([email protected])+ version: 7.15.1(@react-router/[email protected](patch_hash=77f56df34c4642159bb889b71903a3953827448e994174779d32db487727da95)(@react-router/[email protected]([email protected]([email protected]([email protected]))([email protected]))([email protected]))(@types/[email protected])([email protected])([email protected])([email protected])([email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected]))([email protected])cookie:specifier: 'catalog:'version: 1.1.1@@ -338,7 +341,7 @@ importers:version: 5.9.4([email protected])([email protected])'@react-router/dev':specifier: 'catalog:'- version: 7.15.1(patch_hash=77f56df34c4642159bb889b71903a3953827448e994174779d32db487727da95)(@react-router/[email protected]([email protected]([email protected]([email protected]))([email protected]))([email protected]))(@types/[email protected])([email protected])([email protected])([email protected])([email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])+ version: 7.15.1(patch_hash=77f56df34c4642159bb889b71903a3953827448e994174779d32db487727da95)(@react-router/[email protected]([email protected]([email protected]([email protected]))([email protected]))([email protected]))(@types/[email protected])([email protected])([email protected])([email protected])([email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])'@types/aws-lambda':specifier: 8.10.152version: 8.10.152@@ -389,7 +392,7 @@ importers:version: 5.8.3vite-plugin-babel-macros:specifier: 'catalog:'- version: 1.0.6([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))+ version: 1.0.6([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))optionalDependencies:'@rollup/rollup-linux-x64-gnu':specifier: 4.60.1@@ -775,7 +778,7 @@ importers:version: 11.18.2(@emotion/[email protected])([email protected]([email protected]))([email protected])inngest:specifier: ^3.52.7- version: 3.54.0(@opentelemetry/[email protected](@opentelemetry/[email protected]))([email protected])([email protected])([email protected])([email protected](@babel/[email protected])(@opentelemetry/[email protected])([email protected])([email protected]([email protected]))([email protected]))([email protected])([email protected])+ version: 3.54.0(@opentelemetry/[email protected](@opentelemetry/[email protected]))([email protected])([email protected])([email protected])([email protected](@babel/[email protected])(@opentelemetry/[email protected])([email protected])([email protected]([email protected]))([email protected]))([email protected])([email protected])intl-parse-accept-language:specifier: 'catalog:'version: 1.0.0@@ -1121,7 +1124,7 @@ importers:version: 5.9.4(@lingui/[email protected]([email protected])([email protected]))([email protected])([email protected])'@lingui/vite-plugin':specifier: 'catalog:'- version: 5.9.4([email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))+ version: 5.9.4([email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))'@nanostores/react':specifier: 'catalog:'version: 0.7.3([email protected])([email protected])@@ -1133,10 +1136,10 @@ importers:version: 3.4.5([email protected])([email protected])'@react-router/dev':specifier: 'catalog:'- version: 7.15.1(patch_hash=77f56df34c4642159bb889b71903a3953827448e994174779d32db487727da95)(@react-router/[email protected]([email protected]([email protected]([email protected]))([email protected]))([email protected]))(@types/[email protected])([email protected])([email protected])([email protected])([email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])+ version: 7.15.1(patch_hash=77f56df34c4642159bb889b71903a3953827448e994174779d32db487727da95)(@react-router/[email protected]([email protected]([email protected]([email protected]))([email protected]))([email protected]))(@types/[email protected])([email protected])([email protected])([email protected])([email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])'@react-router/remix-routes-option-adapter':specifier: 'catalog:'- version: 7.15.1(@react-router/[email protected](patch_hash=77f56df34c4642159bb889b71903a3953827448e994174779d32db487727da95)(@react-router/[email protected]([email protected]([email protected]([email protected]))([email protected]))([email protected]))(@types/[email protected])([email protected])([email protected])([email protected])([email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected]))([email protected])+ version: 7.15.1(@react-router/[email protected](patch_hash=77f56df34c4642159bb889b71903a3953827448e994174779d32db487727da95)(@react-router/[email protected]([email protected]([email protected]([email protected]))([email protected]))([email protected]))(@types/[email protected])([email protected])([email protected])([email protected])([email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected]))([email protected])'@react-router/serve':specifier: 'catalog:'version: 7.15.1([email protected]([email protected]([email protected]))([email protected]))([email protected])@@ -1157,7 +1160,7 @@ importers:version: 0.5.19([email protected])'@tailwindcss/vite':specifier: 'catalog:'- version: 4.3.0([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))+ version: 4.3.0([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))'@tiptap/core':specifier: 'catalog:'version: 2.27.2(@tiptap/[email protected])@@ -1199,7 +1202,7 @@ importers:version: 1.6.1([email protected](@babel/[email protected])(@opentelemetry/[email protected])([email protected])([email protected]([email protected]))([email protected]))([email protected])'@vercel/react-router':specifier: 'catalog:'- version: 1.2.6(@react-router/[email protected](patch_hash=77f56df34c4642159bb889b71903a3953827448e994174779d32db487727da95)(@react-router/[email protected]([email protected]([email protected]([email protected]))([email protected]))([email protected]))(@types/[email protected])([email protected])([email protected])([email protected])([email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected]))(@react-router/[email protected]([email protected]([email protected]([email protected]))([email protected]))([email protected]))([email protected])([email protected]([email protected]))([email protected])+ version: 1.2.6(@react-router/[email protected](patch_hash=77f56df34c4642159bb889b71903a3953827448e994174779d32db487727da95)(@react-router/[email protected]([email protected]([email protected]([email protected]))([email protected]))([email protected]))(@types/[email protected])([email protected])([email protected])([email protected])([email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected]))(@react-router/[email protected]([email protected]([email protected]([email protected]))([email protected]))([email protected]))([email protected])([email protected]([email protected]))([email protected])'@xyflow/react':specifier: 12.10.2version: 12.10.2(@types/[email protected])([email protected])([email protected]([email protected]))([email protected])@@ -1317,13 +1320,13 @@ importers:version: 5.8.3vite:specifier: 'catalog:'- version: 8.0.10(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])+ version: 8.0.10(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])vite-plugin-babel-macros:specifier: 'catalog:'- version: 1.0.6([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))+ version: 1.0.6([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))vitest:specifier: 'catalog:'- version: 4.1.6(@opentelemetry/[email protected])(@types/[email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))+ version: 4.1.6(@opentelemetry/[email protected])(@types/[email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))wait-on:specifier: 'catalog:'version: 7.2.0@@ -2701,9 +2704,9 @@ importers:'@logtape/redaction':specifier: 'catalog:'version: 2.2.3(@logtape/[email protected])- nanoid:+ '@paralleldrive/cuid2':specifier: 'catalog:'- version: 5.1.7+ version: 2.2.2devDependencies:'@carbon/config':specifier: workspace:*@@ -6273,6 +6276,9 @@ packages:'@paper-design/[email protected]':resolution: {integrity: sha512-2bV7CqLcfA9paFOdH0a5NQuqzyAKep4Zf5j7ll78bCV6lzFz5/z0TMjduR+cd+DrSWGzdJfVQE8QC7f7AmcQQQ==}+ '@paralleldrive/[email protected]':+ resolution: {integrity: sha512-ZOBkgDwEdoYVlSeRbYYXs0S9MejQofiVYoTbKzy/6GQa39/q5tQU2IX46+shYnUkpEl3wc+J6wRlar7r2EK2xA==}+'@pdf-lib/[email protected]':resolution: {integrity: sha512-hU30BK9IUN/su0Mn9VdlVKsWBS6GyhVfqjwl1FjZN4TxP6cCw0jP2w7V3Hf5uX7M0AZJ16vey9yE0ny7Sa59ZA==}@@ -16967,7 +16973,7 @@ snapshots:'@babel/traverse': 7.29.0'@babel/types': 7.29.0convert-source-map: 2.0.0- debug: 4.4.3([email protected])+ debug: 4.4.3([email protected])gensync: 1.0.0-beta.2json5: 2.2.3semver: 7.7.4@@ -16987,7 +16993,7 @@ snapshots:'@babel/types': 7.29.0'@jridgewell/remapping': 2.3.5convert-source-map: 2.0.0- debug: 4.4.3([email protected])+ debug: 4.4.3([email protected])gensync: 1.0.0-beta.2json5: 2.2.3semver: 7.7.4@@ -17157,7 +17163,7 @@ snapshots:'@babel/parser': 7.29.2'@babel/template': 7.28.6'@babel/types': 7.29.0- debug: 4.4.3([email protected])+ debug: 4.4.3([email protected])globals: 11.12.0transitivePeerDependencies:- supports-color@@ -17170,7 +17176,7 @@ snapshots:'@babel/parser': 7.29.2'@babel/template': 7.28.6'@babel/types': 7.29.0- debug: 4.4.3([email protected])+ debug: 4.4.3([email protected])transitivePeerDependencies:- supports-color@@ -18218,6 +18224,16 @@ snapshots:transitivePeerDependencies:- typescript+ '@lingui/[email protected]([email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))':+ dependencies:+ '@lingui/cli': 5.9.4([email protected])([email protected])+ '@lingui/conf': 5.9.4([email protected])+ vite: 8.0.10(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])+ transitivePeerDependencies:+ - babel-plugin-macros+ - supports-color+ - typescript+'@lingui/[email protected]([email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))':dependencies:'@lingui/cli': 5.9.4([email protected])([email protected])@@ -18579,7 +18595,7 @@ snapshots:dependencies:'@oclif/core': 4.11.7ansis: 3.17.0- debug: 4.4.3([email protected])+ debug: 4.4.3([email protected])npm: 11.17.0npm-package-arg: 11.0.3npm-run-path: 5.3.0@@ -19355,6 +19371,10 @@ snapshots:'@paper-design/[email protected]': {}+ '@paralleldrive/[email protected]':+ dependencies:+ '@noble/hashes': 1.8.0+'@pdf-lib/[email protected]':dependencies:pako: 1.0.11@@ -21892,7 +21912,7 @@ snapshots:'@react-pdf/primitives': 4.2.0'@react-pdf/stylesheet': 6.1.4- '@react-router/[email protected](patch_hash=77f56df34c4642159bb889b71903a3953827448e994174779d32db487727da95)(@react-router/[email protected]([email protected]([email protected]([email protected]))([email protected]))([email protected]))(@types/[email protected])([email protected])([email protected])([email protected])([email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])':+ '@react-router/[email protected](patch_hash=77f56df34c4642159bb889b71903a3953827448e994174779d32db487727da95)(@react-router/[email protected]([email protected]([email protected]([email protected]))([email protected]))([email protected]))(@types/[email protected])([email protected])([email protected])([email protected])([email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])':dependencies:'@babel/core': 7.29.0'@babel/generator': 7.29.1@@ -21922,7 +21942,7 @@ snapshots:semver: 7.7.4tinyglobby: 0.2.17valibot: 1.3.1([email protected])- vite: 8.0.10(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])+ vite: 8.0.10(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])vite-node: 3.2.4(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])optionalDependencies:'@react-router/serve': 7.15.1([email protected]([email protected]([email protected]))([email protected]))([email protected])@@ -21942,6 +21962,56 @@ snapshots:- tsx- yaml+ '@react-router/[email protected](patch_hash=77f56df34c4642159bb889b71903a3953827448e994174779d32db487727da95)(@react-router/[email protected]([email protected]([email protected]([email protected]))([email protected]))([email protected]))(@types/[email protected])([email protected])([email protected])([email protected])([email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])':+ dependencies:+ '@babel/core': 7.29.0+ '@babel/generator': 7.29.1+ '@babel/parser': 7.29.2+ '@babel/plugin-syntax-jsx': 7.28.6(@babel/[email protected])+ '@babel/preset-typescript': 7.28.5(@babel/[email protected])+ '@babel/traverse': 7.29.0+ '@babel/types': 7.29.0+ '@react-router/node': 7.15.1([email protected]([email protected]([email protected]))([email protected]))([email protected])+ '@remix-run/node-fetch-server': 0.13.1+ arg: 5.0.2+ babel-dead-code-elimination: 1.0.12+ chokidar: 4.0.3+ dedent: 1.7.2([email protected])+ es-module-lexer: 1.7.0+ exit-hook: 2.2.1+ isbot: 5.1.37+ jsesc: 3.0.2+ lodash: 4.17.21+ p-map: 7.0.4+ pathe: 1.1.2+ picocolors: 1.1.1+ pkg-types: 2.3.0+ prettier: 3.8.1+ react-refresh: 0.14.2+ semver: 7.7.4+ tinyglobby: 0.2.17+ valibot: 1.3.1([email protected])+ vite: 8.0.10(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])+ vite-node: 3.2.4(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])+ optionalDependencies:+ '@react-router/serve': 7.15.1([email protected]([email protected]([email protected]))([email protected]))([email protected])+ typescript: 5.8.3+ transitivePeerDependencies:+ - '@types/node'+ - babel-plugin-macros+ - jiti+ - less+ - lightningcss+ - sass+ - sass-embedded+ - stylus+ - sugarss+ - supports-color+ - terser+ - tsx+ - yaml+'@react-router/[email protected](patch_hash=77f56df34c4642159bb889b71903a3953827448e994174779d32db487727da95)(@react-router/[email protected]([email protected]([email protected]([email protected]))([email protected]))([email protected]))(@types/[email protected])([email protected])([email protected])([email protected])([email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])':dependencies:'@babel/core': 7.29.0@@ -22014,9 +22084,15 @@ snapshots:optionalDependencies:typescript: 5.8.3- '@react-router/[email protected](@react-router/[email protected](patch_hash=77f56df34c4642159bb889b71903a3953827448e994174779d32db487727da95)(@react-router/[email protected]([email protected]([email protected]([email protected]))([email protected]))([email protected]))(@types/[email protected])([email protected])([email protected])([email protected])([email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected]))([email protected])':+ '@react-router/[email protected](@react-router/[email protected](patch_hash=77f56df34c4642159bb889b71903a3953827448e994174779d32db487727da95)(@react-router/[email protected]([email protected]([email protected]([email protected]))([email protected]))([email protected]))(@types/[email protected])([email protected])([email protected])([email protected])([email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected]))([email protected])':+ dependencies:+ '@react-router/dev': 7.15.1(patch_hash=77f56df34c4642159bb889b71903a3953827448e994174779d32db487727da95)(@react-router/[email protected]([email protected]([email protected]([email protected]))([email protected]))([email protected]))(@types/[email protected])([email protected])([email protected])([email protected])([email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])+ optionalDependencies:+ typescript: 5.8.3++ '@react-router/[email protected](@react-router/[email protected](patch_hash=77f56df34c4642159bb889b71903a3953827448e994174779d32db487727da95)(@react-router/[email protected]([email protected]([email protected]([email protected]))([email protected]))([email protected]))(@types/[email protected])([email protected])([email protected])([email protected])([email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected]))([email protected])':dependencies:- '@react-router/dev': 7.15.1(patch_hash=77f56df34c4642159bb889b71903a3953827448e994174779d32db487727da95)(@react-router/[email protected]([email protected]([email protected]([email protected]))([email protected]))([email protected]))(@types/[email protected])([email protected])([email protected])([email protected])([email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])+ '@react-router/dev': 7.15.1(patch_hash=77f56df34c4642159bb889b71903a3953827448e994174779d32db487727da95)(@react-router/[email protected]([email protected]([email protected]([email protected]))([email protected]))([email protected]))(@types/[email protected])([email protected])([email protected])([email protected])([email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])optionalDependencies:typescript: 5.8.3@@ -23306,6 +23382,13 @@ snapshots:postcss-selector-parser: 6.0.10tailwindcss: 4.3.0+ '@tailwindcss/[email protected]([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))':+ dependencies:+ '@tailwindcss/node': 4.3.0+ '@tailwindcss/oxide': 4.3.0+ tailwindcss: 4.3.0+ vite: 8.0.10(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])+'@tailwindcss/[email protected]([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))':dependencies:'@tailwindcss/node': 4.3.0@@ -24173,6 +24256,16 @@ snapshots:'@vercel/[email protected]': {}+ '@vercel/[email protected](@react-router/[email protected](patch_hash=77f56df34c4642159bb889b71903a3953827448e994174779d32db487727da95)(@react-router/[email protected]([email protected]([email protected]([email protected]))([email protected]))([email protected]))(@types/[email protected])([email protected])([email protected])([email protected])([email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected]))(@react-router/[email protected]([email protected]([email protected]([email protected]))([email protected]))([email protected]))([email protected])([email protected]([email protected]))([email protected])':+ dependencies:+ '@react-router/dev': 7.15.1(patch_hash=77f56df34c4642159bb889b71903a3953827448e994174779d32db487727da95)(@react-router/[email protected]([email protected]([email protected]([email protected]))([email protected]))([email protected]))(@types/[email protected])([email protected])([email protected])([email protected])([email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])+ '@react-router/node': 7.15.1([email protected]([email protected]([email protected]))([email protected]))([email protected])+ '@vercel/static-config': 3.2.0+ isbot: 5.1.37+ react: 18.3.1+ react-dom: 18.3.1([email protected])+ ts-morph: 12.0.0+'@vercel/[email protected](@react-router/[email protected](patch_hash=77f56df34c4642159bb889b71903a3953827448e994174779d32db487727da95)(@react-router/[email protected]([email protected]([email protected]([email protected]))([email protected]))([email protected]))(@types/[email protected])([email protected])([email protected])([email protected])([email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected]))(@react-router/[email protected]([email protected]([email protected]([email protected]))([email protected]))([email protected]))([email protected])([email protected]([email protected]))([email protected])':dependencies:'@react-router/dev': 7.15.1(patch_hash=77f56df34c4642159bb889b71903a3953827448e994174779d32db487727da95)(@react-router/[email protected]([email protected]([email protected]([email protected]))([email protected]))([email protected]))(@types/[email protected])([email protected])([email protected])([email protected])([email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])@@ -24311,6 +24404,14 @@ snapshots:optionalDependencies:vite: 8.0.10(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])+ '@vitest/[email protected]([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))':+ dependencies:+ '@vitest/spy': 4.1.6+ estree-walker: 3.0.3+ magic-string: 0.30.21+ optionalDependencies:+ vite: 8.0.10(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])+'@vitest/[email protected]([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))':dependencies:'@vitest/spy': 4.1.6@@ -24780,7 +24881,7 @@ snapshots:dependencies:bytes: 3.1.2content-type: 1.0.5- debug: 4.4.3([email protected])+ debug: 4.4.3([email protected])http-errors: 2.0.1iconv-lite: 0.7.2on-finished: 2.4.1@@ -25656,7 +25757,7 @@ snapshots:dependencies:'@socket.io/component-emitter': 3.1.2- debug: 4.4.3([email protected])+ debug: 4.4.3([email protected])engine.io-parser: 5.2.3ws: 8.21.0xmlhttprequest-ssl: 2.1.2@@ -25676,7 +25777,7 @@ snapshots:base64id: 2.0.0cookie: 0.7.2cors: 2.8.6- debug: 4.4.3([email protected])+ debug: 4.4.3([email protected])engine.io-parser: 5.2.3ws: 8.21.0transitivePeerDependencies:@@ -26093,7 +26194,7 @@ snapshots:content-type: 1.0.5cookie: 0.7.2cookie-signature: 1.2.2- debug: 4.4.3([email protected])+ debug: 4.4.3([email protected])depd: 2.0.0encodeurl: 2.0.0escape-html: 1.0.3@@ -26222,7 +26323,7 @@ snapshots:dependencies:- debug: 4.4.3([email protected])+ debug: 4.4.3([email protected])encodeurl: 2.0.0escape-html: 1.0.3on-finished: 2.4.1@@ -26788,14 +26889,14 @@ snapshots:dependencies:agent-base: 7.1.4- debug: 4.4.3([email protected])+ debug: 4.4.3([email protected])transitivePeerDependencies:- supports-colordependencies:agent-base: 9.0.0- debug: 4.4.3([email protected])+ debug: 4.4.3([email protected])transitivePeerDependencies:- supports-color@@ -26889,44 +26990,6 @@ snapshots:- [email protected](@opentelemetry/[email protected](@opentelemetry/[email protected]))([email protected])([email protected])([email protected])([email protected](@babel/[email protected])(@opentelemetry/[email protected])([email protected])([email protected]([email protected]))([email protected]))([email protected])([email protected]):- dependencies:- '@bufbuild/protobuf': 2.11.0- '@inngest/ai': 0.1.7- '@jpwilliams/waitgroup': 2.1.1- '@opentelemetry/api': 1.9.0- '@opentelemetry/auto-instrumentations-node': 0.72.0(@opentelemetry/[email protected])(@opentelemetry/[email protected](@opentelemetry/[email protected]))- '@opentelemetry/context-async-hooks': 2.6.1(@opentelemetry/[email protected])- '@opentelemetry/exporter-trace-otlp-http': 0.214.0(@opentelemetry/[email protected])- '@opentelemetry/instrumentation': 0.214.0(@opentelemetry/[email protected])- '@opentelemetry/resources': 2.6.1(@opentelemetry/[email protected])- '@opentelemetry/sdk-trace-base': 2.6.1(@opentelemetry/[email protected])- '@standard-schema/spec': 1.1.0- '@traceloop/instrumentation-anthropic': 0.20.0- '@types/debug': 4.1.13- '@types/ms': 2.1.0- canonicalize: 1.0.8- chalk: 4.1.2- cross-fetch: 4.1.0([email protected])- debug: 4.4.3([email protected])- hash.js: 1.1.7- json-stringify-safe: 5.0.1- ms: 2.1.3- serialize-error-cjs: 0.1.4- strip-ansi: 5.2.0- temporal-polyfill: 0.2.5- ulid: 2.4.0- zod: 3.25.76- optionalDependencies:- express: 4.22.1- hono: 4.12.14- next: 16.2.3(@babel/[email protected])(@opentelemetry/[email protected])([email protected])([email protected]([email protected]))([email protected])- typescript: 5.8.3- transitivePeerDependencies:- - '@opentelemetry/core'- - encoding- - supports-color-[email protected](@opentelemetry/[email protected](@opentelemetry/[email protected]))([email protected])([email protected])([email protected])([email protected](@babel/[email protected])(@opentelemetry/[email protected])([email protected])([email protected]([email protected]))([email protected]))([email protected])([email protected]):dependencies:'@bufbuild/protobuf': 2.11.0@@ -26946,7 +27009,7 @@ snapshots:canonicalize: 1.0.8chalk: 4.1.2cross-fetch: 4.1.0([email protected])- debug: 4.4.3([email protected])+ debug: 4.4.3([email protected])hash.js: 1.1.7json-stringify-safe: 5.0.1ms: 2.1.3@@ -27008,7 +27071,7 @@ snapshots:dependencies:'@ioredis/commands': 1.5.1cluster-key-slot: 1.1.2- debug: 4.4.3([email protected])+ debug: 4.4.3([email protected])denque: 2.1.0lodash.defaults: 4.2.0lodash.isarguments: 3.1.0@@ -28106,7 +28169,7 @@ snapshots:dependencies:'@types/debug': 4.1.13- debug: 4.4.3([email protected])+ debug: 4.4.3([email protected])decode-named-character-reference: 1.3.0devlop: 1.1.0micromark-core-commonmark: 2.0.3@@ -29688,7 +29751,7 @@ snapshots:dependencies:- debug: 4.4.3([email protected])+ debug: 4.4.3([email protected])module-details-from-path: 1.0.4resolve: 1.22.11transitivePeerDependencies:@@ -29696,7 +29759,7 @@ snapshots:dependencies:- debug: 4.4.3([email protected])+ debug: 4.4.3([email protected])module-details-from-path: 1.0.4transitivePeerDependencies:- supports-color@@ -29807,7 +29870,7 @@ snapshots:dependencies:- debug: 4.4.3([email protected])+ debug: 4.4.3([email protected])depd: 2.0.0is-promise: 4.0.0parseurl: 1.3.3@@ -29915,7 +29978,7 @@ snapshots:dependencies:- debug: 4.4.3([email protected])+ debug: 4.4.3([email protected])encodeurl: 2.0.0escape-html: 1.0.3etag: 1.8.1@@ -30122,7 +30185,7 @@ snapshots:dependencies:- debug: 4.4.3([email protected])+ debug: 4.4.3([email protected])ws: 8.21.0transitivePeerDependencies:- bufferutil@@ -30143,7 +30206,7 @@ snapshots:dependencies:'@socket.io/component-emitter': 3.1.2- debug: 4.4.3([email protected])+ debug: 4.4.3([email protected])transitivePeerDependencies:- supports-color@@ -30152,7 +30215,7 @@ snapshots:accepts: 1.3.8base64id: 2.0.0cors: 2.8.6- debug: 4.4.3([email protected])+ debug: 4.4.3([email protected])engine.io: 6.6.9socket.io-adapter: 2.5.8socket.io-parser: 4.2.6@@ -30613,7 +30676,7 @@ snapshots:dependencies:callsites: 3.1.0- debug: 4.4.3([email protected])+ debug: 4.4.3([email protected])is-observable: 2.1.0observable-fns: 0.6.1optionalDependencies:@@ -30759,7 +30822,7 @@ snapshots:cac: 6.7.14chokidar: 4.0.3consola: 3.4.2- debug: 4.4.3([email protected])+ debug: 4.4.3([email protected])esbuild: 0.27.7fix-dts-default-cjs-exports: 1.0.1joycon: 3.1.1@@ -30787,7 +30850,7 @@ snapshots:cac: 6.7.14chokidar: 4.0.3consola: 3.4.2- debug: 4.4.3([email protected])+ debug: 4.4.3([email protected])esbuild: 0.27.7fix-dts-default-cjs-exports: 1.0.1joycon: 3.1.1@@ -31072,7 +31135,7 @@ snapshots:[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]):dependencies:cac: 6.7.14- debug: 4.4.3([email protected])+ debug: 4.4.3([email protected])es-module-lexer: 1.7.0pathe: 2.0.3vite: 7.3.2(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])@@ -31093,7 +31156,7 @@ snapshots:[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]):dependencies:cac: 6.7.14- debug: 4.4.3([email protected])+ debug: 4.4.3([email protected])es-module-lexer: 1.7.0pathe: 2.0.3vite: 7.3.2(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])@@ -31111,14 +31174,25 @@ snapshots:- tsx- yaml- [email protected]([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])):+ [email protected]([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])):dependencies:'@babel/core': 7.29.0'@babel/plugin-syntax-jsx': 7.28.6(@babel/[email protected])'@babel/plugin-syntax-typescript': 7.28.6(@babel/[email protected])'@types/babel__core': 7.20.5babel-plugin-macros: 3.1.0- vite: 8.0.10(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])+ vite: 8.0.10(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])+ transitivePeerDependencies:+ - supports-color++ [email protected]([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])):+ dependencies:+ '@babel/core': 7.29.0+ '@babel/plugin-syntax-jsx': 7.28.6(@babel/[email protected])+ '@babel/plugin-syntax-typescript': 7.28.6(@babel/[email protected])+ '@types/babel__core': 7.20.5+ babel-plugin-macros: 3.1.0+ vite: 8.0.10(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])transitivePeerDependencies:- supports-color@@ -31216,7 +31290,7 @@ snapshots:tsx: 4.21.0yaml: 2.8.3- [email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]):+ [email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]):dependencies:lightningcss: 1.32.0picomatch: 4.0.4@@ -31225,14 +31299,14 @@ snapshots:tinyglobby: 0.2.17optionalDependencies:'@types/node': 24.12.2- esbuild: 0.27.7+ esbuild: 0.28.0fsevents: 2.3.3jiti: 2.7.0terser: 5.48.0tsx: 4.21.0yaml: 2.8.3- [email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]):+ [email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]):dependencies:lightningcss: 1.32.0picomatch: 4.0.4@@ -31240,8 +31314,8 @@ snapshots:rolldown: 1.0.0-rc.17tinyglobby: 0.2.17optionalDependencies:- '@types/node': 24.12.2- esbuild: 0.28.0+ '@types/node': 26.1.0+ esbuild: 0.27.7fsevents: 2.3.3jiti: 2.7.0terser: 5.48.0@@ -31392,6 +31466,34 @@ snapshots:transitivePeerDependencies:- msw+ [email protected](@opentelemetry/[email protected])(@types/[email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])):+ dependencies:+ '@vitest/expect': 4.1.6+ '@vitest/mocker': 4.1.6([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))+ '@vitest/pretty-format': 4.1.6+ '@vitest/runner': 4.1.6+ '@vitest/snapshot': 4.1.6+ '@vitest/spy': 4.1.6+ '@vitest/utils': 4.1.6+ es-module-lexer: 2.0.0+ expect-type: 1.3.0+ magic-string: 0.30.21+ obug: 2.1.1+ pathe: 2.0.3+ picomatch: 4.0.4+ std-env: 4.0.0+ tinybench: 2.9.0+ tinyexec: 1.2.4+ tinyglobby: 0.2.17+ tinyrainbow: 3.1.0+ vite: 8.0.10(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])+ why-is-node-running: 2.3.0+ optionalDependencies:+ '@opentelemetry/api': 1.9.0+ '@types/node': 26.1.0+ transitivePeerDependencies:+ - msw+[email protected](@opentelemetry/[email protected])(@types/[email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])):dependencies:'@vitest/expect': 4.1.6diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yamlindex 276f627292..1849d7dbec 100644--- a/pnpm-workspace.yaml+++ b/pnpm-workspace.yaml@@ -33,6 +33,7 @@ catalog:'@logtape/redaction': 2.2.3'@logtape/testing': 2.2.3'@nanostores/react': 0.7.3+ '@paralleldrive/cuid2': 2.2.2'@react-aria/i18n': 3.12.16'@react-email/components': 0.3.3'@react-pdf/renderer': 3.4.5