Skip to content

Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.

feat: kanban IDs and thermal labels, planning calendar weeks, MES first-operation labels (#2071)

Brad Barbin80b18bb9afe7
diff --git a/.claude/rules/kanban-system.md b/.claude/rules/kanban-system.md
index 8665e16cfd..0e14d928b7 100644
--- a/.claude/rules/kanban-system.md
+++ b/.claude/rules/kanban-system.md
@@ -18,10 +18,22 @@ stock transfer (`Transfer`). Lives in the inventory module.
## Data model
-Table `kanban` (initial migration `20250909012102_kanban.sql`; newest `20261012232517_kanban-replenishment-level.sql`, plus the generated `20261012232520_kanban-level-check-triggers.sql` for its interceptor).
+Table `kanban` (initial migration `20250909012102_kanban.sql`; newest `20261028191437_kanban-readable-id.sql` (after `20261012232517_kanban-replenishment-level.sql`), plus the generated `20261012232520_kanban-level-check-triggers.sql` for its interceptor).
**Composite PK `("id", "companyId")`.** Key columns:
- `id` TEXT default `id('kb')`, `itemId` FK→item (CASCADE), `companyId` FK→company
+- `kanbanId` TEXT (nullable) — the readable number (`KB000001`, sequence `kanban`), printed on the
+ label (`20261028191437_kanban-readable-id.sql`). Unique per company. The BEFORE INSERT trigger
+ `set_kanban_readable_id` assigns it from `get_next_sequence` when the insert has none (creating the
+ company's `kanban` sequence row first if it is missing, so no kanban is left unnumbered), so every
+ insert path (form, MCP, datasets, fixtures) is numbered with no call-site code. An insert that
+ names its own number keeps it, and the `sync_advance_document_sequence` interceptor moves the
+ counter past it (`20261028221530`), so a later generated number cannot collide. The BEFORE UPDATE
+ trigger `prevent_kanban_readable_id_change` (`20261028221145`) refuses changing a set number — it
+ is printed on the card — and allows filling a NULL one. `upsertKanban` drops a `kanbanId` the
+ caller sends. Nullable only because a restore loads rows with triggers off, and a pre-migration
+ backup has no number. Not to be confused with
+ `stockTransfer.kanbanId`, the FK to `kanban.id` — the same `job.jobId` / `jobMaterial.jobId` split.
- `replenishmentSystem` `kanbanReplenishmentSystem` enum (`'Buy' | 'Make' | 'Transfer'`),
default `'Buy'` — **retyped from `itemReplenishmentSystem`** in `20260908143722_kanban-transfer.sql`
(Transfer is NOT added to `itemReplenishmentSystem`; that enum drives planning/MRP/demand)
@@ -49,10 +61,15 @@ RLS: SELECT = any employee role; INSERT/UPDATE/DELETE = `inventory_create`/`inve
`name`, `readableIdWithRevision`, `jobReadableId` (= `j."jobId"`), `locationName`, `storageUnitName`,
`fromStorageUnitName`, `supplierName`, `thumbnailPath`. Recreated with storageUnit refs in
`20260417000300_storage-unit-recreate-dependents.sql`, then with the source-bin join in
-`20260908143722_kanban-transfer.sql`.
+`20260908143722_kanban-transfer.sql`, and again for `replenishmentLevel` and `kanbanId`
+(`20261012232517`, `20261028191437`).
`kanbanOutput` setting (enum `('label','qrcode','url')`, default `'qrcode'`) is a per-company column on
-`companySettings` (migration `20251001021231_kanban-settings.sql`), NOT a kanban-specific table.
+`companySettings` (migration `20251001021231_kanban-settings.sql`), NOT a kanban-specific table. Beside it,
+`kanbanLabelSize` (enum `('letter','label4x2','label3x2')`, default `'letter'`,
+`20261028214508_kanban-label-size.sql`) is what a label prints on; the thermal values are `labelSizes` ids
+(`@carbon/utils`). Both are saved by `updateInventorySettings` from the Kanban Output card
+(`x+/settings+/inventory.tsx`), which shows Label Size only while the output is `label`.
## Code surfaces
@@ -69,7 +86,7 @@ RLS: SELECT = any employee role; INSERT/UPDATE/DELETE = `inventory_create`/`inve
- `file`: `kanbanLabelsPdf(ids, action)` → `/file/kanban/labels/:action.pdf?ids=`; `kanbanQrCode(id, action)` → `/file/kanban/:id/:action.png`
- `to`: `kanbans`, `kanban(id)`, `newKanban`, `deleteKanban(id)` under `/x/inventory/kanbans`
-`action` is always `"order" | "start" | "complete"`.
+`action` is always `"order" | "start" | "complete"`. **One action per card, never several codes on one card** — an operator would scan the wrong one. Create, Start and Complete are separate cards (and separate print links).
## Replenishment / scan flow
@@ -117,9 +134,11 @@ Spec: `.ai/specs/2026-10-06-kanban-internal-replenishment-level.md`.
## Labels & QR
- QR PNG route: `apps/erp/app/routes/file+/kanban+/$id.$action[.]png.tsx`, 36px modules, **color-coded by action**: order=black `#000000`, start=emerald `#059669`, complete=blue `#2563eb`. (The old doc claiming "no color differentiation" was stale.)
-- Label PDF route: `apps/erp/app/routes/file+/kanban+/labels.$action[.]pdf.tsx` — takes `?ids=` (comma-separated), fetches kanbans from the `kanbans` view, converts thumbnails to base64, renders `KanbanLabelPDF`.
-- `KanbanLabelPDF`: `packages/documents/src/pdf/KanbanLabelPDF.tsx` (exported via `@carbon/documents/pdf`). Letter page, **2×3 grid = 6 labels/page**; each shows the action-colored QR, item thumbnail, name, readable id, storage-unit/location, `QTY: {quantity} {uom}` (plus `MIN: {replenishmentLevel}` when a level is set — no unit, because `uom` here is the purchase unit and the level is in stock units), and supplier name. QR color matches the PNG route.
-- `KanbansTable` renders Create/Start/Complete affordances per `kanbanOutput`: `label`→PDF links, `qrcode`→hover-card iframes (one open at a time: `KanbanQrCodeHoverCard` reads a table-level `OpenQrCodeContext`), `url`→copyable API links. Start/Complete show for Make only. Bulk "Print Labels" opens the PDF for selected ids (`action: "order"`).
+- Label PDF route: `apps/erp/app/routes/file+/kanban+/labels.$action[.]pdf.tsx` — `?ids=` (comma-separated), one `.in()` read of the `kanbans` view scoped by `companyId`, rendered at the company's `kanbanLabelSize` (`?labelSize=` overrides). Thumbnails are fetched for the letter sheet only.
+- The card is defined once in `packages/documents/src/zpl/KanbanLabelZPL.tsx`: `KanbanLabelItem`, `kanbanLabelCode` (the card's one code for its `action`, with a caption: CREATE, START or COMPLETE), the text helpers, `canHoldKanbanLabel` (3" x 2" and up; 100 x 50 mm passes), `getKanbanLabelLayout` (inches: the code on the right, as large as the label allows (at most 45% of its width), caption under it; a text column on the left — each field cut to the column — the part name up to two lines (`wrapKanbanLabelText`), every other field one line (`fitKanbanLabelText`): name, item ID, bins, `QTY` and `MIN` on their own lines (`kanbanLabelQuantityLines`), supplier — with the kanban ID small at the bottom), `KANBAN_LABEL_COLORS` and `generateKanbanLabelZPL(item, size, baseUrl, action)`. Text is cut by an estimated glyph width (`fitKanbanLabelText`) and escaped with `^FH` (`zplFieldData`, `zpl/utils.ts`). Pinned by `kanbanLabelZPL.test.ts`.
+- `KanbanLabelPDF` (`packages/documents/src/pdf/KanbanLabelPDF.tsx`, via `@carbon/documents/pdf`): takes the `action`; without `labelSize`, a letter page, **2×3 grid = 6 labels/page** — the action-colored code (like the PNG route) with the item thumbnail beside it, name, item readable id, storage unit/location, `QTY: {quantity} {uom}` (plus `MIN: {replenishmentLevel}` — no unit, because `uom` is the purchase unit and the level is in stock units), and a bottom row with the `kanbanId` (bold, left) and supplier (right). With a `labelSize`, one card per page laid out by `getKanbanLabelLayout`, so the PDF and the ZPL print alike; the PDF colors the code and caption by action (black Create, green Start, blue Complete), and the ZPL (black only) relies on the caption.
+- Print job (`print-job/renderers.tsx` `renderKanbanCard`) prints the Create card (a print job has no action): a printer whose media size holds a card prints one at that size — ZPL, or a one-card PDF. A ZPL printer with smaller media fails the job; a PDF printer with smaller or no media prints the company's `kanbanLabelSize`. `resolveKanbanData` uses the `kanbanId` as the job's readable id.
+- `KanbansTable` renders Create/Start/Complete per `kanbanOutput`: `label`→PDF links (one card per action), `qrcode`→hover-card iframes (one open at a time: `KanbanQrCodeHoverCard` reads a table-level `OpenQrCodeContext`), `url`→copyable API links; Start/Complete show for Make only. Bulk **Print Labels** prints Create cards: it opens a printer picker and POSTs one `Kanban` print job per kanban to `path.to.manualPrint` when the company has printer routes (the storage-unit list's pattern), else opens the PDF.
## Gotchas
diff --git a/.claude/rules/mes-job-operation-ui.md b/.claude/rules/mes-job-operation-ui.md
index 357454e652..b61fa60d4f 100644
--- a/.claude/rules/mes-job-operation-ui.md
+++ b/.claude/rules/mes-job-operation-ui.md
@@ -255,7 +255,18 @@ of a paused URL, which is itself a valid link.
complete the kanban (`isKanbanCompleteScan`, `~/utils/kanban`). That check
compares the label's PATH, because a label holds the origin it was printed
from. It accepts the completed barcode override and the printed label.
-- All three set `inTextFields`: a matching scan is taken even while a field
+- A kanban Complete scan on a serial part completes the unit ON SCREEN:
+ `kanbanCompleteTarget` (`~/utils/kanban`, tested) sends the URL's
+ `?trackedEntityId` to `end.$operationId` when that unit is still open at the
+ operation. With none, the first operation lets the route take the next unit
+ in order; a later operation opens the serial picker instead, because the
+ route's own pick (first incomplete by `createdAt`) need not be the unit in
+ the operator's hands. The route refuses a named unit already complete there,
+ and at a later operation redirects back onto the completed unit (never a
+ next or spawned one), so the view's held-unit edge (`useOperation`, and
+ `heldEntityRef` in `AssemblyView`) asks for the next scan. A scan through the
+ ERP URL names no unit and still takes the route's pick.
+- All three wedges (layout, `JobOperation`, `AssemblyView`) set `inTextFields`: a matching scan is taken even while a field
has focus, and the field is set back to its value from before the scan.
A scan no handler takes stays in the field.
- A scan outside a field that no handler takes is kept from the page, and
diff --git a/.claude/rules/mrp-system.md b/.claude/rules/mrp-system.md
index 46e7c8485c..da5b2964db 100644
--- a/.claude/rules/mrp-system.md
+++ b/.claude/rules/mrp-system.md
@@ -525,8 +525,12 @@ never offered a Cancel, Defer or Expedite.
`planning-week-geometry.ts`, unit-tested): heights compare along a row, not
between rows. One tooltip per row follows the hovered week (the shared
`TooltipContent` takes an `anchor` for this) and shows the week label, its
- date range and the projected quantity; the hovered week is marked by an
- overlay band that is cleared on `pointerleave` — it used to stay on the last
+ date range and the projected quantity; the week label (strip tooltip, CSV
+ headers, Demand Forecasts table) comes from `usePlanningWeekLabel`
+ (`ui/Planning/usePlanningWeekLabel.ts`): "Present Week", "Week 2", … or, with
+ `companySettings.useCalendarWeeks`, the ISO week of each period
+ (`planningWeekNumber`, read three days into the Sunday-start period,
+ tested). The hovered week is marked by an overlay band that is cleared on `pointerleave` — it used to stay on the last
week touched. The per-week numbers stay in the CSV as
`exportOnlyColumn`s keyed `week1`…`weekN`, so an export is unchanged.
- **Suggested orders ARE the Order / Make actions.** The order drawer's
@@ -695,8 +699,10 @@ never offered a Cancel, Defer or Expedite.
default on: a PO the planning Order button created — `purchaseOrder.createdFromPlanning`,
cleared by any manual line change — finalizes without the approval rule), `PlanningHorizonCard`
(`setPlanningHorizon`, `planningHorizonValidator`), `ForecastConsumptionCard`
- (`setForecastConsumption`, `forecastConsumptionValidator`, 0–52 weeks each)
- and `MrpScheduleCard` (`setMrpSchedule`, `mrpScheduleValidator`). An employee
+ (`setForecastConsumption`, `forecastConsumptionValidator`, 0–52 weeks each),
+ `MrpScheduleCard` (`setMrpSchedule`, `mrpScheduleValidator`) and
+ `CalendarWeeksCard` (`setCalendarWeeks` → `companySettings.useCalendarWeeks`,
+ default off: display only, see the week strip above). An employee
id is saved only after `isActiveCompanyEmployee`; a bad value answers 400.
- **Planning horizon (time fence).** `itemPlanning.planningHorizonDays` (per
item + location, Part → Planning) else `companySettings.defaultPlanningHorizonDays`
diff --git a/.claude/rules/printing-system.md b/.claude/rules/printing-system.md
index 2f684c5e40..091f15a898 100644
--- a/.claude/rules/printing-system.md
+++ b/.claude/rules/printing-system.md
@@ -20,15 +20,16 @@ a ProxyBox HTTP endpoint. There is no Trigger.dev here.
- `./ui` (`src/ui/index.ts`) — `PrintingProvider`/`usePrinting`, `PrintButton`, `LabelDownloadModal`
- **`@carbon/documents`** (`packages/documents/`) — actual renderers. PDFs via `@react-pdf/renderer`
React components (`pdf/ProductLabelPDF`, `pdf/StorageUnitLabelPDF`, `pdf/KanbanLabelPDF`, plus
- invoice/PO/quote/traveler docs); ZPL via `zpl/ProductLabelZPL`, `zpl/StorageUnitLabelZPL`
- (`generateProductLabelZPL`, `generateStorageUnitLabelZPL`).
+ invoice/PO/quote/traveler docs); ZPL via `zpl/ProductLabelZPL`, `zpl/StorageUnitLabelZPL`,
+ `zpl/KanbanLabelZPL` (`generateProductLabelZPL`, `generateStorageUnitLabelZPL`,
+ `generateKanbanLabelZPL`).
## Document type registry — `packages/printing/src/registry.ts`
`documentTypeRegistry` entries (`id`, `sourceDocuments[]`, `builtInRenderer: "zpl"|"pdf"|null`,
`defaultFormat`):
- `productLabel` — sources `Receipt, Shipment, Operation, Entity, Job, Split, StockTransfer`; default zpl
-- `kanbanCard` — source `Kanban`; pdf (built-in renderer only supports PDF)
+- `kanbanCard` — source `Kanban`; default pdf, ZPL on media of 3" x 2" and up (see `kanban-system.md` → Labels)
- `storageUnitLabel` — source `StorageUnit`; default zpl
`getDocumentTypesForSource(sourceDocument)` maps a source doc → the doc-type ids to print.
@@ -63,7 +64,9 @@ a ProxyBox HTTP endpoint. There is no Trigger.dev here.
- `renderItemBuiltIn` — used when no template but `builtInRenderer !== null`. PDF path renders the
React-PDF component via `renderToStream` → base64. `productLabel` loads the company's
`documentTemplate` (`documentType="trackingLabel"`) + logo so queued jobs match the customizer.
- ZPL requires a `labelSize.zpl` config (`requireZplCapable`); kanban built-in is PDF-only.
+ ZPL requires a `labelSize.zpl` config (`requireZplCapable`). A kanban card needs media that
+ `canHoldKanbanLabel` accepts for ZPL; a PDF printer with smaller media prints the company's
+ `kanbanLabelSize` instead.
- If neither (`builtInRenderer === null`, no template) → job fails asking for a BinderyPress template.
## Printer routing & assignments
@@ -131,12 +134,15 @@ wrapped in try/catch that never blocks the parent op, then `trigger("print-job",
every completion path: the Complete form (`x+/complete.tsx`), the QR / kanban Complete scan
(`x+/end.$operationId.tsx`), and inspection lots (`postSerialCompletions` / `postBulkCompletion`
in `services/quality.server.ts`). A new path that completes a tracked unit must call it too, or that
- path mints serials with no label.
+ path mints serials with no label. "First" is the routing's answer, `isFirstOperationOfMakeMethod`
+ (`services/operations.service.ts`: no `jobOperationDependency` predecessor in the same make method),
+ the check the operation and assembly views use. Counting the unit's `Operation <id>` markers
+ reprinted a label at every later operation whenever the unit completed there had one or none.
## Gotchas
-- Built-in **ZPL** needs `labelSize.zpl`; kanban built-in is **PDF only** — printing kanban to a ZPL
- printer fails unless a BinderyPress template handles it.
+- Built-in **ZPL** needs `labelSize.zpl`; a kanban card also needs media of at least 3" x 2"
+ (`label3x2`, `label4x2`, `label100x50mm`), or the job fails.
- Both Inngest fns use `retries: 0`; delivery timeouts are intentionally non-retriable to avoid dupes.
- `print-job/` is a **directory** (`index.tsx` / `renderers.tsx` / `resolvers.ts`), not a single file.
`.tsx` because renderers instantiate React-PDF components.
diff --git a/apps/erp/app/hooks/useCompanySettings.tsx b/apps/erp/app/hooks/useCompanySettings.tsx
index d718bce612..fc7e28c86d 100644
--- a/apps/erp/app/hooks/useCompanySettings.tsx
+++ b/apps/erp/app/hooks/useCompanySettings.tsx
@@ -33,6 +33,7 @@ type CompanySettings = Partial<
| "showCurrencyTrailingZeros"
| "showCustomerReadableId"
| "showSupplierReadableId"
+ | "useCalendarWeeks"
>
>;
diff --git a/apps/erp/app/modules/agent/ui/AgentInput.tsx b/apps/erp/app/modules/agent/ui/AgentInput.tsx
index 300e75d7d5..39b0316cd1 100644
--- a/apps/erp/app/modules/agent/ui/AgentInput.tsx
+++ b/apps/erp/app/modules/agent/ui/AgentInput.tsx
@@ -39,7 +39,7 @@ export function AgentInput({
}
return (
- <div className="flex items-end gap-2 rounded-lg border bg-background p-1.5">
+ <div className="flex items-end gap-2 rounded-lg border bg-card p-1.5">
<textarea
ref={ref}
value={value}
diff --git a/apps/erp/app/modules/agent/ui/AgentPanel.tsx b/apps/erp/app/modules/agent/ui/AgentPanel.tsx
index 4ea4027e2f..5d993e07e3 100644
--- a/apps/erp/app/modules/agent/ui/AgentPanel.tsx
+++ b/apps/erp/app/modules/agent/ui/AgentPanel.tsx
@@ -70,7 +70,7 @@ export function AgentPanel() {
return (
<div
- className={`fixed right-4 z-40 flex flex-col w-100 max-w-[calc(100vw-2rem)] rounded-lg border bg-background shadow-lg overflow-hidden animate-in slide-in-from-top-4 fade-in duration-200 ${
+ className={`fixed right-4 z-40 flex flex-col w-100 max-w-[calc(100vw-2rem)] rounded-lg border bg-card shadow-lg overflow-hidden animate-in slide-in-from-top-4 fade-in duration-200 ${
expanded ? "top-14 bottom-4 max-md:h-[75dvh]" : "top-14 h-[45vh]"
} max-md:inset-x-2 max-md:top-auto max-md:bottom-[calc(0.5rem+env(safe-area-inset-bottom))] max-md:z-[60] max-md:w-auto max-md:max-w-none`}
>
diff --git a/apps/erp/app/modules/agent/ui/AgentThreadList.tsx b/apps/erp/app/modules/agent/ui/AgentThreadList.tsx
index 3cdb4a2316..8f9b45945e 100644
--- a/apps/erp/app/modules/agent/ui/AgentThreadList.tsx
+++ b/apps/erp/app/modules/agent/ui/AgentThreadList.tsx
@@ -55,7 +55,7 @@ export function AgentThreadList({
value={query}
onChange={(e) => setQuery(e.target.value)}
placeholder="Search chats…"
- className="w-full rounded-md border bg-background px-2 py-1.5 text-sm outline-none placeholder:text-muted-foreground"
+ className="w-full rounded-md border bg-card px-2 py-1.5 text-sm outline-none placeholder:text-muted-foreground"
/>
</div>
<div className="overflow-y-auto p-1">
diff --git a/apps/erp/app/modules/agent/ui/blocks/AgentBlockChoice.tsx b/apps/erp/app/modules/agent/ui/blocks/AgentBlockChoice.tsx
index 29e67c46bd..dfcedcc8cd 100644
--- a/apps/erp/app/modules/agent/ui/blocks/AgentBlockChoice.tsx
+++ b/apps/erp/app/modules/agent/ui/blocks/AgentBlockChoice.tsx
@@ -48,7 +48,7 @@ export function AgentBlockChoice({ input }: { input: unknown }) {
const canConfirm = selectedIds.size > 0 || freeText.trim().length > 0;
return (
- <div className="my-1 overflow-hidden rounded-lg border bg-background">
+ <div className="my-1 overflow-hidden rounded-lg border bg-card">
{block.prompt && (
<p className="px-3 pb-1.5 pt-2.5 text-xs text-muted-foreground">
{block.prompt}
diff --git a/apps/erp/app/modules/inventory/inventory.service.ts b/apps/erp/app/modules/inventory/inventory.service.ts
index 19c8328447..c40cc88488 100644
--- a/apps/erp/app/modules/inventory/inventory.service.ts
+++ b/apps/erp/app/modules/inventory/inventory.service.ts
@@ -674,7 +674,7 @@ export async function getKanbans(
if (args.search) {
query = query.or(
- searchFilter(["name", "readableIdWithRevision"], args.search)
+ searchFilter(["kanbanId", "name", "readableIdWithRevision"], args.search)
);
}
@@ -2802,8 +2802,14 @@ export async function upsertKanban(
customFields?: Json;
})
) {
- // kanban has no customFields column.
- const { customFields: _customFields, ...row } = kanban;
+ // kanban has no customFields column. Its kanbanId is numbered by the
+ // set_kanban_readable_id trigger and never changes, so one sent through the
+ // API's loose input is dropped.
+ const {
+ customFields: _customFields,
+ kanbanId: _kanbanId,
+ ...row
+ } = kanban as typeof kanban & { kanbanId?: unknown };
// zod omits a blank optional field, so a plain spread would keep the old
// level on update. Write null when the field is blank or the kanban is not
// a Transfer kanban.
diff --git a/apps/erp/app/modules/inventory/ui/Kanbans/KanbansTable.tsx b/apps/erp/app/modules/inventory/ui/Kanbans/KanbansTable.tsx
index 654c46b570..0d1f2e2b71 100644
--- a/apps/erp/app/modules/inventory/ui/Kanbans/KanbansTable.tsx
+++ b/apps/erp/app/modules/inventory/ui/Kanbans/KanbansTable.tsx
@@ -19,12 +19,19 @@ import {
HStack,
MENU_ITEM_SHORTCUTS,
MenuItem,
+ Modal,
+ ModalBody,
+ ModalContent,
+ ModalFooter,
+ ModalHeader,
+ ModalTitle,
PulsingDot,
Status,
Tooltip,
TooltipContent,
TooltipTrigger,
toast,
+ useDisclosure,
useViewport,
VStack
} from "@carbon/react";
@@ -70,7 +77,7 @@ import {
} from "~/components";
import { Enumerable } from "~/components/Enumerable";
import { useLocations } from "~/components/Form/Location";
-import { usePermissions, useUrlParams } from "~/hooks";
+import { usePermissions, usePrinting, useUrlParams } from "~/hooks";
import { useQuantityFormatter } from "~/hooks/useQuantityFormatter";
import { getLinkToItemDetails } from "~/modules/items/ui/Item/ItemForm";
import type { kanbanOutputTypes } from "~/modules/settings/settings.models";
@@ -189,6 +196,18 @@ const KanbansTable = memo(
const columns = useMemo<ColumnDef<KanbanRow>[]>(
() => [
+ {
+ accessorKey: "kanbanId",
+ header: t`Kanban ID`,
+ cell: ({ row }) => (
+ <Hyperlink to={`${path.to.kanban(row.original.id!)}?${params}`}>
+ {row.original.kanbanId}
+ </Hyperlink>
+ ),
+ meta: {
+ icon: <LuTag />
+ }
+ },
{
accessorKey: "itemId",
header: t`Item`,
@@ -711,34 +730,91 @@ const KanbansTable = memo(
[params, permissions, items.find, isPhone, kanbanOutput]
);
- const renderActions = useCallback((selectedRows: typeof data) => {
- const handlePrintLabels = () => {
- const selectedIds = selectedRows
- .map((row) => row.id)
- .filter(Boolean) as string[];
- if (selectedIds.length > 0) {
- window.open(
- path.to.file.kanbanLabelsPdf(selectedIds, "order"),
- "_blank"
+ /* Bulk printing of Create cards: to a configured printer (a Zebra prints
+ at its own media size), else the PDF at the company's Label Size. */
+ const { printerRoutes, resolvePrinterRoute } = usePrinting();
+ const printerModal = useDisclosure();
+ const defaultPrinter = resolvePrinterRoute(locationId, "default");
+ const [printIds, setPrintIds] = useState<string[]>([]);
+ const [selectedPrinterId, setSelectedPrinterId] = useState<string>("");
+ const [isPrinting, setIsPrinting] = useState(false);
+
+ const handlePrintLabels = useCallback(
+ (ids: string[]) => {
+ if (ids.length === 0) return;
+ if (printerRoutes.length > 0) {
+ setPrintIds(ids);
+ setSelectedPrinterId(
+ defaultPrinter?.id ?? printerRoutes[0]?.id ?? ""
);
+ printerModal.onOpen();
+ } else {
+ window.open(path.to.file.kanbanLabelsPdf(ids, "order"), "_blank");
+ }
+ },
+ [printerRoutes, defaultPrinter?.id, printerModal]
+ );
+
+ // Raw fetch (not a fetcher): parallel submissions don't abort each other
+ // and nothing revalidates, so the selection stays intact.
+ const handleConfirmPrint = useCallback(async () => {
+ if (printIds.length === 0 || !selectedPrinterId) return;
+
+ setIsPrinting(true);
+ try {
+ const results = await Promise.allSettled(
+ printIds.map((id) =>
+ fetch(path.to.manualPrint, {
+ method: "POST",
+ headers: { "Content-Type": "application/json" },
+ body: JSON.stringify({
+ sourceDocument: "Kanban",
+ sourceDocumentId: id,
+ locationId,
+ printerRouteId: selectedPrinterId
+ })
+ })
+ )
+ );
+
+ const failed = results.filter(
+ (r) => r.status === "rejected" || !r.value.ok
+ ).length;
+
+ if (failed > 0) {
+ toast.error(t`${failed} of ${printIds.length} print jobs failed`);
+ } else {
+ toast.success(t`Queued ${printIds.length} labels for printing`);
}
- };
+ } finally {
+ setIsPrinting(false);
+ printerModal.onClose();
+ }
+ }, [printIds, selectedPrinterId, locationId, printerModal, t]);
- return (
+ const renderActions = useCallback(
+ (selectedRows: typeof data) => (
<DropdownMenuContent align="end" className="min-w-[200px]">
<DropdownMenuLabel>
<Trans>Actions</Trans>
</DropdownMenuLabel>
<DropdownMenuSeparator />
<DropdownMenuGroup>
- <DropdownMenuItem onClick={handlePrintLabels}>
+ <DropdownMenuItem
+ onClick={() =>
+ handlePrintLabels(
+ selectedRows.map((row) => row.id).filter(Boolean) as string[]
+ )
+ }
+ >
<LuPrinter className="mr-2 size-4" />
Print Labels ({selectedRows.length})
</DropdownMenuItem>
</DropdownMenuGroup>
</DropdownMenuContent>
- );
- }, []);
+ ),
+ [handlePrintLabels]
+ );
return (
<OpenQrCodeContext.Provider value={openQrCode}>
@@ -776,6 +852,72 @@ const KanbansTable = memo(
withSavedView
withSelectableRows
/>
+ {printerModal.isOpen && (
+ <Modal
+ open
+ onOpenChange={(open) => {
+ if (!open) printerModal.onClose();
+ }}
+ >
+ <ModalContent>
+ <ModalHeader>
+ <ModalTitle>
+ <Trans>Select Printer</Trans>
+ </ModalTitle>
+ </ModalHeader>
+ <ModalBody>
+ <div className="flex flex-col gap-1">
+ {printerRoutes.map((route) => (
+ <button
+ type="button"
+ key={route.id}
+ className={`flex items-center gap-3 rounded-lg border p-3 text-left transition-colors ${
+ selectedPrinterId === route.id
+ ? "border-primary bg-primary/5"
+ : "border-border hover:bg-muted"
+ }`}
+ onClick={() => setSelectedPrinterId(route.id)}
+ >
+ <LuPrinter className="size-4 text-muted-foreground shrink-0" />
+ <div className="flex-1 min-w-0">
+ <span className="text-sm font-medium">
+ {route.name}
+ </span>
+ <span className="text-xs text-muted-foreground ml-2 uppercase">
+ {route.format}
+ </span>
+ {route.mediaSizeId && (
+ <span className="text-xs text-muted-foreground ml-2">
+ {route.mediaSizeId}
+ </span>
+ )}
+ </div>
+ {selectedPrinterId === route.id && (
+ <LuCheck className="size-4 text-primary shrink-0" />
+ )}
+ </button>
+ ))}
+ </div>
+ </ModalBody>
+ <ModalFooter>
+ <HStack>
+ <Button
+ variant="primary"
+ leftIcon={<LuPrinter />}
+ isLoading={isPrinting}
+ disabled={!selectedPrinterId || isPrinting}
+ onClick={handleConfirmPrint}
+ >
+ <Trans>Print {printIds.length} Labels</Trans>
+ </Button>
+ <Button variant="solid" onClick={printerModal.onClose}>
+ <Trans>Cancel</Trans>
+ </Button>
+ </HStack>
+ </ModalFooter>
+ </ModalContent>
+ </Modal>
+ )}
</OpenQrCodeContext.Provider>
);
}
diff --git a/apps/erp/app/modules/production/production.server.ts b/apps/erp/app/modules/production/production.server.ts
index 86762b13ee..0498a04e46 100644
--- a/apps/erp/app/modules/production/production.server.ts
+++ b/apps/erp/app/modules/production/production.server.ts
@@ -6991,6 +6991,35 @@ export const getJobOperationStepRecords = defineServiceFn({
}
});
+/**
+ * Get step timings for a job operation
+ *
+ * @remarks
+ * Estimates how long each step of a job operation took, from the times its steps were recorded. A step's time is measured from the same operator's previous step record on this operation, or from their latest clock-in to it, whichever is later. Steps recorded at the same instant (a manager's Complete All, or a batch record) are flagged `bulk` and left out of the per-step statistics. A step's time includes any break the operator did not clock out for, and steps recorded together after the work was done read as near zero.
+ *
+ * @param jobOperationId - The job operation whose steps to time.
+ * @returns `steps`: each step in order, with the number of timed units and the average, median, minimum and maximum seconds. `records`: every step record in the order it was made, with its 0-based unit index, the operator, the seconds, what they were measured from (`previousStep`, `clockIn`, or null when there was nothing to measure from) and whether it was a `bulk` record.
+ *
+ * @mcp read
+ */
+export const getJobOperationStepTimings = defineServiceFn({
+ input: z.object({ jobOperationId: z.string() }),
+ permission: { view: "production" },
+ async run(ctx, input) {
+ const timings = unwrap(
+ ctx,
+ await service.getJobOperationStepTimings(
+ ctx.asCaller.supabase,
+ input.jobOperationId,
+ ctx.company.id
+ )
+ );
+ if (timings instanceof CarbonError) return timings;
+ if (!timings) return ctx.error("notFound", "Job operation not found");
+ return timings;
+ }
+});
+
/**
* Get outside operations by job id
*
diff --git a/apps/erp/app/modules/production/production.service.test.ts b/apps/erp/app/modules/production/production.service.test.ts
index 8ff7c2b115..e8dd16baf2 100644
--- a/apps/erp/app/modules/production/production.service.test.ts
+++ b/apps/erp/app/modules/production/production.service.test.ts
@@ -5,6 +5,7 @@
import { describe, expect, it } from "vitest";
import {
buildAssemblyToolStepLinks,
+ computeStepTimings,
maxToolQuantityByItem,
planAssemblyStepMarkerRemap,
planAssemblyStepMarkerSync,
@@ -222,3 +223,120 @@ describe("buildAssemblyToolStepLinks", () => {
]);
});
});
+
+describe("computeStepTimings", () => {
+ const step = (
+ id: string,
+ sortOrder: number,
+ records: { index: number; createdAt: string; createdBy: string }[]
+ ) => ({
+ id,
+ name: id,
+ sortOrder,
+ assemblyInstructionStepId: null,
+ jobOperationStepRecord: records
+ });
+
+ it("measures each record from the operator's clock-in, then their previous record", () => {
+ const { records, steps } = computeStepTimings(
+ [
+ step("a", 1, [
+ { index: 0, createdAt: "2026-10-28T10:01:00Z", createdBy: "u1" },
+ { index: 1, createdAt: "2026-10-28T10:05:00Z", createdBy: "u1" }
+ ]),
+ step("b", 2, [
+ { index: 0, createdAt: "2026-10-28T10:03:00Z", createdBy: "u1" },
+ { index: 1, createdAt: "2026-10-28T10:09:00Z", createdBy: "u1" }
+ ])
+ ],
+ [{ employeeId: "u1", startTime: "2026-10-28T10:00:00Z" }]
+ );
+
+ expect(
+ records.map((r) => [r.jobOperationStepId, r.seconds, r.measuredFrom])
+ ).toEqual([
+ ["a", 60, "clockIn"],
+ ["b", 120, "previousStep"],
+ ["a", 120, "previousStep"],
+ ["b", 240, "previousStep"]
+ ]);
+ expect(steps.map((s) => [s.jobOperationStepId, s.averageSeconds])).toEqual([
+ ["a", 90],
+ ["b", 180]
+ ]);
+ });
+
+ it("restarts the clock at a later clock-in, so time clocked out is not counted", () => {
+ const { records } = computeStepTimings(
+ [
+ step("a", 1, [
+ { index: 0, createdAt: "2026-10-28T10:01:00Z", createdBy: "u1" }
+ ]),
+ step("b", 2, [
+ { index: 0, createdAt: "2026-10-28T13:02:00Z", createdBy: "u1" }
+ ])
+ ],
+ [
+ { employeeId: "u1", startTime: "2026-10-28T10:00:00Z" },
+ { employeeId: "u1", startTime: "2026-10-28T13:00:00Z" }
+ ]
+ );
+
+ expect(records.map((r) => [r.seconds, r.measuredFrom])).toEqual([
+ [60, "clockIn"],
+ [120, "clockIn"]
+ ]);
+ });
+
+ it("keeps each operator's timeline separate", () => {
+ const { records } = computeStepTimings(
+ [
+ step("a", 1, [
+ { index: 0, createdAt: "2026-10-28T10:02:00Z", createdBy: "u1" },
+ { index: 1, createdAt: "2026-10-28T10:03:00Z", createdBy: "u2" }
+ ]),
+ step("b", 2, [
+ { index: 0, createdAt: "2026-10-28T10:06:00Z", createdBy: "u1" }
+ ])
+ ],
+ []
+ );
+
+ expect(
+ records.map((r) => [r.recordedBy, r.seconds, r.measuredFrom])
+ ).toEqual([
+ ["u1", null, null],
+ ["u2", null, null],
+ ["u1", 240, "previousStep"]
+ ]);
+ });
+
+ it("flags records written at one instant as bulk and leaves them out of the statistics", () => {
+ const { records, steps } = computeStepTimings(
+ [
+ step("a", 1, [
+ { index: 0, createdAt: "2026-10-28T10:01:00Z", createdBy: "u1" }
+ ]),
+ step("b", 2, [
+ { index: 0, createdAt: "2026-10-28T10:05:00Z", createdBy: "m1" }
+ ]),
+ step("c", 3, [
+ { index: 0, createdAt: "2026-10-28T10:05:00Z", createdBy: "m1" }
+ ])
+ ],
+ [{ employeeId: "u1", startTime: "2026-10-28T10:00:00Z" }]
+ );
+
+ expect(records.map((r) => [r.jobOperationStepId, r.bulk])).toEqual([
+ ["a", false],
+ ["b", true],
+ ["c", true]
+ ]);
+ expect(steps.map((s) => [s.jobOperationStepId, s.timedUnits])).toEqual([
+ ["a", 1],
+ ["b", 0],
+ ["c", 0]
+ ]);
+ expect(steps[1].averageSeconds).toBeNull();
+ });
+});
diff --git a/apps/erp/app/modules/production/production.service.ts b/apps/erp/app/modules/production/production.service.ts
index 4d9eda243c..8e6034e74e 100644
--- a/apps/erp/app/modules/production/production.service.ts
+++ b/apps/erp/app/modules/production/production.service.ts
@@ -2209,6 +2209,187 @@ export async function getJobOperationStepRecords(
return query;
}
+type StepTimingStep = {
+ id: string;
+ name: string;
+ sortOrder: number;
+ assemblyInstructionStepId: string | null;
+ jobOperationStepRecord:
+ | { index: number; createdAt: string; createdBy: string }[]
+ | null;
+};
+
+type StepTimingClockIn = { employeeId: string | null; startTime: string };
+
+export type StepTimingRecord = {
+ jobOperationStepId: string;
+ name: string;
+ unitIndex: number;
+ recordedAt: string;
+ recordedBy: string;
+ seconds: number | null;
+ measuredFrom: "previousStep" | "clockIn" | null;
+ bulk: boolean;
+};
+
+export type StepTimingSummary = {
+ jobOperationStepId: string;
+ name: string;
+ sortOrder: number;
+ assemblyInstructionStepId: string | null;
+ timedUnits: number;
+ averageSeconds: number | null;
+ medianSeconds: number | null;
+ minSeconds: number | null;
+ maxSeconds: number | null;
+};
+
+/**
+ * How long each step of an operation took, estimated from when its records
+ * were made. Each operator's records form one timeline: a record's time is
+ * measured from that operator's previous record on the operation, or from
+ * their latest clock-in to it, whichever is later. Records that share an
+ * instant were written together (a manager's Complete All, a batch record),
+ * so they are flagged `bulk` and left out of the per-step statistics.
+ */
+export function computeStepTimings(
+ steps: StepTimingStep[],
+ clockIns: StepTimingClockIn[]
+): { steps: StepTimingSummary[]; records: StepTimingRecord[] } {
+ const sortOrderByStepId = new Map(steps.map((s) => [s.id, s.sortOrder]));
+ const records = steps
+ .flatMap((step) =>
+ (step.jobOperationStepRecord ?? []).map((record) => ({
+ jobOperationStepId: step.id,
+ name: step.name,
+ unitIndex: record.index,
+ recordedAt: record.createdAt,
+ recordedBy: record.createdBy,
+ at: Date.parse(record.createdAt)
+ }))
+ )
+ .sort(
+ (a, b) =>
+ a.at - b.at ||
+ (sortOrderByStepId.get(a.jobOperationStepId) ?? 0) -
+ (sortOrderByStepId.get(b.jobOperationStepId) ?? 0)
+ );
+
+ const recordsAtInstant = new Map<number, number>();
+ for (const record of records) {
+ recordsAtInstant.set(record.at, (recordsAtInstant.get(record.at) ?? 0) + 1);
+ }
+
+ const clockInsByEmployee = new Map<string, number[]>();
+ for (const event of clockIns) {
+ if (!event.employeeId) continue;
+ const starts = clockInsByEmployee.get(event.employeeId) ?? [];
+ starts.push(Date.parse(event.startTime));
+ clockInsByEmployee.set(event.employeeId, starts);
+ }
+
+ const previousByOperator = new Map<string, number>();
+ const timed: StepTimingRecord[] = records.map((record) => {
+ const previous = previousByOperator.get(record.recordedBy) ?? null;
+ previousByOperator.set(record.recordedBy, record.at);
+
+ const clockIn = (clockInsByEmployee.get(record.recordedBy) ?? [])
+ .filter((start) => start <= record.at)
+ .reduce<number | null>(
+ (latest, start) => (latest === null || start > latest ? start : latest),
+ null
+ );
+
+ const measuredFrom =
+ previous !== null && (clockIn === null || previous >= clockIn)
+ ? "previousStep"
+ : clockIn !== null
+ ? "clockIn"
+ : null;
+ const from = measuredFrom === "previousStep" ? previous : clockIn;
+
+ return {
+ jobOperationStepId: record.jobOperationStepId,
+ name: record.name,
+ unitIndex: record.unitIndex,
+ recordedAt: record.recordedAt,
+ recordedBy: record.recordedBy,
+ seconds: from === null ? null : (record.at - from) / 1000,
+ measuredFrom,
+ bulk: (recordsAtInstant.get(record.at) ?? 0) > 1
+ };
+ });
+
+ const secondsByStep = groupBy(
+ timed.filter((r) => r.seconds !== null && !r.bulk),
+ (r) => r.jobOperationStepId
+ );
+
+ const summaries = [...steps]
+ .sort((a, b) => a.sortOrder - b.sortOrder)
+ .map((step) => {
+ const seconds = (secondsByStep[step.id] ?? [])
+ .map((r) => r.seconds as number)
+ .sort((a, b) => a - b);
+ const middle = seconds.length >> 1;
+ return {
+ jobOperationStepId: step.id,
+ name: step.name,
+ sortOrder: step.sortOrder,
+ assemblyInstructionStepId: step.assemblyInstructionStepId,
+ timedUnits: seconds.length,
+ averageSeconds: seconds.length
+ ? round(seconds.reduce((sum, s) => sum + s, 0) / seconds.length)
+ : null,
+ medianSeconds: seconds.length
+ ? seconds.length % 2
+ ? seconds[middle]
+ : round((seconds[middle - 1] + seconds[middle]) / 2)
+ : null,
+ minSeconds: seconds.length ? seconds[0] : null,
+ maxSeconds: seconds.length ? seconds[seconds.length - 1] : null
+ };
+ });
+
+ return { steps: summaries, records: timed };
+}
+
+export async function getJobOperationStepTimings(
+ client: SupabaseClient<Database>,
+ jobOperationId: string,
+ companyId: string
+) {
+ const [operation, steps, clockIns] = await Promise.all([
+ client
+ .from("jobOperation")
+ .select("id")
+ .eq("id", jobOperationId)
+ .eq("companyId", companyId)
+ .maybeSingle(),
+ client
+ .from("jobOperationStep")
+ .select(
+ "id, name, sortOrder, assemblyInstructionStepId, jobOperationStepRecord(index, createdAt, createdBy)"
+ )
+ .eq("operationId", jobOperationId)
+ .eq("companyId", companyId),
+ client
+ .from("productionEvent")
+ .select("employeeId, startTime")
+ .eq("jobOperationId", jobOperationId)
+ .eq("companyId", companyId)
+ ]);
+
+ const error = operation.error ?? steps.error ?? clockIns.error;
+ if (error) return { data: null, error };
+ if (!operation.data) return { data: null, error: null };
+
+ return {
+ data: computeStepTimings(steps.data ?? [], clockIns.data ?? []),
+ error: null
+ };
+}
+
export async function getOutsideOperationsByJobId(
client: SupabaseClient<Database>,
jobId: string,
diff --git a/apps/erp/app/modules/production/ui/DemandProjection/DemandProjectionForm.tsx b/apps/erp/app/modules/production/ui/DemandProjection/DemandProjectionForm.tsx
index 36a1b7a5d9..6ca79b80bd 100644
--- a/apps/erp/app/modules/production/ui/DemandProjection/DemandProjectionForm.tsx
+++ b/apps/erp/app/modules/production/ui/DemandProjection/DemandProjectionForm.tsx
@@ -22,7 +22,12 @@ import {
import type { ChartConfig } from "@carbon/react/Chart";
import { ChartContainer, ChartTooltip } from "@carbon/react/Chart";
import { formatDate } from "@carbon/utils";
-import { getLocalTimeZone, startOfWeek, today } from "@internationalized/date";
+import {
+ getLocalTimeZone,
+ parseDate,
+ startOfWeek,
+ today
+} from "@internationalized/date";
import { useLingui } from "@lingui/react/macro";
import { useNumberFormatter } from "@react-aria/i18n";
import { memo, useDeferredValue, useEffect, useMemo, useState } from "react";
@@ -37,7 +42,12 @@ import {
} from "recharts";
import type { z } from "zod";
import { Hidden, Item, Location, Number, Submit } from "~/components/Form";
-import { usePermissions, useQuantityFormatter } from "~/hooks";
+import {
+ useCompanySettings,
+ usePermissions,
+ useQuantityFormatter
+} from "~/hooks";
+import { planningWeekNumber } from "~/modules/production/ui/Planning/planning-week-number";
import { path } from "~/utils/path";
import { demandProjectionValidator } from "../../production.models";
@@ -98,13 +108,28 @@ const DemandProjectionsForm = ({
const timeZone = getLocalTimeZone();
const startDate = startOfWeek(today(timeZone), "en-US");
- const weekLabels = Array.from({ length: WEEK_COUNT }, (_, i) => {
+ const useCalendarWeeks = useCompanySettings()?.useCalendarWeeks ?? false;
+ // The number each week is headed with: 1, 2, … from this week, or the
+ // calendar week of the year when the company plans by calendar week.
+ const firstWeek = startDate.toString();
+ const weekNumbers = useMemo(
+ () =>
+ Array.from({ length: WEEK_COUNT }, (_, i) =>
+ planningWeekNumber(
+ parseDate(firstWeek).add({ weeks: i }).toString(),
+ i,
+ useCalendarWeeks
+ )
+ ),
+ [firstWeek, useCalendarWeeks]
+ );
+ const weekLabels = weekNumbers.map((weekNumber, i) => {
const formattedDate = formatDate(
startDate.add({ weeks: i }).toString(),
{ month: "numeric", day: "numeric" },
i18n.locale
);
- return t`Week ${i + 1} (${formattedDate})`;
+ return t`Week ${weekNumber} (${formattedDate})`;
});
// Local mirror of the 52 week inputs, seeded from initialValues, that drives
@@ -151,12 +176,12 @@ const DemandProjectionsForm = ({
return deferredWeekValues.map((demand, i) => {
cumulative += demand;
return {
- week: i + 1,
+ week: weekNumbers[i] ?? i + 1,
demand,
cumulative
};
});
- }, [deferredWeekValues]);
+ }, [deferredWeekValues, weekNumbers]);
const chartConfig: ChartConfig = useMemo(
() => ({
diff --git a/apps/erp/app/modules/production/ui/DemandProjection/DemandProjectionTable.tsx b/apps/erp/app/modules/production/ui/DemandProjection/DemandProjectionTable.tsx
index 478ef27699..c4b437a580 100644
--- a/apps/erp/app/modules/production/ui/DemandProjection/DemandProjectionTable.tsx
+++ b/apps/erp/app/modules/production/ui/DemandProjection/DemandProjectionTable.tsx
@@ -34,6 +34,7 @@ import { useLocations } from "~/components/Form/Location";
import ItemThumbnail from "~/components/ItemThumbnail";
import { ConfirmDelete } from "~/components/Modals";
import { usePermissions } from "~/hooks";
+import { usePlanningWeekLabel } from "~/modules/production/ui/Planning/usePlanningWeekLabel";
import { path } from "~/utils/path";
import type { DemandProjection } from "../../types";
@@ -66,6 +67,7 @@ const DemandProjectionsTable = memo(
});
const [params] = useUrlParams();
const { t } = useLingui();
+ const weekLabel = usePlanningWeekLabel();
const { isPhone } = useViewport();
const permissions = usePermissions();
const locations = useLocations();
@@ -76,9 +78,8 @@ const DemandProjectionsTable = memo(
const columns = useMemo<ColumnDef<DemandProjection>[]>(() => {
const periodColumns: ColumnDef<DemandProjection>[] = periods.map(
(period, index) => {
- const isCurrentWeek = index === 0;
- const weekNumber = index + 1;
- const weekKey = `week${weekNumber}` as keyof DemandProjection;
+ const weekKey = `week${index + 1}` as keyof DemandProjection;
+ const label = weekLabel(period.startDate, index);
const startDate = parseDate(period.startDate).toDate(
getLocalTimeZone()
);
@@ -88,9 +89,7 @@ const DemandProjectionsTable = memo(
accessorKey: weekKey,
header: () => (
<VStack spacing={0}>
- <div>
- {isCurrentWeek ? "Present Week" : `Week ${weekNumber}`}
- </div>
+ <div>{label}</div>
<div className="text-xs text-muted-foreground">
{dateFormatter.format(startDate)} -{" "}
{dateFormatter.format(endDate)}
@@ -104,9 +103,7 @@ const DemandProjectionsTable = memo(
return <span>{numberFormatter.format(value)}</span>;
},
meta: {
- filterHeader: isCurrentWeek
- ? t`Present Week`
- : t`Week ${weekNumber}`,
+ filterHeader: label,
exportValue: (row: DemandProjection) => {
const value = row[weekKey] as number | undefined | null;
return value === undefined || value === null || value === 0
@@ -208,7 +205,15 @@ const DemandProjectionsTable = memo(
}
}
];
- }, [periods, dateFormatter, numberFormatter, locationId, permissions, t]);
+ }, [
+ periods,
+ dateFormatter,
+ numberFormatter,
+ locationId,
+ permissions,
+ t,
+ weekLabel
+ ]);
return (
<>
diff --git a/apps/erp/app/modules/production/ui/Planning/PlanningWeekStrip.tsx b/apps/erp/app/modules/production/ui/Planning/PlanningWeekStrip.tsx
index 28151134ce..5485b3669e 100644
--- a/apps/erp/app/modules/production/ui/Planning/PlanningWeekStrip.tsx
+++ b/apps/erp/app/modules/production/ui/Planning/PlanningWeekStrip.tsx
@@ -50,10 +50,12 @@ type Hovered = { index: number; element: HTMLElement };
*/
export const PlanningWeekStrip = memo(function PlanningWeekStrip({
periods,
- values
+ values,
+ weekLabel
}: {
periods: PlanningPeriod[];
values: (number | undefined)[];
+ weekLabel: (startDate: string, index: number) => string;
}) {
const { t } = useLingui();
const dateFormatter = useDateFormatter({ month: "short", day: "numeric" });
@@ -81,7 +83,6 @@ export const PlanningWeekStrip = memo(function PlanningWeekStrip({
const period = hovered ? periods[hovered.index] : undefined;
const value = hovered ? values[hovered.index] : undefined;
- const weekNumber = hovered ? hovered.index + 1 : 0;
return (
<Tooltip>
@@ -154,7 +155,7 @@ export const PlanningWeekStrip = memo(function PlanningWeekStrip({
<TooltipContent anchor={hovered.element}>
<div className="grid grid-cols-[auto_auto] gap-x-3 gap-y-0.5">
<span className="col-span-2 font-medium">
- {weekNumber === 1 ? t`Present Week` : t`Week ${weekNumber}`}
+ {weekLabel(period.startDate, hovered.index)}
</span>
<span className="col-span-2 text-xs text-muted-foreground">
{dateFormatter.formatRange(
diff --git a/apps/erp/app/modules/production/ui/Planning/ProductionPlanningTable.tsx b/apps/erp/app/modules/production/ui/Planning/ProductionPlanningTable.tsx
index b436e7a5a6..0781213422 100644
--- a/apps/erp/app/modules/production/ui/Planning/ProductionPlanningTable.tsx
+++ b/apps/erp/app/modules/production/ui/Planning/ProductionPlanningTable.tsx
@@ -74,6 +74,7 @@ import { splitOrdersByFence } from "~/modules/production/ui/Planning/planning-fe
import { planningColumns } from "~/modules/production/ui/Planning/planningColumns";
import { useJobPlanningRelease } from "~/modules/production/ui/Planning/useJobPlanningRelease";
import { usePlanningActions } from "~/modules/production/ui/Planning/usePlanningActions";
+import { usePlanningWeekLabel } from "~/modules/production/ui/Planning/usePlanningWeekLabel";
import type { action as mrpAction } from "~/routes/api+/mrp";
import type { action as bulkUpdateAction } from "~/routes/x+/production+/planning.update";
import { usePeople } from "~/stores";
@@ -116,6 +117,7 @@ const ProductionPlanningTable = ({
}: ProductionPlanningTableProps) => {
const permissions = usePermissions();
const { t, i18n } = useLingui();
+ const weekLabel = usePlanningWeekLabel();
// Memoized on the locale, so it never rebuilds `columns` on its own.
const formatQuantity = useQuantityFormatter();
@@ -466,6 +468,7 @@ const ProductionPlanningTable = ({
const shared = planningColumns<ProductionPlanningItem>({
i18n,
periods,
+ weekLabel,
locationToday,
formatQuantity,
unitOfMeasures,
@@ -658,7 +661,8 @@ const ProductionPlanningTable = ({
itemPostingGroups,
ordersByItemId,
timeFence,
- locationToday
+ locationToday,
+ weekLabel
// Note: ordersMap is intentionally not in deps to avoid column regeneration
// getOrdersForItem inside the cell will access the latest ordersMap via closure
]);
diff --git a/apps/erp/app/modules/production/ui/Planning/planning-week-number.test.ts b/apps/erp/app/modules/production/ui/Planning/planning-week-number.test.ts
new file mode 100644
index 0000000000..14899074cb
--- /dev/null
+++ b/apps/erp/app/modules/production/ui/Planning/planning-week-number.test.ts
@@ -0,0 +1,34 @@
+// SPDX-License-Identifier: AGPL-3.0-only
+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,
+// including ports, remain AGPLv3; serving them over a network requires releasing their source.
+
+import { describe, expect, it } from "vitest";
+import { planningWeekNumber } from "./planning-week-number";
+
+// Periods start on a Sunday (`getOrCreatePeriods`), the day before the ISO
+// week they mostly cover. Read on the Sunday itself, every heading would be a
+// week behind.
+describe("planningWeekNumber", () => {
+ it("counts from the present week by default", () => {
+ expect(planningWeekNumber("2026-10-25", 0, false)).toBe(1);
+ expect(planningWeekNumber("2026-11-01", 1, false)).toBe(2);
+ });
+
+ it("heads a Sunday-start period with the ISO week of its Monday", () => {
+ // Mon 2026-10-26 is in ISO week 44
+ expect(planningWeekNumber("2026-10-25", 0, true)).toBe(44);
+ expect(planningWeekNumber("2026-11-01", 1, true)).toBe(45);
+ });
+
+ it("crosses the year boundary", () => {
+ // 2026 starts on a Thursday, so it has 53 ISO weeks
+ expect(planningWeekNumber("2026-12-27", 9, true)).toBe(53);
+ expect(planningWeekNumber("2027-01-03", 10, true)).toBe(1);
+ // Mon 2025-12-29 is already week 1 of 2026
+ expect(planningWeekNumber("2025-12-28", 0, true)).toBe(1);
+ });
+
+ it("gives the same week for a Monday-start period", () => {
+ expect(planningWeekNumber("2026-10-26", 0, true)).toBe(44);
+ });
+});
diff --git a/apps/erp/app/modules/production/ui/Planning/planning-week-number.ts b/apps/erp/app/modules/production/ui/Planning/planning-week-number.ts
new file mode 100644
index 0000000000..f6d6f0fcbd
--- /dev/null
+++ b/apps/erp/app/modules/production/ui/Planning/planning-week-number.ts
@@ -0,0 +1,23 @@
+// SPDX-License-Identifier: AGPL-3.0-only
+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,
+// including ports, remain AGPLv3; serving them over a network requires releasing their source.
+
+import { datetime } from "@carbon/utils";
+import { parseDate } from "@internationalized/date";
+
+/**
+ * The number a planning week is headed with. Counted from today (the present
+ * week is 1, next week 2) unless the company plans by calendar week
+ * (`companySettings.useCalendarWeeks`), when it is the ISO 8601 week of the
+ * year. A period runs Sunday to Saturday (`getOrCreatePeriods`); its ISO week
+ * is read three days in, which is in the same ISO week whether the period
+ * starts on a Sunday or a Monday.
+ */
+export function planningWeekNumber(
+ startDate: string,
+ index: number,
+ useCalendarWeeks: boolean
+): number {
+ if (!useCalendarWeeks) return index + 1;
+ return datetime.weekNumber(parseDate(startDate).add({ days: 3 }));
+}
diff --git a/apps/erp/app/modules/production/ui/Planning/planningColumns.tsx b/apps/erp/app/modules/production/ui/Planning/planningColumns.tsx
index cf49521820..c303c9c257 100644
--- a/apps/erp/app/modules/production/ui/Planning/planningColumns.tsx
+++ b/apps/erp/app/modules/production/ui/Planning/planningColumns.tsx
@@ -51,7 +51,6 @@ import type { PurchasingPlanningItem } from "~/modules/purchasing/types";
// `useLingui`'s `t`; the grid's `i18n` renders them.
const LABELS = {
stockAvailability: msg`Stock Availability`,
- presentWeek: msg`Present Week`,
unitOfMeasure: msg`Unit of Measure`,
itemGroup: msg`Item Group`,
reorderPolicy: msg`Reorder Policy`,
@@ -62,8 +61,6 @@ const LABELS = {
type: msg`Type`
};
-const weekLabel = (weekNumber: number) => msg`Week ${weekNumber}`;
-
type PlanningRow = ProductionPlanningItem | PurchasingPlanningItem;
type Option = { value: string; label: string };
@@ -76,11 +73,13 @@ type Option = { value: string; label: string };
* `accessorKey` is typed against the union of the two row types, which the
* grid's own row type narrows; the cast at the end is that narrowing.
*
- * Labels come from `LABELS` and render through the grid's `i18n`.
+ * Labels come from `LABELS` and render through the grid's `i18n`; a week's
+ * heading comes from `weekLabel` (`usePlanningWeekLabel`).
*/
export function planningColumns<T extends PlanningRow>(ctx: {
i18n: I18n;
periods: { id: string; startDate: string; endDate: string }[];
+ weekLabel: (startDate: string, index: number) => string;
locationToday: string;
formatQuantity: (quantity: number) => string;
unitOfMeasures: Option[];
@@ -91,6 +90,7 @@ export function planningColumns<T extends PlanningRow>(ctx: {
const {
i18n,
periods,
+ weekLabel,
locationToday,
formatQuantity,
unitOfMeasures,
@@ -110,6 +110,7 @@ export function planningColumns<T extends PlanningRow>(ctx: {
<PlanningWeekStrip
periods={periods}
values={planningWeekValues(row.original, periods)}
+ weekLabel={weekLabel}
/>
),
size: planningWeekStripSize(periods.length),
@@ -117,15 +118,11 @@ export function planningColumns<T extends PlanningRow>(ctx: {
icon: <LuChartNoAxesColumn />
}
},
- ...periods.map((_, index) => {
- const weekNumber = index + 1;
- const weekKey = `week${weekNumber}` as keyof PlanningRow;
+ ...periods.map((period, index) => {
+ const weekKey = `week${index + 1}` as keyof PlanningRow;
return exportOnlyColumn<PlanningRow>({
id: weekKey,
- header:
- index === 0
- ? i18n._(LABELS.presentWeek)
- : i18n._(weekLabel(weekNumber)),
+ header: weekLabel(period.startDate, index),
value: (row) => {
const value = row[weekKey] as number | undefined;
return value === undefined ? null : value;
diff --git a/apps/erp/app/modules/production/ui/Planning/usePlanningWeekLabel.ts b/apps/erp/app/modules/production/ui/Planning/usePlanningWeekLabel.ts
new file mode 100644
index 0000000000..fec62667b5
--- /dev/null
+++ b/apps/erp/app/modules/production/ui/Planning/usePlanningWeekLabel.ts
@@ -0,0 +1,27 @@
+// SPDX-License-Identifier: AGPL-3.0-only
+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,
+// including ports, remain AGPLv3; serving them over a network requires releasing their source.
+
+import { useLingui } from "@lingui/react/macro";
+import { useCallback } from "react";
+import { useCompanySettings } from "~/hooks";
+import { planningWeekNumber } from "./planning-week-number";
+
+/**
+ * The heading of the planning week starting `startDate`, at position `index`
+ * from today: "Present Week", "Week 2", … or, by calendar week, "Week 44",
+ * "Week 45", …. One function for the planning grids, the week strip and Demand
+ * Forecasts, so they can never head the same week two ways.
+ */
+export function usePlanningWeekLabel() {
+ const { t } = useLingui();
+ const useCalendarWeeks = useCompanySettings()?.useCalendarWeeks ?? false;
+ return useCallback(
+ (startDate: string, index: number) => {
+ if (!useCalendarWeeks && index === 0) return t`Present Week`;
+ const weekNumber = planningWeekNumber(startDate, index, useCalendarWeeks);
+ return t`Week ${weekNumber}`;
+ },
+ [t, useCalendarWeeks]
+ );
+}
diff --git a/apps/erp/app/modules/purchasing/ui/Planning/PurchasingPlanningTable.tsx b/apps/erp/app/modules/purchasing/ui/Planning/PurchasingPlanningTable.tsx
index 372f6b46b8..07296fac81 100644
--- a/apps/erp/app/modules/purchasing/ui/Planning/PurchasingPlanningTable.tsx
+++ b/apps/erp/app/modules/purchasing/ui/Planning/PurchasingPlanningTable.tsx
@@ -78,6 +78,7 @@ import {
import { splitOrdersByFence } from "~/modules/production/ui/Planning/planning-fence";
import { planningColumns } from "~/modules/production/ui/Planning/planningColumns";
import { usePlanningActions } from "~/modules/production/ui/Planning/usePlanningActions";
+import { usePlanningWeekLabel } from "~/modules/production/ui/Planning/usePlanningWeekLabel";
import type { action as mrpAction } from "~/routes/api+/mrp";
import type { action as bulkUpdateAction } from "~/routes/x+/purchasing+/planning.update";
import { useItems, usePeople } from "~/stores";
@@ -123,6 +124,7 @@ const PlanningTable = memo(
locationToday
}: PlanningTableProps) => {
const { t, i18n } = useLingui();
+ const weekLabel = usePlanningWeekLabel();
const permissions = usePermissions();
// Memoized on the locale, so it never rebuilds `columns` on its own.
@@ -549,6 +551,7 @@ const PlanningTable = memo(
const shared = planningColumns<PurchasingPlanningItem>({
i18n,
periods,
+ weekLabel,
locationToday,
formatQuantity,
unitOfMeasures,
@@ -787,7 +790,8 @@ const PlanningTable = memo(
itemPostingGroups,
ordersByItemId,
timeFence,
- locationToday
+ locationToday,
+ weekLabel
// Note: ordersMap is intentionally not in deps to avoid column regeneration
// getOrdersForItem inside the cell will access the latest ordersMap via closure
]);
diff --git a/apps/erp/app/modules/settings/settings.models.ts b/apps/erp/app/modules/settings/settings.models.ts
index 26ab4ae819..c9774af817 100644
--- a/apps/erp/app/modules/settings/settings.models.ts
+++ b/apps/erp/app/modules/settings/settings.models.ts
@@ -38,6 +38,10 @@ export const modulesType = [
export const kanbanOutputTypes = ["label", "qrcode", "url"] as const;
+// Mirrors the `kanbanLabelSize` DB enum. `letter` is a sheet of six; the
+// others are thermal label ids in @carbon/utils `labelSizes`.
+export const kanbanLabelSizes = ["letter", "label4x2", "label3x2"] as const;
+
// Mirrors the `invoiceAutomation` DB enum: what happens to a recurring
// invoice (rental agreements today) when the daily job creates it.
export const invoiceAutomations = [
@@ -326,7 +330,9 @@ export const mrpScheduleValidator = z
);
export const kanbanOutputValidator = z.object({
- kanbanOutput: z.enum(kanbanOutputTypes)
+ kanbanOutput: z.enum(kanbanOutputTypes),
+ // Only on the form while the output is a label.
+ kanbanLabelSize: z.enum(kanbanLabelSizes).optional()
});
export const plmReleaseControlValidator = z.object({
diff --git a/apps/erp/app/modules/settings/settings.server.ts b/apps/erp/app/modules/settings/settings.server.ts
index 35b5e41d03..f6420ac823 100644
--- a/apps/erp/app/modules/settings/settings.server.ts
+++ b/apps/erp/app/modules/settings/settings.server.ts
@@ -94,6 +94,7 @@ import {
expiredEntityPolicies,
incompletePickingListPolicies,
invoiceAutomations,
+ kanbanLabelSizes,
kanbanOutputTypes,
purchasePriceUpdateTimingTypes,
returnPickedMaterialTimings,
@@ -228,7 +229,8 @@ export const writeMissingJournals = defineServiceFn({
*
* @remarks
* Writes the fields sent and leaves the rest: what a kanban card prints
- * (label, QR code or URL), the shelf-life and expiry policy (the near-expiry
+ * (label, QR code or URL) and the size its label prints at (a letter sheet of
+ * six, or a 4" x 2" or 3" x 2" thermal label), the shelf-life and expiry policy (the near-expiry
* warning in days, null to turn the badges off; the default shelf life of a
* new item; which inputs a calculated expiry reads; and what consuming an
* expired entity does), whether finishing a picking list with unpicked
@@ -242,6 +244,7 @@ export const writeMissingJournals = defineServiceFn({
export const updateInventorySettings = defineServiceFn({
input: z.object({
kanbanOutput: z.enum(kanbanOutputTypes).optional(),
+ kanbanLabelSize: z.enum(kanbanLabelSizes).optional(),
inventoryShelfLife: z
.object({
nearExpiryWarningDays: z.number().int().min(0).max(365).nullable(),
@@ -782,9 +785,11 @@ const employeeOrNone = z.string().min(1).nullable();
* resources update permission it is refused. Then whether purchase orders
* the planning pages raise skip approval, the reschedule tolerance in days,
* the default planning horizon in days (null for no time fence), the forecast
- * consumption window in weekly periods back and forward, and the time of day
+ * consumption window in weekly periods back and forward, the time of day
* scheduled MRP runs on the company's clock ("HH:MM" or "HH:MM:SS"; null runs
- * it every 3 hours).
+ * it every 3 hours), and whether the planning grids and demand forecasts head
+ * their weeks by calendar week (ISO 8601 week of the year) rather than
+ * counting from the present week.
*
* @mcp
*/
@@ -805,6 +810,7 @@ export const updatePlanningSettings = defineServiceFn({
})
.optional(),
skipApprovalForPlanningPurchaseOrders: z.boolean().optional(),
+ useCalendarWeeks: z.boolean().optional(),
rescheduleToleranceDays: z.number().int().min(0).max(365).optional(),
defaultPlanningHorizonDays: z
.number()
diff --git a/apps/erp/app/modules/settings/settings.service.ts b/apps/erp/app/modules/settings/settings.service.ts
index 409c6166b0..5c0f92f8a9 100644
--- a/apps/erp/app/modules/settings/settings.service.ts
+++ b/apps/erp/app/modules/settings/settings.service.ts
@@ -700,7 +700,7 @@ export async function getKanbanOutputSetting(
) {
return client
.from("companySettings")
- .select("kanbanOutput")
+ .select("kanbanOutput, kanbanLabelSize")
.eq("id", companyId)
.single();
}
diff --git a/apps/erp/app/modules/settings/ui/Planning/CalendarWeeksCard.tsx b/apps/erp/app/modules/settings/ui/Planning/CalendarWeeksCard.tsx
new file mode 100644
index 0000000000..315f95e5e0
--- /dev/null
+++ b/apps/erp/app/modules/settings/ui/Planning/CalendarWeeksCard.tsx
@@ -0,0 +1,101 @@
+// SPDX-License-Identifier: AGPL-3.0-only
+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,
+// including ports, remain AGPLv3; serving them over a network requires releasing their source.
+
+import { serviceErrorMessage, useAction } from "@carbon/query";
+import {
+ Card,
+ CardContent,
+ CardDescription,
+ CardHeader,
+ CardTitle,
+ HStack,
+ Switch,
+ toast,
+ VStack
+} from "@carbon/react";
+import { Trans, useLingui } from "@lingui/react/macro";
+import { useState } from "react";
+
+// One settings card = one saved concern (archetype F): how the planning grids
+// and demand forecasts head their weekly columns.
+
+export function CalendarWeeksCard({
+ useCalendarWeeks
+}: {
+ useCalendarWeeks: boolean;
+}) {
+ const { t } = useLingui();
+ const [enabled, setEnabled] = useState(useCalendarWeeks);
+ const fetcher = useAction({
+ onSuccess: ({ data }) => {
+ toast.success(
+ data?.useCalendarWeeks
+ ? t`Weeks are numbered by calendar week`
+ : t`Weeks are numbered from the present week`
+ );
+ },
+ onError: (result) => {
+ // the switch moved before the save: put it back
+ setEnabled(useCalendarWeeks);
+ toast.error(
+ serviceErrorMessage(result) ?? t`Failed to update the setting`
+ );
+ }
+ });
+
+ return (
+ <Card>
+ <CardHeader>
+ <CardTitle>
+ <Trans>Calendar Weeks</Trans>
+ </CardTitle>
+ <CardDescription>
+ <Trans>
+ How the weekly columns of Material Planning, Production Planning and
+ Demand Forecasts are numbered.
+ </Trans>
+ </CardDescription>
+ </CardHeader>
+ <CardContent>
+ <HStack className="justify-between items-center">
+ <VStack className="items-start" spacing={1}>
+ <span className="font-medium">
+ {enabled ? (
+ <Trans>Number weeks by calendar week</Trans>
+ ) : (
+ <Trans>Number weeks from the present week</Trans>
+ )}
+ </span>
+ <span className="text-sm text-muted-foreground">
+ {enabled ? (
+ <Trans>
+ Each week is headed with its ISO 8601 week of the year: Week
+ 44, Week 45, Week 46.
+ </Trans>
+ ) : (
+ <Trans>
+ Weeks are counted from today: Present Week, Week 2, Week 3.
+ </Trans>
+ )}
+ </span>
+ </VStack>
+ <Switch
+ checked={enabled}
+ disabled={fetcher.state !== "idle"}
+ onCheckedChange={(checked) => {
+ setEnabled(checked);
+ fetcher.submit(
+ {
+ intent: "setCalendarWeeks",
+ enabled: checked.toString()
+ },
+ { method: "post" }
+ );
+ }}
+ />
+ </HStack>
+ </CardContent>
+ </Card>
+ );
+}
diff --git a/apps/erp/app/modules/settings/ui/Planning/index.ts b/apps/erp/app/modules/settings/ui/Planning/index.ts
index 51bf776aaa..2beb11f458 100644
--- a/apps/erp/app/modules/settings/ui/Planning/index.ts
+++ b/apps/erp/app/modules/settings/ui/Planning/index.ts
@@ -2,6 +2,7 @@
// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,
// including ports, remain AGPLv3; serving them over a network requires releasing their source.
+export { CalendarWeeksCard } from "./CalendarWeeksCard";
export { ForecastConsumptionCard } from "./ForecastConsumptionCard";
export { MrpScheduleCard } from "./MrpScheduleCard";
export { PlanningHorizonCard } from "./PlanningHorizonCard";
diff --git a/apps/erp/app/routes/api+/mcp+/lib/tool-manifest.digest.json b/apps/erp/app/routes/api+/mcp+/lib/tool-manifest.digest.json
index 7ec8701e9b..5867c0f3a0 100644
--- a/apps/erp/app/routes/api+/mcp+/lib/tool-manifest.digest.json
+++ b/apps/erp/app/routes/api+/mcp+/lib/tool-manifest.digest.json
@@ -1,5 +1,5 @@
{
- "totalTools": 1620,
+ "totalTools": 1621,
"modules": 14,
"tools": [
{"name":"accounting_closePeriod","classification":"WRITE","schema":"7e5905ac5974","response":"7e5905ac5974","permission":"accounting:update","paginates":false},
@@ -197,9 +197,9 @@
{"name":"inventory_getInventoryValuationTieOut","classification":"READ","schema":"70fbe1224878","response":"20aee38c95a3","permission":"accounting:view","paginates":false},
{"name":"inventory_getItemLedgerActivity","classification":"READ","schema":"019d7d34869e","response":"855f6c444e56","permission":"inventory:view","paginates":false},
{"name":"inventory_getItemLedgerBalance","classification":"READ","schema":"798c87d1101b","response":"cddf8275afa1","permission":"inventory:view","paginates":false},
- {"name":"inventory_getKanban","classification":"READ","schema":"84ad7166f1d7","response":"a4f312fff33a","permission":"inventory:view","paginates":false},
+ {"name":"inventory_getKanban","classification":"READ","schema":"84ad7166f1d7","response":"41ed6321d385","permission":"inventory:view","paginates":false},
{"name":"inventory_getKanbanProjectedQuantities","classification":"READ","schema":"333fb45d8bc5","response":"98903cc375ce","permission":"inventory:view","paginates":false},
- {"name":"inventory_getKanbans","classification":"READ","schema":"a135d0d54fd9","response":"10c63802d01c","permission":"inventory:view","paginates":true},
+ {"name":"inventory_getKanbans","classification":"READ","schema":"a135d0d54fd9","response":"82f6bc80f593","permission":"inventory:view","paginates":true},
{"name":"inventory_getPickingList","classification":"READ","schema":"06ea967dd6ad","response":"bdbdc3b12cd7","permission":"inventory:view","paginates":false},
{"name":"inventory_getPickingListAvailability","classification":"READ","schema":"06ea967dd6ad","response":"a2c799262a3c","permission":"inventory:view","paginates":false},
{"name":"inventory_getPickingListLine","classification":"READ","schema":"e2b1df794940","response":"58364897e03b","permission":"inventory:view","paginates":false},
@@ -756,6 +756,7 @@
{"name":"production_getJobOperationsByMethodId","classification":"READ","schema":"7679db37b5f9","response":"02e990581d5b","permission":"production:view","paginates":false},
{"name":"production_getJobOperationsList","classification":"READ","schema":"ca49bc65b712","response":"4e5425835530","permission":"production:view","paginates":false},
{"name":"production_getJobOperationStepRecords","classification":"READ","schema":"f67274205e12","response":"7bd4e5876d03","permission":"production:view","paginates":true},
+ {"name":"production_getJobOperationStepTimings","classification":"READ","schema":"23bc16ad9c9a","response":"b215280a3520","permission":"production:view","paginates":false},
{"name":"production_getJobOrderStatusMap","classification":"READ","schema":"cc93d4900988","response":"5a380f81ad00","permission":"production:view","paginates":false},
{"name":"production_getJobPurchaseOrderLines","classification":"READ","schema":"ca49bc65b712","response":"f0dff75b384d","permission":"production:view","paginates":false},
{"name":"production_getJobReceiptSnapshot","classification":"READ","schema":"ca49bc65b712","response":"60e9609498b0","permission":"production:view","paginates":false},
@@ -1523,7 +1524,7 @@
{"name":"settings_getApiKeys","classification":"WRITE","schema":"cd40ae40fad5","response":"14fbafc2ddf8","permission":"users:update","paginates":true},
{"name":"settings_getCompanies","classification":"READ","schema":"31b84d65b2ac","response":"5783a32e0f4a","permission":"settings:view","paginates":false},
{"name":"settings_getCompany","classification":"READ","schema":"31b84d65b2ac","response":"81a93f0029ec","permission":"settings:view","paginates":false},
- {"name":"settings_getCompanySettings","classification":"READ","schema":"31b84d65b2ac","response":"48e7c9c6359b","permission":"settings:view","paginates":false},
+ {"name":"settings_getCompanySettings","classification":"READ","schema":"31b84d65b2ac","response":"aeaecb805f25","permission":"settings:view","paginates":false},
{"name":"settings_getConfig","classification":"READ","schema":"31b84d65b2ac","response":"aa1021ff34cf","permission":"settings:view","paginates":false},
{"name":"settings_getCurrentSequence","classification":"READ","schema":"31018ffa701d","response":"00404e686415","permission":"settings:view","paginates":false},
{"name":"settings_getCustomField","classification":"READ","schema":"7f8214d1083f","response":"a533a796c094","permission":"settings:view","paginates":false},
@@ -1537,7 +1538,7 @@
{"name":"settings_getIntegration","classification":"READ","schema":"7f8214d1083f","response":"099545249106","permission":"settings:view","paginates":false},
{"name":"settings_getItemSerialSequence","classification":"READ","schema":"7f8214d1083f","response":"53bc3fc24551","permission":"settings:view","paginates":false},
{"name":"settings_getItemSerialSequences","classification":"READ","schema":"cd40ae40fad5","response":"749c06d79ab2","permission":"settings:view","paginates":true},
- {"name":"settings_getKanbanOutputSetting","classification":"READ","schema":"31b84d65b2ac","response":"ca53dc098fc8","permission":"settings:view","paginates":false},
+ {"name":"settings_getKanbanOutputSetting","classification":"READ","schema":"31b84d65b2ac","response":"465d5556f739","permission":"settings:view","paginates":false},
{"name":"settings_getNextSequence","classification":"WRITE","schema":"31018ffa701d","response":"00404e686415","permission":"settings:update","paginates":false},
{"name":"settings_getPlans","classification":"READ","schema":"31b84d65b2ac","response":"5483e69d7515","permission":"settings:view","paginates":false},
{"name":"settings_getSequence","classification":"READ","schema":"31018ffa701d","response":"ef17e2453ded","permission":"settings:view","paginates":false},
@@ -1559,11 +1560,11 @@
{"name":"settings_updateAccountingSettings","classification":"WRITE","schema":"ecf0d5091645","response":"70bcf2b87ee3","permission":"settings:update","paginates":false},
{"name":"settings_updateCompanyDetails","classification":"WRITE","schema":"f48dad39eb59","response":"3797626bd17e","permission":"settings:update","paginates":false},
{"name":"settings_updateDimensionSync","classification":"WRITE","schema":"42c99362fccd","response":"f95fa90d0071","permission":"settings:update","paginates":false},
- {"name":"settings_updateInventorySettings","classification":"WRITE","schema":"a76084d47705","response":"d62a56ef4842","permission":"settings:update","paginates":false},
+ {"name":"settings_updateInventorySettings","classification":"WRITE","schema":"0e3ab179b505","response":"fff819da85bf","permission":"settings:update","paginates":false},
{"name":"settings_updateInvoicingSettings","classification":"WRITE","schema":"48fd9aba9ea8","response":"a32ee5ad2099","permission":"settings:update","paginates":false},
{"name":"settings_updateItemSerialSequence","classification":"WRITE","schema":"432dc38ca4a4","response":"3797626bd17e","permission":"settings:update","paginates":false},
{"name":"settings_updateItemsSettings","classification":"WRITE","schema":"b4f7e7addad9","response":"03604adb2677","permission":"settings:update","paginates":false},
- {"name":"settings_updatePlanningSettings","classification":"WRITE","schema":"0c543ed217a3","response":"0b9572e63423","permission":"settings:update","paginates":false},
+ {"name":"settings_updatePlanningSettings","classification":"WRITE","schema":"6e1f9d38157d","response":"2b51b42494c6","permission":"settings:update","paginates":false},
{"name":"settings_updatePostingSync","classification":"WRITE","schema":"a545e3ef8da3","response":"f95fa90d0071","permission":"settings:update","paginates":false},
{"name":"settings_updateProductionSettings","classification":"WRITE","schema":"1ba094b13528","response":"c1002c089757","permission":"settings:update","paginates":false},
{"name":"settings_updatePurchasingSettings","classification":"WRITE","schema":"21a4367cb133","response":"8e3c8fcc0dc8","permission":"settings:update","paginates":false},
diff --git a/apps/erp/app/routes/file+/kanban+/labels.$action[.]pdf.tsx b/apps/erp/app/routes/file+/kanban+/labels.$action[.]pdf.tsx
index baeda4111d..b4844739a2 100644
--- a/apps/erp/app/routes/file+/kanban+/labels.$action[.]pdf.tsx
+++ b/apps/erp/app/routes/file+/kanban+/labels.$action[.]pdf.tsx
@@ -5,29 +5,29 @@
import { requirePermissions } from "@carbon/auth/auth.server";
import { KanbanLabelPDF } from "@carbon/documents/pdf";
import { getLogger } from "@carbon/logger";
-import { getRequestOrigin } from "@carbon/utils";
+import { getRequestOrigin, labelSizes } from "@carbon/utils";
import { renderToStream } from "@react-pdf/renderer";
import type { LoaderFunctionArgs } from "react-router";
-import { getCompany } from "~/modules/settings/settings.service";
+import { kanbanLabelSizes } from "~/modules/settings/settings.models";
+import {
+ getCompany,
+ getKanbanOutputSetting
+} from "~/modules/settings/settings.service";
import { getBase64ImageFromSupabase } from "~/modules/shared/shared.service";
-const logger = getLogger("erp", "labels-action-pdf");
+const logger = getLogger("erp", "kanban-labels-pdf");
+
+const ACTIONS = ["order", "start", "complete"] as const;
export async function loader({ request, params }: LoaderFunctionArgs) {
const { client, companyId } = await requirePermissions(request, {
view: "inventory"
});
- const company = await getCompany(client, companyId);
- if (company.error) {
- logger.error(company.error);
- throw new Error("Failed to load company");
- }
-
- const { action } = params;
- if (!action) throw new Error("Could not find kanban action");
- if (!["order", "start", "complete"].includes(action)) {
- throw new Error("Invalid kanban action");
+ // One action per card: Create, Start and Complete are separate cards.
+ const action = ACTIONS.find((a) => a === params.action);
+ if (!action) {
+ return new Response("Invalid kanban action", { status: 400 });
}
const url = new URL(request.url);
@@ -38,88 +38,86 @@ export async function loader({ request, params }: LoaderFunctionArgs) {
return new Response("No kanban IDs provided", { status: 400 });
}
- // Parse comma-separated IDs
- const kanbanIds = idsParam.split(",").map((id) => id.trim());
-
+ const kanbanIds = idsParam
+ .split(",")
+ .map((id) => id.trim())
+ .filter(Boolean);
if (kanbanIds.length === 0) {
return new Response("No valid kanban IDs provided", { status: 400 });
}
- // Fetch all kanban records in parallel
- const kanbanPromises = kanbanIds.map((id) =>
- client.from("kanbans").select("*").eq("id", id).single()
+ const [company, setting, kanbans] = await Promise.all([
+ getCompany(client, companyId),
+ getKanbanOutputSetting(client, companyId),
+ client
+ .from("kanbans")
+ .select("*")
+ .in("id", kanbanIds)
+ .eq("companyId", companyId)
+ ]);
+ if (company.error) {
+ logger.error("Failed to load company", { companyId, error: company.error });
+ throw new Error("Failed to load company");
+ }
+ if (kanbans.error) {
+ logger.error("Failed to load kanbans", {
+ companyId,
+ error: kanbans.error
+ });
+ throw new Error("Failed to load kanbans");
+ }
+
+ // `?labelSize=` overrides the company's Label Size setting.
+ const requested = url.searchParams.get("labelSize");
+ const sizeId =
+ kanbanLabelSizes.find((s) => s === requested) ??
+ setting.data?.kanbanLabelSize ??
+ "letter";
+ const labelSize = labelSizes.find((s) => s.id === sizeId);
+
+ // In the order asked for: .in() returns rows in no particular order.
+ const rows = kanbanIds.flatMap(
+ (id) => kanbans.data?.filter((k) => k.id === id) ?? []
);
- const kanbanResults = await Promise.all(kanbanPromises);
-
- // Collect all thumbnails paths first
- const thumbnailPaths: Record<string, string> = {};
- const validKanbans: typeof kanbanResults = [];
-
- for (const result of kanbanResults) {
- if (!result.error && result.data) {
- validKanbans.push(result);
- if (result.data.thumbnailPath && result.data.id) {
- thumbnailPaths[result.data.id] = result.data.thumbnailPath;
- }
- }
+ if (rows.length === 0) {
+ return new Response("No valid kanbans found", { status: 404 });
}
- // Fetch all thumbnails in parallel
+ // Only the letter sheet prints the item thumbnail.
const thumbnails: Record<string, string | null> = {};
- if (Object.keys(thumbnailPaths).length > 0) {
- const thumbnailPromises = Object.entries(thumbnailPaths).map(
- async ([id, path]) => {
- const base64 = await getBase64ImageFromSupabase(client, path);
- return { id, data: base64 };
- }
+ if (!labelSize) {
+ await Promise.all(
+ rows.map(async (kanban) => {
+ if (!kanban.id || !kanban.thumbnailPath) return;
+ thumbnails[kanban.id] = await getBase64ImageFromSupabase(
+ client,
+ kanban.thumbnailPath
+ );
+ })
);
-
- const thumbnailResults = await Promise.all(thumbnailPromises);
- for (const thumbnail of thumbnailResults) {
- if (thumbnail.data) {
- thumbnails[thumbnail.id] = thumbnail.data;
- }
- }
}
- // Transform to label format
- const labels = [];
-
- for (const result of validKanbans) {
- if (!result.error && result.data) {
- const kanban = result.data;
-
- // Prepare label data
- const labelData = {
- id: kanban.id!,
- itemId: kanban.itemId!,
- itemName: kanban.name || "",
- itemReadableId: kanban.readableIdWithRevision || kanban.itemId!,
- locationName: kanban.locationName || "",
- storageUnitId: kanban.storageUnitId,
- storageUnitName: kanban.storageUnitName,
- fromStorageUnitName: kanban.fromStorageUnitName,
- supplierName: kanban.supplierName,
- quantity: kanban.quantity ?? 0,
- replenishmentLevel: kanban.replenishmentLevel,
- unitOfMeasureCode: kanban.purchaseUnitOfMeasureCode,
- thumbnail: thumbnails[kanban.id!] || null
- };
-
- labels.push(labelData);
- }
- }
-
- if (labels.length === 0) {
- return new Response("No valid kanbans found", { status: 404 });
- }
+ const labels = rows.map((kanban) => ({
+ id: kanban.id!,
+ kanbanId: kanban.kanbanId,
+ itemName: kanban.name || "",
+ itemReadableId: kanban.readableIdWithRevision || kanban.itemId || "",
+ locationName: kanban.locationName || "",
+ storageUnitName: kanban.storageUnitName,
+ fromStorageUnitName: kanban.fromStorageUnitName,
+ supplierName: kanban.supplierName,
+ quantity: kanban.quantity ?? 0,
+ replenishmentLevel: kanban.replenishmentLevel,
+ unitOfMeasureCode: kanban.purchaseUnitOfMeasureCode,
+ thumbnail: thumbnails[kanban.id!] ?? null
+ }));
- // Generate PDF
const stream = await renderToStream(
<KanbanLabelPDF
baseUrl={baseUrl}
labels={labels}
- action={action as "order" | "start" | "complete"}
+ action={action}
+ labelSize={labelSize}
/>
);
diff --git a/apps/erp/app/routes/x+/settings+/inventory.tsx b/apps/erp/app/routes/x+/settings+/inventory.tsx
index 1d026514d5..bd0a571fec 100644
--- a/apps/erp/app/routes/x+/settings+/inventory.tsx
+++ b/apps/erp/app/routes/x+/settings+/inventory.tsx
@@ -51,6 +51,7 @@ import SettingsSectionHeader from "~/components/SettingsSectionHeader";
import { useSavedToggle } from "~/hooks/useSavedToggle";
import {
incompletePickingListPolicyValidator,
+ type kanbanLabelSizes,
kanbanOutputTypes,
kanbanOutputValidator,
returnPickedMaterialTimingValidator,
@@ -180,7 +181,8 @@ export default function InventorySettingsRoute() {
method="post"
validator={kanbanOutputValidator}
defaultValues={{
- kanbanOutput: companySettings.kanbanOutput ?? "qrcode"
+ kanbanOutput: companySettings.kanbanOutput ?? "qrcode",
+ kanbanLabelSize: companySettings.kanbanLabelSize ?? "letter"
}}
fetcher={fetcher}
>
@@ -206,6 +208,7 @@ export default function InventorySettingsRoute() {
label: outputLabels[type]
}))}
/>
+ <KanbanLabelSizeField />
</div>
</div>
</CardContent>
@@ -457,6 +460,31 @@ function ShelfLifeNumbers() {
);
}
+// The size a kanban label prints at, asked only when the output is a label.
+function KanbanLabelSizeField() {
+ const { t } = useLingui();
+ const [output] = useControlField<string>("kanbanOutput");
+ if (output !== "label") return null;
+
+ const sizeLabels: Record<(typeof kanbanLabelSizes)[number], string> = {
+ letter: t`Letter, 6 per page`,
+ label4x2: t`4" x 2" label`,
+ label3x2: t`3" x 2" label`
+ };
+
+ return (
+ <Select
+ name="kanbanLabelSize"
+ label={t`Label Size`}
+ helperText={t`A 4" x 2" or 3" x 2" label prints one card per label, for a thermal printer such as a Zebra.`}
+ options={Object.entries(sizeLabels).map(([value, label]) => ({
+ value,
+ label
+ }))}
+ />
+ );
+}
+
// ChoiceSelect for the Calculated-mode input scope. Compact trigger plus
// a rich dropdown — keeps the form scannable while still surfacing the
// trade-off when the user opens the picker.
diff --git a/apps/erp/app/routes/x+/settings+/planning.tsx b/apps/erp/app/routes/x+/settings+/planning.tsx
index e580e8fd0b..354a9d0c70 100644
--- a/apps/erp/app/routes/x+/settings+/planning.tsx
+++ b/apps/erp/app/routes/x+/settings+/planning.tsx
@@ -28,6 +28,7 @@ import {
getItemPostingGroupResponsibilities
} from "~/modules/settings/settings.service";
import {
+ CalendarWeeksCard,
ForecastConsumptionCard,
MrpScheduleCard,
PlanningHorizonCard,
@@ -106,6 +107,7 @@ export async function loader({ request }: LoaderFunctionArgs) {
mrpRunTime: companySettings.data.mrpRunTime ?? null,
skipApprovalForPlanningPurchaseOrders:
companySettings.data.skipApprovalForPlanningPurchaseOrders ?? true,
+ useCalendarWeeks: companySettings.data.useCalendarWeeks ?? false,
locations: locations.data ?? [],
itemGroups: itemGroups.data ?? [],
responsibilities: responsibilities.data ?? []
@@ -157,6 +159,7 @@ const planningSettingsForm = z.discriminatedUnion("intent", [
"setPlanningPurchaseOrderApproval",
"skipApprovalForPlanningPurchaseOrders"
),
+ settingsToggle("setCalendarWeeks", "useCalendarWeeks"),
rescheduleToleranceValidator
.extend({ intent: z.literal("setTolerance") })
.transform(({ days }) => ({ rescheduleToleranceDays: days })),
@@ -192,6 +195,7 @@ export default function PlanningSettingsRoute() {
forecastConsumptionForwardPeriods,
mrpRunTime,
skipApprovalForPlanningPurchaseOrders,
+ useCalendarWeeks,
locations,
itemGroups,
responsibilities
@@ -221,6 +225,7 @@ export default function PlanningSettingsRoute() {
backwardPeriods={forecastConsumptionBackwardPeriods}
forwardPeriods={forecastConsumptionForwardPeriods}
/>
+ <CalendarWeeksCard useCalendarWeeks={useCalendarWeeks} />
<PlanningPurchaseOrderApprovalCard
skipApprovalForPlanningPurchaseOrders={
skipApprovalForPlanningPurchaseOrders
diff --git a/apps/mes/app/components/AssemblyView.tsx b/apps/mes/app/components/AssemblyView.tsx
index ab9b7971ed..349d3d4f12 100644
--- a/apps/mes/app/components/AssemblyView.tsx
+++ b/apps/mes/app/components/AssemblyView.tsx
@@ -116,7 +116,7 @@ import type {
OperationWithDetails,
ProductionEvent as ProductionEventType
} from "~/services/types";
-import { isKanbanCompleteScan } from "~/utils/kanban";
+import { isKanbanCompleteScan, kanbanCompleteTarget } from "~/utils/kanban";
import { ORIGIN_PARAM, readOrigin, useOrigin } from "~/utils/origin";
import { getPrivateUrl, path } from "~/utils/path";
import { deriveUnits } from "~/utils/units";
@@ -597,11 +597,36 @@ export function AssemblyView({
// Kanban barcode scan → complete the operation (matches the operation view).
// The wedge takes a scan's Enter in the capture phase, so the Enter/Space
- // shortcut below never sees it.
+ // shortcut below never sees it. A serial scan completes the unit on screen
+ // (the ?trackedEntityId the operator scanned or selected), never one the
+ // server picks: at a later operation that pick need not be the unit in hand.
+ const selectedEntityParam = searchParams.get("trackedEntityId");
const completeFetcher = useFetcher();
useKeyboardWedge({
test: (input) => !!kanban && isKanbanCompleteScan(input, kanban),
- callback: () => completeFetcher.load(path.to.endOperation(operationId)),
+ callback: () => {
+ const selected = selectedEntityParam
+ ? trackedEntities.find((entity) => entity.id === selectedEntityParam)
+ : undefined;
+ const target = kanbanCompleteTarget({
+ requiresSerialTracking,
+ isFirstOperation,
+ selectedEntityId: selected?.id ?? null,
+ selectedIsIncomplete:
+ !!selected && isUnitIncompleteForOperation(selected, operationId)
+ });
+ if (target.action === "select") {
+ toast.info(t`Scan or select the unit, then scan the kanban card again`);
+ serialModal.onOpen();
+ return;
+ }
+ const endPath = path.to.endOperation(operationId);
+ return completeFetcher.load(
+ target.trackedEntityId
+ ? `${endPath}?trackedEntityId=${target.trackedEntityId}`
+ : endPath
+ );
+ },
inTextFields: true,
active: !!kanban?.id
});
@@ -1538,6 +1563,39 @@ export function AssemblyView({
}
}, [completeUnitFetcher.state, completeUnitFetcher.data]);
+ // Later operations: when the unit the operator holds becomes complete here —
+ // by a kanban scan, which leaves it in the URL, or by any other completion —
+ // ask for the next one. Edge-triggered off the held unit, so a dismissed
+ // picker stays closed across revalidations.
+ const heldEntityRef = useRef<string | null>(null);
+ // biome-ignore lint/correctness/useExhaustiveDependencies: edge-detect on the held unit
+ useEffect(() => {
+ if (!navigatesByEntity || isFirstOperation) return;
+ const selected = selectedEntityParam
+ ? unitEntities.find((entity) => entity.id === selectedEntityParam)
+ : undefined;
+ if (selected && isUnitIncompleteForOperation(selected, operationId)) {
+ heldEntityRef.current = selected.id;
+ return;
+ }
+ const heldJustCompleted =
+ !!heldEntityRef.current && heldEntityRef.current === selectedEntityParam;
+ heldEntityRef.current = null;
+ if (
+ heldJustCompleted &&
+ unitEntities.some((entity) =>
+ isUnitIncompleteForOperation(entity, operationId)
+ )
+ ) {
+ serialModal.onOpen();
+ }
+ }, [
+ navigatesByEntity,
+ isFirstOperation,
+ trackedEntities,
+ selectedEntityParam
+ ]);
+
// Later operations: prompt the operator to scan/select the unit on arrival. Every
// unit already carries a printed label (labels print at the first operation's
// completion), so there is nothing to auto-select. Prompt once per mount — even if
diff --git a/apps/mes/app/components/JobOperation/JobOperation.tsx b/apps/mes/app/components/JobOperation/JobOperation.tsx
index e5665890d5..2f5ca48ddd 100644
--- a/apps/mes/app/components/JobOperation/JobOperation.tsx
+++ b/apps/mes/app/components/JobOperation/JobOperation.tsx
@@ -127,7 +127,10 @@ import type {
BatchWorkInstructions,
JobOperationBatch
} from "~/services/operations.service";
-import { getFileType } from "~/services/operations.service";
+import {
+ getFileType,
+ isSerialEntityIncompleteForOperation
+} from "~/services/operations.service";
import type {
Job,
JobMakeMethod,
@@ -143,7 +146,7 @@ import type {
} from "~/services/types";
import { useItems } from "~/stores";
import { makeDurations } from "~/utils/durations";
-import { isKanbanCompleteScan } from "~/utils/kanban";
+import { isKanbanCompleteScan, kanbanCompleteTarget } from "~/utils/kanban";
import { useOrigin } from "~/utils/origin";
import { path } from "~/utils/path";
import ItemThumbnail from "../ItemThumbnail";
@@ -684,7 +687,32 @@ export const JobOperation = ({
const completeFetcher = useFetcher<Result>();
useKeyboardWedge({
test: (input) => !!kanban && isKanbanCompleteScan(input, kanban),
- callback: () => completeFetcher.load(path.to.endOperation(operation.id)),
+ callback: () => {
+ // Complete the unit the operator holds, never one the server picks: at a
+ // later operation that pick need not be the unit in their hands.
+ const selected = trackedEntityParam
+ ? trackedEntities.find((entity) => entity.id === trackedEntityParam)
+ : undefined;
+ const target = kanbanCompleteTarget({
+ requiresSerialTracking: !!parentIsSerial,
+ isFirstOperation,
+ selectedEntityId: selected?.id ?? null,
+ selectedIsIncomplete:
+ !!selected &&
+ isSerialEntityIncompleteForOperation(selected, operation.id)
+ });
+ if (target.action === "select") {
+ toast.info(t`Scan or select the unit, then scan the kanban card again`);
+ serialModal.onOpen();
+ return;
+ }
+ const endPath = path.to.endOperation(operation.id);
+ return completeFetcher.load(
+ target.trackedEntityId
+ ? `${endPath}?trackedEntityId=${target.trackedEntityId}`
+ : endPath
+ );
+ },
inTextFields: true,
// The wedge completes this single op via endOperation — never for a batched
// member; the batch completes as a whole.
diff --git a/apps/mes/app/routes/x+/assembly.$operationId.tsx b/apps/mes/app/routes/x+/assembly.$operationId.tsx
index e3b3ffddba..305927c84e 100644
--- a/apps/mes/app/routes/x+/assembly.$operationId.tsx
+++ b/apps/mes/app/routes/x+/assembly.$operationId.tsx
@@ -32,7 +32,8 @@ import {
getThumbnailPathByItemId,
getToolsByOperationId,
getTrackedEntitiesByMakeMethodId,
- getWorkCenter
+ getWorkCenter,
+ isFirstOperationOfMakeMethod
} from "~/services/operations.service";
import type { OperationWithDetails } from "~/services/types";
import { makeDurations } from "~/utils/durations";
@@ -231,7 +232,7 @@ export async function loader({ request, params }: LoaderFunctionArgs) {
? navEntities[0]?.id
: navEntities[unitIndex]?.id;
- const [materials, openEvent, priorDependency] = await Promise.all([
+ const [materials, openEvent, isFirstOperation] = await Promise.all([
getJobMaterialsByOperationId(serviceRole, {
operation: op,
trackedEntityId: effectiveEntityId,
@@ -253,25 +254,9 @@ export async function loader({ request, params }: LoaderFunctionArgs) {
.maybeSingle(),
// Is this the first operation in the routing? A serial unit only earns a printed
// label when completed at its first operation, so the first op flows unit-by-unit
- // (auto-select), and later ops scan/select (labels exist). "First" means nothing
- // precedes it within THIS make method — no jobOperationDependency whose predecessor
- // shares this op's jobMakeMethodId. Cross make-method (subassembly) dependencies are
- // ignored: a parent-assembly op still has no printed label just because a subassembly
- // finished first. `order` is only a display/sort field and isn't a reliable signal.
- serviceRole
- .from("jobOperationDependency")
- .select(
- "dependsOn:jobOperation!jobOperationDependency_dependsOnId_fk!inner(jobMakeMethodId)"
- )
- .eq("operationId", operationId)
- .eq("dependsOn.jobMakeMethodId", op.jobMakeMethodId)
- .limit(1)
- .maybeSingle()
+ // (auto-select), and later ops scan/select (labels exist).
+ isFirstOperationOfMakeMethod(serviceRole, operationId, op.jobMakeMethodId)
]);
- // Fail closed: a query error also returns null data, so treat an errored lookup
- // as "not first" — later ops require scan/select, which is the safe default when
- // we can't confirm the operation has no predecessor.
- const isFirstOperation = !priorDependency.error && !priorDependency.data;
return {
abilityWarning,
diff --git a/apps/mes/app/routes/x+/complete.tsx b/apps/mes/app/routes/x+/complete.tsx
index a6d4704793..c6bf4e7e44 100644
--- a/apps/mes/app/routes/x+/complete.tsx
+++ b/apps/mes/app/routes/x+/complete.tsx
@@ -160,6 +160,8 @@ export async function action({ request }: ActionFunctionArgs) {
await autoPrintFirstOperationLabel({
serviceRole,
trackedEntityId: printEntityId,
+ jobOperationId: jobOperation.data.id,
+ jobMakeMethodId: jobOperation.data.jobMakeMethodId,
workCenterId: jobOperation.data.workCenterId ?? undefined,
companyId,
userId
@@ -236,6 +238,8 @@ export async function action({ request }: ActionFunctionArgs) {
await autoPrintFirstOperationLabel({
serviceRole,
trackedEntityId: validation.data.trackedEntityId,
+ jobOperationId: jobOperation.data.id,
+ jobMakeMethodId: jobOperation.data.jobMakeMethodId,
workCenterId: jobOperation.data.workCenterId ?? undefined,
companyId,
userId
diff --git a/apps/mes/app/routes/x+/end.$operationId.tsx b/apps/mes/app/routes/x+/end.$operationId.tsx
index 2d8697b021..14bd5e8e28 100644
--- a/apps/mes/app/routes/x+/end.$operationId.tsx
+++ b/apps/mes/app/routes/x+/end.$operationId.tsx
@@ -18,6 +18,7 @@ import {
getNextIncompleteSerialEntity,
getTrackedEntitiesByMakeMethodId,
insertProductionQuantity,
+ isFirstOperationOfMakeMethod,
isSerialEntityIncompleteForOperation
} from "~/services/operations.service";
import { autoPrintFirstOperationLabel } from "~/services/printing.server";
@@ -183,15 +184,17 @@ export async function loader({ request, params }: LoaderFunctionArgs) {
if (quantityToComplete > 0) {
if (isTrackedEntity) {
- if (!trackedEntityId) {
- const trackedEntities = await getTrackedEntitiesByMakeMethodId(
- serviceRole,
- jobOperation.data.jobMakeMethodId,
- companyId
- );
+ const trackedEntities = await getTrackedEntitiesByMakeMethodId(
+ serviceRole,
+ jobOperation.data.jobMakeMethodId,
+ companyId
+ );
- // Complete the next incomplete serial unit for this operation (createdAt
- // asc), falling back to the last entity when every unit is complete.
+ if (!trackedEntityId) {
+ // No unit named (a scan from outside the MES, or the first operation,
+ // where units flow in order): complete the next incomplete unit for
+ // this operation (createdAt asc), falling back to the last entity when
+ // every unit is complete.
const nextTrackedEntity = getNextIncompleteSerialEntity(
trackedEntities.data ?? [],
operationId
@@ -199,9 +202,36 @@ export async function loader({ request, params }: LoaderFunctionArgs) {
if (nextTrackedEntity) {
trackedEntityId = nextTrackedEntity.id;
}
+ } else if (jobMakeMethod.data.requiresSerialTracking) {
+ // The operation and assembly views send the unit the operator scanned
+ // or selected. Completing it twice would record a second production
+ // quantity for one unit.
+ const heldEntity = (trackedEntities.data ?? []).find(
+ (entity) => entity.id === trackedEntityId
+ );
+ if (
+ !heldEntity ||
+ !isSerialEntityIncompleteForOperation(heldEntity, operationId)
+ ) {
+ return redirect(
+ `${path.to.operation(operationId)}?trackedEntityId=${trackedEntityId}`,
+ await flash(
+ request,
+ error(null, "This unit is already complete at this operation")
+ )
+ );
+ }
}
if (jobMakeMethod.data.requiresSerialTracking) {
+ // Units flow in order through the first operation; at a later one the
+ // operator scans or selects each unit, so the scan never moves the view
+ // to a unit of its own choosing.
+ const isFirstOperation = await isFirstOperationOfMakeMethod(
+ serviceRole,
+ operationId,
+ jobOperation.data.jobMakeMethodId
+ );
const response = await erpPosting(
"issue",
{ companyId, userId },
@@ -238,13 +268,15 @@ export async function loader({ request, params }: LoaderFunctionArgs) {
await autoPrintFirstOperationLabel({
serviceRole,
trackedEntityId: printEntityId,
+ jobOperationId: jobOperation.data.id,
+ jobMakeMethodId: jobOperation.data.jobMakeMethodId,
workCenterId: jobOperation.data.workCenterId ?? undefined,
companyId,
userId
});
}
- if (newTrackedEntityId) {
+ if (newTrackedEntityId && isFirstOperation) {
return redirect(
`${path.to.operation(
operationId
@@ -278,6 +310,18 @@ export async function loader({ request, params }: LoaderFunctionArgs) {
);
}
+ // Later operation: stay on the unit just completed. The view sees it
+ // complete and asks for the next unit (scan or select).
+ if (!isFirstOperation) {
+ return redirect(
+ `${path.to.operation(operationId)}?trackedEntityId=${trackedEntityId}`,
+ await flash(request, {
+ ...success("Completed"),
+ flash: "success"
+ })
+ );
+ }
+
// Pre-split flow: the issue function did not spawn a new entity (all
// units already exist), so advance to the next incomplete serial unit
// for this operation. When none remain, fall through to the shared
@@ -328,6 +372,8 @@ export async function loader({ request, params }: LoaderFunctionArgs) {
await autoPrintFirstOperationLabel({
serviceRole,
trackedEntityId,
+ jobOperationId: jobOperation.data.id,
+ jobMakeMethodId: jobOperation.data.jobMakeMethodId,
workCenterId: jobOperation.data.workCenterId ?? undefined,
companyId,
userId
diff --git a/apps/mes/app/routes/x+/inspection-lot.$id.complete-passed.tsx b/apps/mes/app/routes/x+/inspection-lot.$id.complete-passed.tsx
index bd61e9c94b..0953c2cd79 100644
--- a/apps/mes/app/routes/x+/inspection-lot.$id.complete-passed.tsx
+++ b/apps/mes/app/routes/x+/inspection-lot.$id.complete-passed.tsx
@@ -129,6 +129,7 @@ export async function action({ request, params }: ActionFunctionArgs) {
const completions = await postSerialCompletions(serviceRole, {
candidates,
jobOperationId: state.jobOperationId,
+ jobMakeMethodId: state.operation.jobMakeMethodId,
workCenterId: state.operation.workCenterId,
inspectionId: id,
eventIds,
diff --git a/apps/mes/app/routes/x+/inspection-lot.$id.disposition.tsx b/apps/mes/app/routes/x+/inspection-lot.$id.disposition.tsx
index fabc33f61d..6b2e9732ee 100644
--- a/apps/mes/app/routes/x+/inspection-lot.$id.disposition.tsx
+++ b/apps/mes/app/routes/x+/inspection-lot.$id.disposition.tsx
@@ -258,6 +258,7 @@ export async function action({ request, params }: ActionFunctionArgs) {
const completions = await postSerialCompletions(serviceRole, {
candidates: completionCandidates,
jobOperationId: state.jobOperationId,
+ jobMakeMethodId: state.operation.jobMakeMethodId,
workCenterId: state.operation.workCenterId,
inspectionId: id,
eventIds,
diff --git a/apps/mes/app/routes/x+/operation.$operationId.tsx b/apps/mes/app/routes/x+/operation.$operationId.tsx
index c4e935fa8d..eb307931f2 100644
--- a/apps/mes/app/routes/x+/operation.$operationId.tsx
+++ b/apps/mes/app/routes/x+/operation.$operationId.tsx
@@ -34,6 +34,7 @@ import {
getThumbnailPathByItemId,
getTrackedEntitiesByMakeMethodId,
getWorkCenter,
+ isFirstOperationOfMakeMethod,
isSerialEntityIncompleteForOperation
} from "~/services/operations.service";
import type { OperationWithDetails } from "~/services/types";
@@ -278,26 +279,11 @@ export async function loader({ request, params }: LoaderFunctionArgs) {
// (auto-select here on arrival, and in the client after each completion);
// - later operations: every unit already has a label → the operator
// scans/selects each unit (no auto-select, here or in the client).
- // An operation is "first" when nothing precedes it in THIS make method's
- // routing — i.e. it has no jobOperationDependency whose predecessor lives in
- // the same jobMakeMethod. Dependencies also model subassembly ordering (a
- // parent-assembly op waits on its child subassembly's ops), and those cross
- // make-method dependencies must NOT count: the parent serial still has no
- // printed label just because a subassembly finished first. `order` is only a
- // display/sort field and isn't a reliable precedence signal, so it's not used.
- const priorDependency = await serviceRole
- .from("jobOperationDependency")
- .select(
- "dependsOn:jobOperation!jobOperationDependency_dependsOnId_fk!inner(jobMakeMethodId)"
- )
- .eq("operationId", operationId)
- .eq("dependsOn.jobMakeMethodId", op.jobMakeMethodId)
- .limit(1)
- .maybeSingle();
- // Fail closed: a query error also returns null data, so treat an errored lookup
- // as "not first" — later ops require scan/select, which is the safe default when
- // we can't confirm the operation has no predecessor.
- const isFirstOperation = !priorDependency.error && !priorDependency.data;
+ const isFirstOperation = await isFirstOperationOfMakeMethod(
+ serviceRole,
+ operationId,
+ op.jobMakeMethodId
+ );
// On the first operation only, auto-select the first incomplete unit when none
// is in the URL. Later operations leave it unset so the client presents the
diff --git a/apps/mes/app/services/operations.service.ts b/apps/mes/app/services/operations.service.ts
index b030fa781d..d61f515867 100644
--- a/apps/mes/app/services/operations.service.ts
+++ b/apps/mes/app/services/operations.service.ts
@@ -300,6 +300,36 @@ export async function getJobOperationDependencies(
.eq("jobId", jobId);
}
+/**
+ * Is this the first operation of its make method's routing? A serial unit only
+ * earns a printed label when it is completed at its first operation, so this
+ * decides both the label auto-print and how the operation views pick units.
+ *
+ * "First" means no jobOperationDependency whose predecessor shares this op's
+ * jobMakeMethodId. Cross make-method (subassembly) dependencies are ignored: a
+ * parent-assembly op still has no printed label just because a subassembly
+ * finished first. `order` is only a display/sort field, not a precedence signal.
+ *
+ * Fails closed: an errored lookup reads as "not first" — no auto-select, no
+ * label — which is the safe default when we can't confirm there's no predecessor.
+ */
+export async function isFirstOperationOfMakeMethod(
+ client: SupabaseClient<Database>,
+ operationId: string,
+ jobMakeMethodId: string
+): Promise<boolean> {
+ const priorDependency = await client
+ .from("jobOperationDependency")
+ .select(
+ "dependsOn:jobOperation!jobOperationDependency_dependsOnId_fk!inner(jobMakeMethodId)"
+ )
+ .eq("operationId", operationId)
+ .eq("dependsOn.jobMakeMethodId", jobMakeMethodId)
+ .limit(1)
+ .maybeSingle();
+ return !priorDependency.error && !priorDependency.data;
+}
+
export async function getUpstreamOperations(
client: SupabaseClient<Database>,
operationId: string
diff --git a/apps/mes/app/services/printing.server.ts b/apps/mes/app/services/printing.server.ts
index 56c3ec4864..efdac3fa33 100644
--- a/apps/mes/app/services/printing.server.ts
+++ b/apps/mes/app/services/printing.server.ts
@@ -6,15 +6,24 @@ import type { getCarbonServiceRole } from "@carbon/auth/client.server";
import { trigger } from "@carbon/jobs";
import { getLogger } from "@carbon/logger";
import { getCachedPrinterConfig } from "@carbon/printing/printing.server";
+import { isFirstOperationOfMakeMethod } from "~/services/operations.service";
type ServiceRole = Awaited<ReturnType<typeof getCarbonServiceRole>>;
const log = getLogger("mes", "printing");
/**
- * Triggers an auto-print of the entity's label when this is its first
- * operation (i.e. the entity was just minted) and the work center's
- * printer assignment has auto-print enabled.
+ * Triggers an auto-print of the entity's label when the operation is the
+ * first of its make method's routing (the unit was just minted) and the work
+ * center's printer assignment has auto-print enabled.
+ *
+ * "First" comes from the routing (`isFirstOperationOfMakeMethod`), the same
+ * answer the operation and assembly views use — never from the unit's
+ * `Operation <id>` completion markers. A unit completed at a later operation
+ * can carry one marker or none (the kanban scan completes the next incomplete
+ * unit, which need not be one that passed the first operation; a batch lot
+ * carries no markers at all), and counting them reprinted a label at every
+ * later operation.
*
* Shared by every MES path that completes a tracked unit — the Complete
* form (`x+/complete.tsx`) and the QR/kanban scan (`x+/end.$operationId.tsx`)
@@ -23,33 +32,34 @@ const log = getLogger("mes", "printing");
export async function autoPrintFirstOperationLabel({
serviceRole,
trackedEntityId,
+ jobOperationId,
+ jobMakeMethodId,
workCenterId,
companyId,
userId
}: {
serviceRole: ServiceRole;
trackedEntityId: string;
+ jobOperationId: string;
+ jobMakeMethodId: string | null;
workCenterId: string | undefined;
companyId: string;
userId: string;
}) {
try {
- const { data: entity } = await serviceRole
- .from("trackedEntity")
- .select("attributes")
- .eq("id", trackedEntityId)
- .eq("companyId", companyId)
- .maybeSingle();
+ if (!workCenterId || !jobMakeMethodId) return;
+ const [{ data: entity }, isFirstOperation] = await Promise.all([
+ serviceRole
+ .from("trackedEntity")
+ .select("id")
+ .eq("id", trackedEntityId)
+ .eq("companyId", companyId)
+ .maybeSingle(),
+ isFirstOperationOfMakeMethod(serviceRole, jobOperationId, jobMakeMethodId)
+ ]);
// Service-role read: an entity outside the caller's company prints nothing.
- if (!entity) return;
-
- const attributes = (entity?.attributes ?? {}) as Record<string, unknown>;
- const operationCount = Object.keys(attributes).filter((k) =>
- k.startsWith("Operation ")
- ).length;
- if (operationCount > 1) return;
+ if (!entity || !isFirstOperation) return;
- if (!workCenterId) return;
const { data: workCenter } = await serviceRole
.from("workCenter")
.select("locationId")
diff --git a/apps/mes/app/services/quality.server.ts b/apps/mes/app/services/quality.server.ts
index 2eb58dfce1..850848c015 100644
--- a/apps/mes/app/services/quality.server.ts
+++ b/apps/mes/app/services/quality.server.ts
@@ -507,7 +507,9 @@ export async function postSerialCompletions(
inspectionSampleId: string | null;
}[];
jobOperationId: string;
- // The operation's work center, for the first-operation label auto-print.
+ // The operation's make method and work center, for the first-operation
+ // label auto-print.
+ jobMakeMethodId: string | null;
workCenterId: string | null;
inspectionId: string;
eventIds: ProductionEventIds;
@@ -547,6 +549,8 @@ export async function postSerialCompletions(
await autoPrintFirstOperationLabel({
serviceRole,
trackedEntityId,
+ jobOperationId: args.jobOperationId,
+ jobMakeMethodId: args.jobMakeMethodId,
workCenterId: args.workCenterId ?? undefined,
companyId: args.companyId,
userId: args.userId
@@ -600,6 +604,8 @@ export async function postBulkCompletion(
await autoPrintFirstOperationLabel({
serviceRole,
trackedEntityId: state.batchTrackedEntityId,
+ jobOperationId: state.jobOperationId,
+ jobMakeMethodId: state.operation.jobMakeMethodId,
workCenterId: state.operation.workCenterId ?? undefined,
companyId: args.companyId,
userId: args.userId
diff --git a/apps/mes/app/utils/kanban.test.ts b/apps/mes/app/utils/kanban.test.ts
index 54be5d6569..3b82c6056a 100644
--- a/apps/mes/app/utils/kanban.test.ts
+++ b/apps/mes/app/utils/kanban.test.ts
@@ -3,7 +3,7 @@
// including ports, remain AGPLv3; serving them over a network requires releasing their source.
import { describe, expect, it } from "vitest";
-import { isKanbanCompleteScan } from "./kanban";
+import { isKanbanCompleteScan, kanbanCompleteTarget } from "./kanban";
const kanban = { id: "kbn_8f3k2m1q", completedBarcodeOverride: null };
@@ -44,3 +44,60 @@ describe("isKanbanCompleteScan", () => {
expect(isKanbanCompleteScan("kbn_8f3k2m1q", kanban)).toBe(false);
});
});
+
+describe("kanbanCompleteTarget", () => {
+ const serial = { requiresSerialTracking: true };
+
+ it("completes the unit on screen when it is still open here", () => {
+ expect(
+ kanbanCompleteTarget({
+ ...serial,
+ isFirstOperation: false,
+ selectedEntityId: "te_2",
+ selectedIsIncomplete: true
+ })
+ ).toEqual({ action: "complete", trackedEntityId: "te_2" });
+ });
+
+ it("asks for a unit at a later operation when none is held", () => {
+ expect(
+ kanbanCompleteTarget({
+ ...serial,
+ isFirstOperation: false,
+ selectedEntityId: null,
+ selectedIsIncomplete: false
+ })
+ ).toEqual({ action: "select" });
+ // The unit on screen is already done here: never complete it twice.
+ expect(
+ kanbanCompleteTarget({
+ ...serial,
+ isFirstOperation: false,
+ selectedEntityId: "te_1",
+ selectedIsIncomplete: false
+ })
+ ).toEqual({ action: "select" });
+ });
+
+ it("lets the first operation take the next unit in order", () => {
+ expect(
+ kanbanCompleteTarget({
+ ...serial,
+ isFirstOperation: true,
+ selectedEntityId: "te_1",
+ selectedIsIncomplete: false
+ })
+ ).toEqual({ action: "complete" });
+ });
+
+ it("names no unit for a batch or untracked part", () => {
+ expect(
+ kanbanCompleteTarget({
+ requiresSerialTracking: false,
+ isFirstOperation: false,
+ selectedEntityId: "lot_1",
+ selectedIsIncomplete: true
+ })
+ ).toEqual({ action: "complete" });
+ });
+});
diff --git a/apps/mes/app/utils/kanban.ts b/apps/mes/app/utils/kanban.ts
index 52dd61538d..3eaaf41ab7 100644
--- a/apps/mes/app/utils/kanban.ts
+++ b/apps/mes/app/utils/kanban.ts
@@ -25,3 +25,30 @@ export function isKanbanCompleteScan(
}
return !!kanban.id && url.pathname === `/api/kanban/complete/${kanban.id}`;
}
+
+/**
+ * Which unit a kanban Complete scan completes in the operation and assembly
+ * views. A serial part completes the unit on screen when it is still open at
+ * this operation. With no such unit, the first operation lets the end route
+ * take the next unit in order (units flow through it unscanned); a later
+ * operation asks the operator to scan or select one, since the route's own
+ * pick need not be the unit in their hands. Batch and untracked parts name no
+ * unit.
+ */
+export function kanbanCompleteTarget({
+ requiresSerialTracking,
+ isFirstOperation,
+ selectedEntityId,
+ selectedIsIncomplete
+}: {
+ requiresSerialTracking: boolean;
+ isFirstOperation: boolean;
+ selectedEntityId: string | null;
+ selectedIsIncomplete: boolean;
+}): { action: "complete"; trackedEntityId?: string } | { action: "select" } {
+ if (!requiresSerialTracking) return { action: "complete" };
+ if (selectedEntityId && selectedIsIncomplete) {
+ return { action: "complete", trackedEntityId: selectedEntityId };
+ }
+ return isFirstOperation ? { action: "complete" } : { action: "select" };
+}
diff --git a/docs/content/docs/reference/company-settings.mdx b/docs/content/docs/reference/company-settings.mdx
index fc9517102f..5fc35618ec 100644
--- a/docs/content/docs/reference/company-settings.mdx
+++ b/docs/content/docs/reference/company-settings.mdx
@@ -44,11 +44,13 @@ A user can belong to multiple companies and switch between them with the company
<Field name="requireBackflushStorageUnit" type="boolean">Strict backflush: each material is backflushed only from the storage unit on its line. Default off. Edited from **Settings → Items**. See [strict backflush](/docs/reference/strict-backflush).</Field>
<Field name="preventNegativeBackflush" type="boolean">With strict backflush on, stops an operation or job that would take its storage unit below zero. Default on. Edited from **Settings → Items**.</Field>
<Field name="kanbanOutput" type="enum">What a Kanban card prints: `label`, `qrcode`, or `url`.</Field>
+ <Field name="kanbanLabelSize" type="enum">What a kanban label prints on when the output is `label`: `letter` (six to a page, the default), `label4x2` or `label3x2` (one card per thermal label).</Field>
<Field name="productLabelSize / shelfLabelSize" type="text">Default label sizes.</Field>
<Field name="mrpRunTime" type="time">The time of day scheduled MRP runs, on the company's time zone. Empty keeps the default, every 3 hours. Edited from **Settings → Planning**. See [planning](/docs/reference/planning#when-it-runs).</Field>
<Field name="defaultPlanningHorizonDays" type="number">How many days ahead the planning grids show actions and suggested orders, unless an item sets its own. Empty or 0 shows everything. Edited from **Settings → Planning**. See [planning horizon](/docs/reference/planning#planning-horizon).</Field>
<Field name="rescheduleToleranceDays" type="number">How many days an open order may land from the date it is needed before MRP suggests an Expedite or Defer. Default 7. Edited from **Settings → Planning**. See [reschedule tolerance](/docs/reference/planning#reschedule-tolerance).</Field>
<Field name="defaultResponsibleEmployee" type="text">The person a planning action is assigned to when no item, item group or location names one. Edited from **Settings → Planning**. See [planning ownership](/docs/reference/planning#planning-ownership).</Field>
+ <Field name="useCalendarWeeks" type="boolean">Numbers the weekly columns of the planning grids and Demand Forecasts by ISO 8601 week of the year ("Week 44") instead of from the present week ("Present Week", "Week 2"). Default off. Display only: the weeks and what MRP plans in them do not change. Edited from **Settings → Planning**. See [reading the grid](/docs/reference/planning#reading-the-grid).</Field>
<Field name="forecastConsumptionBackwardPeriods / forecastConsumptionForwardPeriods" type="number">How many weeks before and after its own week a real order reaches to consume forecast (defaults 4 and 1). Edited from **Settings → Planning**. See [forecast consumption](/docs/reference/forecast).</Field>
<Field name="updateLeadTimesOnReceipt" type="boolean">Whether receiving recalculates supplier lead times.</Field>
<Field name="purchasePriceUpdateTiming" type="enum">When purchase prices refresh: `Purchase Invoice Post` or `Purchase Order Finalize`.</Field>
diff --git a/docs/content/docs/reference/forecast.mdx b/docs/content/docs/reference/forecast.mdx
index e8885f8b34..ba036b18aa 100644
--- a/docs/content/docs/reference/forecast.mdx
+++ b/docs/content/docs/reference/forecast.mdx
@@ -19,11 +19,11 @@ Two tables look alike. `demandProjection` is your input — the numbers you type
## How you enter one
-The form is a drawer with a part, a location, and 52 numeric week cells grouped into four quarter tabs, plus a live bar-and-line chart of weekly and cumulative demand (`apps/erp/app/modules/production/ui/DemandProjection/DemandProjectionForm.tsx`). Week 1 starts at the current week; each cell is labelled with its calendar date.
+The form is a drawer with a part, a location, and 52 numeric week cells grouped into four quarter tabs, plus a live bar-and-line chart of weekly and cumulative demand (`apps/erp/app/modules/production/ui/DemandProjection/DemandProjectionForm.tsx`). Week 1 starts at the current week; each cell is labelled with its calendar date. With **Settings → Planning → Calendar Weeks** on, the weeks are numbered by ISO 8601 week of the year instead.
On save, the action pairs each `week{i}` value with the matching `period` id and upserts the rows (`apps/erp/app/routes/x+/production+/demand-forecasts.$itemId.$locationId.tsx`). A cell you set to zero is deleted rather than stored, so the grid stays sparse (`upsertDemandProjections`, `packages/ee/src/forecast.server.ts`). Editing a part reloads its existing rows back into the grid; deleting a part's projections clears every future week for that item and location (`apps/erp/app/routes/x+/production+/demand-forecasts.delete.$itemId.$locationId.tsx`).
-The entry grid spans 52 weeks (`WEEKS_TO_PROJECT = 52` in both `demand-forecasts.new.tsx` and `demand-forecasts.$itemId.$locationId.tsx`). The list view shows the next 48 (`WEEKS_TO_PROJECT = 12 * 4`, `apps/erp/app/routes/x+/production+/demand-forecasts.tsx`), pivoting the per-period rows back into week columns for scanning and labelling the first as "Present Week" (`apps/erp/app/modules/production/ui/DemandProjection/DemandProjectionTable.tsx`). Creating, editing, and deleting projections all require the `production` permission, and are available on the Business plan (the `FORECAST` feature, `packages/ee/src/plan.ts`).
+The entry grid spans 52 weeks (`WEEKS_TO_PROJECT = 52` in both `demand-forecasts.new.tsx` and `demand-forecasts.$itemId.$locationId.tsx`). The list view shows the next 48 (`WEEKS_TO_PROJECT = 12 * 4`, `apps/erp/app/routes/x+/production+/demand-forecasts.tsx`), pivoting the per-period rows back into week columns for scanning and labelling the first as "Present Week", or every week by its calendar week when **Calendar Weeks** is on (`usePlanningWeekLabel`, `apps/erp/app/modules/production/ui/Planning/usePlanningWeekLabel.ts`). Creating, editing, and deleting projections all require the `production` permission, and are available on the Business plan (the `FORECAST` feature, `packages/ee/src/plan.ts`).
## How planning consumes it
diff --git a/docs/content/docs/reference/kanban.mdx b/docs/content/docs/reference/kanban.mdx
index 5f44b9ee77..44be3ad311 100644
--- a/docs/content/docs/reference/kanban.mdx
+++ b/docs/content/docs/reference/kanban.mdx
@@ -14,6 +14,7 @@ A [reordering policy](/docs/reference/reordering) calculates suggestions from on
Each kanban is a small record: an item, where it lives, how much to reorder, and how to reorder it. For a `Transfer` kanban, the form shows Item, Replenishment System, Location, From Storage Unit, To Storage Unit, Quantity, and Replenishment Level, in that order.
<FieldTable>
+ <Field name="Kanban ID">The card's number, such as `KB000001`, from the `kanban` [sequence](/docs/reference/sequences). Carbon assigns it when the kanban is created and prints it on the label, so you can find one particular card or bin. It never changes.</Field>
<Field name="Item" required>The part, material, tool, or consumable this card replenishes.</Field>
<Field name="Quantity" required>How much to reorder on each signal (at least 1). On a `Transfer` kanban, this is the quantity moved from the From storage unit.</Field>
<Field name="Replenishment system" required>How the signal replenishes: `Buy` (raise a purchase order), `Make` (create a job), or `Transfer` (create a stock transfer between two storage units in the location). See <Term>replenishment system</Term>.</Field>
@@ -66,10 +67,20 @@ How a card is rendered is a per-company setting, **Kanban Output**, with three m
| Mode | What a card is |
| --- | --- |
| QR code | A scannable QR code (the default), color-coded per action. |
-| Label | A printed PDF label, six to a page, with the QR, item thumbnail, name, storage unit, quantity, and supplier. When the kanban has a replenishment level, a `MIN:` line prints under `QTY:`. |
+| Label | A printed label with one QR code, the item name and ID, storage unit, quantity, kanban ID, and supplier. When the kanban has a replenishment level, a `MIN:` line prints with `QTY:`. A `Make` kanban has three separate cards (create, start and complete), so a scan can only take the action its card is for. |
| URL | A copyable link that hits the same scan endpoint directly. |
-For `Make` kanbans, the list view also surfaces the **start** and **complete** affordances. `Buy` and `Transfer` kanbans show only the order signal, since there's no job to start. Two columns are hidden by default: **Replenishment Level** and **Projected (To)**. Turn them on from the column picker. **Projected (To)** shows a **Below level** pill when the projected quantity is under the level.
+With **Label**, a **Label Size** setting picks what the label prints on:
+
+| Label Size | Prints |
+| --- | --- |
+| Letter, 6 per page | Six cards to a letter page, with the item thumbnail, to cut out (the default). |
+| 4" x 2" label | One card per label, for a thermal printer such as a Zebra. The QR code fills the right side, colored like the QR codes on screen (green for start, blue for complete), with a caption under it (**CREATE**, **START** or **COMPLETE**): a black-only printer prints the caption, not the color. |
+| 3" x 2" label | The same card on a 3" x 2" label. |
+
+**Print Labels** on the selected kanbans prints their create cards. It sends them to a printer when one is set up under [printing settings](/docs/reference/printing): a Zebra prints a card at its media size (3" x 2" or larger) as ZPL. With no printer, it opens the cards as a PDF at the Label Size.
+
+For `Make` kanbans, the list view also surfaces the **start** and **complete** cards. `Buy` and `Transfer` kanbans show only the order signal, since there's no job to start. Two columns are hidden by default: **Replenishment Level** and **Projected (To)**. Turn them on from the column picker. **Projected (To)** shows a **Below level** pill when the projected quantity is under the level.
## Kanban vs. reordering policy
diff --git a/docs/content/docs/reference/planning.mdx b/docs/content/docs/reference/planning.mdx
index d94d8763b5..049dfbdbf0 100644
--- a/docs/content/docs/reference/planning.mdx
+++ b/docs/content/docs/reference/planning.mdx
@@ -44,7 +44,7 @@ An item's **<Term>replenishment system</Term>** determines where its shortage ap
## Reading the grid
-Each row is an item at the location. **Stock Availability** draws the projected stock for every planning week as one strip; the CSV export keeps a column per week. **1st Negative On Hand** is the first week the projection goes below zero. **Latest Order Date** is the date you must order by to receive in time (the required date less the lead time); it turns red once it has passed. Open a row to see the order drawer.
+Each row is an item at the location. **Stock Availability** draws the projected stock for every planning week as one strip; the CSV export keeps a column per week. Weeks are numbered from today ("Present Week", "Week 2", …); to number them by calendar week of the year instead ("Week 44", "Week 45", …), turn on **Settings → Planning → Calendar Weeks**. That setting also numbers the weeks in Demand Forecasts. **1st Negative On Hand** is the first week the projection goes below zero. **Latest Order Date** is the date you must order by to receive in time (the required date less the lead time); it turns red once it has passed. Open a row to see the order drawer.
## Planning actions
diff --git a/docs/content/docs/reference/printing.mdx b/docs/content/docs/reference/printing.mdx
index 959faf5f19..037670801c 100644
--- a/docs/content/docs/reference/printing.mdx
+++ b/docs/content/docs/reference/printing.mdx
@@ -12,14 +12,14 @@ This system is separate from generated PDFs such as invoices, purchase orders, q
A print job renders in one of two formats, chosen by the printer it's routed to:
- **ZPL** is the text command language thermal label printers speak. It's the default for part and storage labels. A ZPL label needs a media size with ZPL dimensions configured, or it can't render.
-- **PDF** is a real document, rendered by the same React-PDF engine that produces invoices and travelers. Kanban cards are **PDF only**, so a kanban card sent to a ZPL-only printer fails unless a template covers it.
+- **PDF** is a real document, rendered by the same React-PDF engine that produces invoices and travelers. A kanban card prints as ZPL on a label of 3" x 2" or larger; a smaller ZPL medium fails the job.
Three document types exist (`packages/printing/src/registry.ts:10`):
<FieldTable>
<Field name="productLabel" type="zpl default">Labels for <Term id="tracked-entity">tracked entities</Term> (serial or batch numbers). Printed from a `Receipt`, `Shipment`, `Operation`, `Entity`, `Job`, `Split`, or `StockTransfer`.</Field>
<Field name="storageUnitLabel" type="zpl default">Labels for shelves, bins, and storage locations. Printed from a `StorageUnit`.</Field>
-<Field name="kanbanCard" type="pdf only">Replenishment cards for <Term>kanban</Term> bins. Printed from a `Kanban`.</Field>
+<Field name="kanbanCard" type="zpl or pdf">Replenishment cards for <Term>kanban</Term> bins. Printed from a `Kanban`. One card at the printer's media size when it is 3" x 2" or larger; otherwise a PDF printer prints the company's kanban **Label Size**.</Field>
</FieldTable>
The source document is what maps to the doc types worth printing. Posting a shipment yields product labels; scanning a storage unit yields a storage label. `getDocumentTypesForSource` does that lookup (`registry.ts:49`).
@@ -146,7 +146,7 @@ An automatic print job for the same source document ID was created within 30 sec
The job's document type has no built-in renderer and the route has no `templateId` (or no BinderyPress key is configured). Either assign a route whose format Carbon can render built-in, or set a BinderyPress `templateId` on the printer route.
### "Rendering failed: …"
-The job's content couldn't be generated. A common cause: a ZPL label routed to a media size that has no ZPL dimensions (built-in ZPL requires a ZPL-capable label size). Check the printer route's media size, or that a kanban card (PDF only) isn't being sent to a ZPL-only printer.
+The job's content couldn't be generated. A common cause: a ZPL label routed to a media size that has no ZPL dimensions (built-in ZPL requires a ZPL-capable label size). Check the printer route's media size, or that a kanban card isn't being sent to a ZPL printer whose media is smaller than 3" x 2".
### "Delivery timed out — content may have been printed. …"
ProxyBox didn't answer in time. This is intentionally **not retried** because the label may already have printed — retrying would print a duplicate. Verify at the printer; if it didn't print, reprint from the jobs list.
diff --git a/docs/content/docs/reference/sequences.mdx b/docs/content/docs/reference/sequences.mdx
index 56306efbdf..452aa8e69d 100644
--- a/docs/content/docs/reference/sequences.mdx
+++ b/docs/content/docs/reference/sequences.mdx
@@ -50,6 +50,7 @@ A new company is seeded with a sequence for every numbered document type:
| Shipment | `shipment` | `SHP` | `SHP000001` |
| Warehouse transfer | `warehouseTransfer` | `WT` | `WT000001` |
| Stock transfer | `stockTransfer` | `ST` | `ST000001` |
+| Kanban | `kanban` | `KB` | `KB000001` |
| Picking list | `pickingList` | `PL` | `PL000001` |
| Inventory count | `inventoryCount` | `IC` | `IC000001` |
| Change notice | `changeOrder` | `CN-` | `CN-000001` |
diff --git a/packages/database/src/event-system/attachments.ts b/packages/database/src/event-system/attachments.ts
index ebe14a7f16..5c08ba9a74 100644
--- a/packages/database/src/event-system/attachments.ts
+++ b/packages/database/src/event-system/attachments.ts
@@ -197,7 +197,9 @@ export const attachments = {
jobOperationNote: { statement: ["broadcast_table_changes"] },
jobOperationStep: { statement: ["broadcast_table_changes"] },
jobOperationStepRecord: { statement: ["broadcast_table_changes"] },
- kanban: { after: ["sync_kanban_level_check"] },
+ kanban: {
+ after: ["sync_advance_document_sequence", "sync_kanban_level_check"]
+ },
journal: {
after: ["sync_advance_document_sequence"],
events: true,
diff --git a/packages/database/src/event-system/handlers/sync_advance_document_sequence.sql b/packages/database/src/event-system/handlers/sync_advance_document_sequence.sql
index 401ac98122..7409415fdb 100644
--- a/packages/database/src/event-system/handlers/sync_advance_document_sequence.sql
+++ b/packages/database/src/event-system/handlers/sync_advance_document_sequence.sql
@@ -26,6 +26,7 @@ BEGIN
WHEN 'inventoryCount' THEN 'inventoryCountId'
WHEN 'job' THEN 'jobId'
WHEN 'journal' THEN 'journalEntryId'
+ WHEN 'kanban' THEN 'kanbanId'
WHEN 'lease' THEN 'leaseId'
WHEN 'maintenanceDispatch' THEN 'maintenanceDispatchId'
WHEN 'memo' THEN 'memoId'
diff --git a/packages/database/src/seed-data.ts b/packages/database/src/seed-data.ts
index 13c20f0122..ca67b74591 100644
--- a/packages/database/src/seed-data.ts
+++ b/packages/database/src/seed-data.ts
@@ -431,6 +431,15 @@ export const sequences = [
size: 6,
step: 1
},
+ {
+ table: "kanban",
+ name: "Kanban",
+ prefix: "KB",
+ suffix: null,
+ next: 0,
+ size: 6,
+ step: 1
+ },
{
table: "quote",
name: "Quote",
diff --git a/packages/database/src/swagger-docs-schema.ts b/packages/database/src/swagger-docs-schema.ts
index 7865260f98..4393b58455 100644
--- a/packages/database/src/swagger-docs-schema.ts
+++ b/packages/database/src/swagger-docs-schema.ts
@@ -29058,6 +29058,9 @@ export default {
{
$ref: "#/parameters/rowFilter.kanbans.replenishmentLevel"
},
+ {
+ $ref: "#/parameters/rowFilter.kanbans.kanbanId"
+ },
{
$ref: "#/parameters/rowFilter.kanbans.name"
},
@@ -102930,11 +102933,14 @@ export default {
{
$ref: "#/parameters/rowFilter.companySettings.receiptQuantitiesStartAtZero"
},
+ {
+ $ref: "#/parameters/rowFilter.companySettings.requirePurchaseOrderApprovalSignature"
+ },
{
$ref: "#/parameters/rowFilter.companySettings.serialNumberTiming"
},
{
- $ref: "#/parameters/rowFilter.companySettings.requirePurchaseOrderApprovalSignature"
+ $ref: "#/parameters/rowFilter.companySettings.useCalendarWeeks"
},
{
$ref: "#/parameters/select"
@@ -103217,11 +103223,14 @@ export default {
{
$ref: "#/parameters/rowFilter.companySettings.receiptQuantitiesStartAtZero"
},
+ {
+ $ref: "#/parameters/rowFilter.companySettings.requirePurchaseOrderApprovalSignature"
+ },
{
$ref: "#/parameters/rowFilter.companySettings.serialNumberTiming"
},
{
- $ref: "#/parameters/rowFilter.companySettings.requirePurchaseOrderApprovalSignature"
+ $ref: "#/parameters/rowFilter.companySettings.useCalendarWeeks"
},
{
$ref: "#/parameters/preferReturn"
@@ -103458,11 +103467,14 @@ export default {
{
$ref: "#/parameters/rowFilter.companySettings.receiptQuantitiesStartAtZero"
},
+ {
+ $ref: "#/parameters/rowFilter.companySettings.requirePurchaseOrderApprovalSignature"
+ },
{
$ref: "#/parameters/rowFilter.companySettings.serialNumberTiming"
},
{
- $ref: "#/parameters/rowFilter.companySettings.requirePurchaseOrderApprovalSignature"
+ $ref: "#/parameters/rowFilter.companySettings.useCalendarWeeks"
},
{
$ref: "#/parameters/body.companySettings"
@@ -104775,6 +104787,9 @@ export default {
{
$ref: "#/parameters/rowFilter.kanban.replenishmentLevel"
},
+ {
+ $ref: "#/parameters/rowFilter.kanban.kanbanId"
+ },
{
$ref: "#/parameters/select"
},
@@ -104894,6 +104909,9 @@ export default {
{
$ref: "#/parameters/rowFilter.kanban.replenishmentLevel"
},
+ {
+ $ref: "#/parameters/rowFilter.kanban.kanbanId"
+ },
{
$ref: "#/parameters/preferReturn"
}
@@ -104967,6 +104985,9 @@ export default {
{
$ref: "#/parameters/rowFilter.kanban.replenishmentLevel"
},
+ {
+ $ref: "#/parameters/rowFilter.kanban.kanbanId"
+ },
{
$ref: "#/parameters/body.kanban"
},
@@ -132766,6 +132787,10 @@ export default {
format: "numeric",
type: "number"
},
+ kanbanId: {
+ format: "text",
+ type: "string"
+ },
name: {
format: "text",
type: "string"
@@ -168209,8 +168234,9 @@ export default {
"requireBackflushStorageUnit",
"preventNegativeBackflush",
"receiptQuantitiesStartAtZero",
+ "requirePurchaseOrderApprovalSignature",
"serialNumberTiming",
- "requirePurchaseOrderApprovalSignature"
+ "useCalendarWeeks"
],
properties: {
id: {
@@ -168614,12 +168640,17 @@ export default {
format: "boolean",
type: "boolean"
},
+ requirePurchaseOrderApprovalSignature: {
+ default: false,
+ format: "boolean",
+ type: "boolean"
+ },
serialNumberTiming: {
default: "jobCreation",
format: "text",
type: "string"
},
- requirePurchaseOrderApprovalSignature: {
+ useCalendarWeeks: {
default: false,
format: "boolean",
type: "boolean"
@@ -169248,6 +169279,10 @@ export default {
'Transfer kanbans only. When the projected quantity at the To storage unit is below this level, Carbon creates a Released stock transfer for "quantity". NULL = scan-only.',
format: "numeric",
type: "number"
+ },
+ kanbanId: {
+ format: "text",
+ type: "string"
}
},
type: "object"
@@ -184655,6 +184690,12 @@ export default {
in: "query",
type: "string"
},
+ "rowFilter.kanbans.kanbanId": {
+ name: "kanbanId",
+ required: false,
+ in: "query",
+ type: "string"
+ },
"rowFilter.kanbans.name": {
name: "name",
required: false,
@@ -224671,14 +224712,20 @@ export default {
in: "query",
type: "string"
},
+ "rowFilter.companySettings.requirePurchaseOrderApprovalSignature": {
+ name: "requirePurchaseOrderApprovalSignature",
+ required: false,
+ in: "query",
+ type: "string"
+ },
"rowFilter.companySettings.serialNumberTiming": {
name: "serialNumberTiming",
required: false,
in: "query",
type: "string"
},
- "rowFilter.companySettings.requirePurchaseOrderApprovalSignature": {
- name: "requirePurchaseOrderApprovalSignature",
+ "rowFilter.companySettings.useCalendarWeeks": {
+ name: "useCalendarWeeks",
required: false,
in: "query",
type: "string"
@@ -225359,6 +225406,12 @@ export default {
in: "query",
type: "string"
},
+ "rowFilter.kanban.kanbanId": {
+ name: "kanbanId",
+ required: false,
+ in: "query",
+ type: "string"
+ },
"body.salesOrderTransaction": {
name: "salesOrderTransaction",
description: "salesOrderTransaction",
diff --git a/packages/database/src/types.ts b/packages/database/src/types.ts
index ad2c2d738e..7e5f573b7f 100644
--- a/packages/database/src/types.ts
+++ b/packages/database/src/types.ts
@@ -8352,6 +8352,7 @@ export type Database = {
inventoryShelfLife: Json
invoiceAutomation: Database["public"]["Enums"]["invoiceAutomation"]
invoiceNotificationGroup: string[]
+ kanbanLabelSize: Database["public"]["Enums"]["kanbanLabelSize"]
kanbanOutput: Database["public"]["Enums"]["kanbanOutput"]
leaseDefaultDiscountRate: number
leaseIncrementalBorrowingRate: number
@@ -8394,6 +8395,7 @@ export type Database = {
supplierQuoteNotificationGroup: string[]
timeCardEnabled: boolean
updateLeadTimesOnReceipt: boolean
+ useCalendarWeeks: boolean
useMetric: boolean
}
Insert: {
@@ -8430,6 +8432,7 @@ export type Database = {
inventoryShelfLife?: Json
invoiceAutomation?: Database["public"]["Enums"]["invoiceAutomation"]
invoiceNotificationGroup?: string[]
+ kanbanLabelSize?: Database["public"]["Enums"]["kanbanLabelSize"]
kanbanOutput?: Database["public"]["Enums"]["kanbanOutput"]
leaseDefaultDiscountRate?: number
leaseIncrementalBorrowingRate?: number
@@ -8472,6 +8475,7 @@ export type Database = {
supplierQuoteNotificationGroup?: string[]
timeCardEnabled?: boolean
updateLeadTimesOnReceipt?: boolean
+ useCalendarWeeks?: boolean
useMetric?: boolean
}
Update: {
@@ -8508,6 +8512,7 @@ export type Database = {
inventoryShelfLife?: Json
invoiceAutomation?: Database["public"]["Enums"]["invoiceAutomation"]
invoiceNotificationGroup?: string[]
+ kanbanLabelSize?: Database["public"]["Enums"]["kanbanLabelSize"]
kanbanOutput?: Database["public"]["Enums"]["kanbanOutput"]
leaseDefaultDiscountRate?: number
leaseIncrementalBorrowingRate?: number
@@ -8550,6 +8555,7 @@ export type Database = {
supplierQuoteNotificationGroup?: string[]
timeCardEnabled?: boolean
updateLeadTimesOnReceipt?: boolean
+ useCalendarWeeks?: boolean
useMetric?: boolean
}
Relationships: [
@@ -31130,6 +31136,7 @@ export type Database = {
id: string
itemId: string
jobId: string | null
+ kanbanId: string | null
locationId: string
purchaseUnitOfMeasureCode: string | null
quantity: number
@@ -31152,6 +31159,7 @@ export type Database = {
id?: string
itemId: string
jobId?: string | null
+ kanbanId?: string | null
locationId: string
purchaseUnitOfMeasureCode?: string | null
quantity: number
@@ -31174,6 +31182,7 @@ export type Database = {
id?: string
itemId?: string
jobId?: string | null
+ kanbanId?: string | null
locationId?: string
purchaseUnitOfMeasureCode?: string | null
quantity?: number
@@ -80498,6 +80507,7 @@ export type Database = {
itemId: string | null
jobId: string | null
jobReadableId: string | null
+ kanbanId: string | null
locationId: string | null
locationName: string | null
name: string | null
@@ -95985,6 +95995,7 @@ export type Database = {
| "Rental Agreement"
| "Contract"
| "Lease"
+ kanbanLabelSize: "letter" | "label4x2" | "label3x2"
kanbanOutput: "label" | "qrcode" | "url"
kanbanReplenishmentSystem: "Buy" | "Make" | "Transfer"
leaseEventType: "Modification" | "Termination" | "Purchase"
@@ -97530,6 +97541,7 @@ export const Constants = {
"Contract",
"Lease",
],
+ kanbanLabelSize: ["letter", "label4x2", "label3x2"],
kanbanOutput: ["label", "qrcode", "url"],
kanbanReplenishmentSystem: ["Buy", "Make", "Transfer"],
leaseEventType: ["Modification", "Termination", "Purchase"],
diff --git a/packages/database/supabase/migrations/20261028191437_kanban-readable-id.sql b/packages/database/supabase/migrations/20261028191437_kanban-readable-id.sql
new file mode 100644
index 0000000000..82646c9a0b
--- /dev/null
+++ b/packages/database/supabase/migrations/20261028191437_kanban-readable-id.sql
@@ -0,0 +1,93 @@
+-- A readable number for each kanban (KB000001), printed on its label, so a
+-- particular card or bin can be found and brought into or out of service.
+
+-- 1. The column. Nullable: a restore loads rows with triggers off, and a
+-- backup taken before this migration has no number to load.
+SET lock_timeout = '5s';
+ALTER TABLE "kanban" ADD COLUMN IF NOT EXISTS "kanbanId" TEXT;
+RESET lock_timeout;
+
+COMMENT ON COLUMN "kanban"."kanbanId" IS
+ 'Readable number from the company''s "kanban" sequence (KB000001), printed on the label. Assigned on insert by set_kanban_readable_id and never changed. Not the stockTransfer."kanbanId" foreign key, which holds kanban.id.';
+
+-- 2. The sequence for every existing company. New companies get it from
+-- seed-data.ts.
+INSERT INTO "sequence" ("table", "name", "prefix", "suffix", "next", "size", "step", "companyId", "updatedBy")
+SELECT 'kanban', 'Kanban', 'KB', NULL, 0, 6, 1, c."id", 'system'
+FROM "company" c
+ON CONFLICT ("table", "companyId") DO NOTHING;
+
+-- 3. Number the existing kanbans of each company in the order they were made.
+-- get_next_sequence formats the number and moves the counter, so the counter
+-- ends past the last number given out.
+DO $backfill$
+DECLARE
+ k RECORD;
+BEGIN
+ FOR k IN
+ SELECT "id", "companyId"
+ FROM "kanban"
+ WHERE "kanbanId" IS NULL
+ ORDER BY "companyId", "createdAt", "id"
+ LOOP
+ UPDATE "kanban"
+ SET "kanbanId" = get_next_sequence('kanban', k."companyId")
+ WHERE "id" = k."id"
+ AND "companyId" = k."companyId";
+ END LOOP;
+END;
+$backfill$;
+
+SET lock_timeout = '5s';
+CREATE UNIQUE INDEX IF NOT EXISTS "kanban_kanbanId_companyId_key"
+ ON "kanban" ("companyId", "kanbanId");
+RESET lock_timeout;
+
+-- 4. Every insert takes the next number: the kanban form, the API, the demo
+-- datasets and test fixtures all insert without one. A company missing its
+-- sequence row gets one, so a kanban is never left unnumbered.
+CREATE OR REPLACE FUNCTION set_kanban_readable_id_on_insert()
+RETURNS TRIGGER AS $$
+BEGIN
+ IF NEW."kanbanId" IS NULL OR NEW."kanbanId" = '' THEN
+ INSERT INTO "sequence" ("table", "name", "prefix", "suffix", "next", "size", "step", "companyId", "updatedBy")
+ VALUES ('kanban', 'Kanban', 'KB', NULL, 0, 6, 1, NEW."companyId", 'system')
+ ON CONFLICT ("table", "companyId") DO NOTHING;
+
+ NEW."kanbanId" := get_next_sequence('kanban', NEW."companyId");
+ END IF;
+ RETURN NEW;
+END;
+$$ LANGUAGE plpgsql SECURITY DEFINER SET search_path = public;
+
+DROP TRIGGER IF EXISTS set_kanban_readable_id ON "kanban";
+CREATE TRIGGER set_kanban_readable_id
+ BEFORE INSERT ON "kanban"
+ FOR EACH ROW
+ EXECUTE PROCEDURE set_kanban_readable_id_on_insert();
+
+-- 5. The kanbans view expands k.* at creation, so recreate it to expose the
+-- new column. Unchanged from 20261012232517_kanban-replenishment-level.sql.
+DROP VIEW IF EXISTS "kanbans";
+CREATE VIEW "kanbans" WITH(SECURITY_INVOKER=true) AS
+SELECT
+ k.*,
+ i.name,
+ i."readableIdWithRevision",
+ j."jobId" as "jobReadableId",
+ l.name as "locationName",
+ s.name as "storageUnitName",
+ fs.name as "fromStorageUnitName",
+ su.name as "supplierName",
+ CASE
+ WHEN i."thumbnailPath" IS NULL AND mu."thumbnailPath" IS NOT NULL THEN mu."thumbnailPath"
+ ELSE i."thumbnailPath"
+ END AS "thumbnailPath"
+FROM "kanban" k
+JOIN "item" i ON k."itemId" = i."id"
+LEFT JOIN "modelUpload" mu ON mu.id = i."modelUploadId"
+JOIN "location" l ON k."locationId" = l."id"
+LEFT JOIN "storageUnit" s ON k."storageUnitId" = s."id"
+LEFT JOIN "storageUnit" fs ON k."fromStorageUnitId" = fs."id"
+LEFT JOIN "supplier" su ON k."supplierId" = su."id"
+LEFT JOIN "job" j ON k."jobId" = j."id";
diff --git a/packages/database/supabase/migrations/20261028203417_planning-calendar-weeks.sql b/packages/database/supabase/migrations/20261028203417_planning-calendar-weeks.sql
new file mode 100644
index 0000000000..0750c21bfd
--- /dev/null
+++ b/packages/database/supabase/migrations/20261028203417_planning-calendar-weeks.sql
@@ -0,0 +1,7 @@
+-- The planning grids (Material Planning, Production Planning) and Demand
+-- Forecasts head their weekly columns "Present Week, Week 2, Week 3, …" —
+-- counted from today. A company that plans by calendar week (ISO 8601) turns
+-- this on to head them with the week of the year instead: "Week 44, Week 45".
+-- Display only: the periods, and what MRP writes into them, are unchanged.
+ALTER TABLE "companySettings"
+ ADD COLUMN IF NOT EXISTS "useCalendarWeeks" BOOLEAN NOT NULL DEFAULT false;
diff --git a/packages/database/supabase/migrations/20261028214508_kanban-label-size.sql b/packages/database/supabase/migrations/20261028214508_kanban-label-size.sql
new file mode 100644
index 0000000000..6ef9401797
--- /dev/null
+++ b/packages/database/supabase/migrations/20261028214508_kanban-label-size.sql
@@ -0,0 +1,6 @@
+-- The size a kanban label prints at: a letter sheet of six, or one card per
+-- 4" x 2" or 3" x 2" thermal label. The ids match @carbon/utils labelSizes.
+CREATE TYPE "kanbanLabelSize" AS ENUM ('letter', 'label4x2', 'label3x2');
+
+ALTER TABLE "companySettings"
+ ADD COLUMN IF NOT EXISTS "kanbanLabelSize" "kanbanLabelSize" NOT NULL DEFAULT 'letter';
diff --git a/packages/database/supabase/migrations/20261028221145_kanban-id-immutable.sql b/packages/database/supabase/migrations/20261028221145_kanban-id-immutable.sql
new file mode 100644
index 0000000000..becee4b5b9
--- /dev/null
+++ b/packages/database/supabase/migrations/20261028221145_kanban-id-immutable.sql
@@ -0,0 +1,22 @@
+-- A kanban's number is printed on its card, so it never changes once set.
+-- A NULL number (a row restored from a backup taken before kanban numbers)
+-- may still be filled; sync_advance_document_sequence then moves the counter
+-- past it.
+CREATE OR REPLACE FUNCTION prevent_kanban_readable_id_change()
+RETURNS TRIGGER AS $$
+BEGIN
+ IF OLD."kanbanId" IS NOT NULL
+ AND NEW."kanbanId" IS DISTINCT FROM OLD."kanbanId"
+ THEN
+ RAISE EXCEPTION 'Kanban % keeps its number: it is printed on the card', OLD."kanbanId"
+ USING ERRCODE = 'check_violation';
+ END IF;
+ RETURN NEW;
+END;
+$$ LANGUAGE plpgsql SET search_path = public;
+
+DROP TRIGGER IF EXISTS prevent_kanban_readable_id_change ON "kanban";
+CREATE TRIGGER prevent_kanban_readable_id_change
+ BEFORE UPDATE OF "kanbanId" ON "kanban"
+ FOR EACH ROW
+ EXECUTE PROCEDURE prevent_kanban_readable_id_change();
diff --git a/packages/database/supabase/migrations/20261028221530_kanban-document-sequence.sql b/packages/database/supabase/migrations/20261028221530_kanban-document-sequence.sql
new file mode 100644
index 0000000000..751d2d5267
--- /dev/null
+++ b/packages/database/supabase/migrations/20261028221530_kanban-document-sequence.sql
@@ -0,0 +1,90 @@
+-- Generated by `pnpm --filter @carbon/database authz migration` from packages/database/src/authz. Do not edit.
+
+-- Ships these rules to databases where `authz sync` does not run after migrations yet.
+
+CREATE OR REPLACE FUNCTION public.sync_advance_document_sequence(p_table text, p_operation text, p_new jsonb, p_old jsonb)
+ RETURNS void
+ LANGUAGE plpgsql
+ SET search_path TO 'public', 'extensions'
+AS $function$
+DECLARE
+ v_column text;
+ v_sequence text;
+ v_value text;
+BEGIN
+ -- A document saved with a number in its sequence's format (typed by hand,
+ -- sent through the API or MCP, imported) moves the counter past it, so
+ -- get_next_sequence never hands that number out again.
+ IF p_operation NOT IN ('INSERT', 'UPDATE') THEN
+ RETURN;
+ END IF;
+
+ -- A new numbered table is added here and attached in attachments.ts.
+ v_column := CASE p_table
+ WHEN 'changeOrder' THEN 'changeOrderId'
+ WHEN 'customer' THEN 'readableId'
+ WHEN 'customerContract' THEN 'customerContractId'
+ WHEN 'depreciationRun' THEN 'depreciationRunId'
+ WHEN 'fixedAsset' THEN 'fixedAssetId'
+ WHEN 'gauge' THEN 'gaugeId'
+ WHEN 'inventoryCount' THEN 'inventoryCountId'
+ WHEN 'job' THEN 'jobId'
+ WHEN 'journal' THEN 'journalEntryId'
+ WHEN 'kanban' THEN 'kanbanId'
+ WHEN 'lease' THEN 'leaseId'
+ WHEN 'maintenanceDispatch' THEN 'maintenanceDispatchId'
+ WHEN 'memo' THEN 'memoId'
+ WHEN 'nonConformance' THEN 'nonConformanceId'
+ WHEN 'payment' THEN 'paymentId'
+ WHEN 'pickingList' THEN 'pickingListId'
+ WHEN 'purchaseInvoice' THEN 'invoiceId'
+ WHEN 'purchaseOrder' THEN 'purchaseOrderId'
+ WHEN 'purchaseReturnOrder' THEN 'purchaseReturnOrderId'
+ WHEN 'purchasingRfq' THEN 'rfqId'
+ WHEN 'quote' THEN 'quoteId'
+ WHEN 'receipt' THEN 'receiptId'
+ WHEN 'rentalAgreement' THEN 'rentalAgreementId'
+ WHEN 'salesInvoice' THEN 'invoiceId'
+ WHEN 'salesOrder' THEN 'salesOrderId'
+ WHEN 'salesReturnOrder' THEN 'salesReturnOrderId'
+ WHEN 'salesRfq' THEN 'rfqId'
+ WHEN 'shipment' THEN 'shipmentId'
+ WHEN 'stockTransfer' THEN 'stockTransferId'
+ WHEN 'supplier' THEN 'readableId'
+ WHEN 'supplierQuote' THEN 'supplierQuoteId'
+ WHEN 'warehouseTransfer' THEN 'transferId'
+ END;
+
+ IF v_column IS NULL THEN
+ RETURN;
+ END IF;
+
+ v_value := p_new->>v_column;
+ IF v_value IS NULL
+ OR (p_operation = 'UPDATE' AND v_value IS NOT DISTINCT FROM p_old->>v_column)
+ THEN
+ RETURN;
+ END IF;
+
+ -- The sequence is named after its table, except these.
+ v_sequence := CASE
+ WHEN p_table = 'journal' THEN 'journalEntry'
+ WHEN p_table = 'memo' AND p_new->>'direction' = 'Debit' THEN 'debitMemo'
+ WHEN p_table = 'memo' THEN 'creditMemo'
+ ELSE p_table
+ END;
+
+ UPDATE "sequence"
+ SET "next" = util.document_sequence_number(v_value, "prefix", "suffix", "size")::integer,
+ "updatedBy" = 'system'
+ WHERE "table" = v_sequence
+ AND "companyId" = p_new->>'companyId'
+ AND util.document_sequence_number(v_value, "prefix", "suffix", "size")
+ BETWEEN "next"::bigint + 1 AND 2147483647;
+END;
+$function$;
+
+-- event triggers (packages/database/src/event-system/attachments.ts)
+SET lock_timeout = '5s';
+SELECT set_event_triggers('kanban', ARRAY[]::text[], ARRAY['sync_advance_document_sequence', 'sync_kanban_level_check']::text[], false, ARRAY[]::text[]);
+RESET lock_timeout;
diff --git a/packages/documents/src/pdf/KanbanLabelPDF.tsx b/packages/documents/src/pdf/KanbanLabelPDF.tsx
index 2ddc310a06..539dea0c9f 100644
--- a/packages/documents/src/pdf/KanbanLabelPDF.tsx
+++ b/packages/documents/src/pdf/KanbanLabelPDF.tsx
@@ -2,31 +2,30 @@
// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,
// including ports, remain AGPLv3; serving them over a network requires releasing their source.
+import type { LabelSize } from "@carbon/utils";
import { Document, Image, Page, Text, View } from "@react-pdf/renderer";
import { createTw } from "react-pdf-tailwind";
import { generateQRCode } from "../qr/qr-code";
+import {
+ fitKanbanLabelText,
+ getKanbanLabelLayout,
+ KANBAN_LABEL_COLORS,
+ type KanbanLabelAction,
+ type KanbanLabelItem,
+ kanbanLabelCode,
+ kanbanLabelQuantityLines,
+ kanbanLabelStorageText,
+ wrapKanbanLabelText
+} from "../zpl/KanbanLabelZPL";
import Footer from "./components/Footer";
-interface KanbanLabel {
- id: string;
- itemId: string;
- itemName: string;
- itemReadableId: string;
- locationName: string;
- supplierName?: string | null;
- storageUnitId?: string | null;
- storageUnitName?: string | null;
- fromStorageUnitName?: string | null;
- quantity: number;
- replenishmentLevel?: number | null;
- unitOfMeasureCode?: string | null;
- thumbnail?: string | null;
-}
-
interface KanbanLabelPDFProps {
baseUrl: string;
- labels: KanbanLabel[];
- action?: "order" | "start" | "complete";
+ labels: KanbanLabelItem[];
+ action?: KanbanLabelAction;
+ /** A thermal label: one card per page at its size. Omitted = a letter
+ * sheet of six. */
+ labelSize?: LabelSize;
}
// Initialize tailwind-styled-components
@@ -48,8 +47,20 @@ const tw = createTw({
const KanbanLabelPDF = ({
baseUrl,
labels,
- action = "order"
+ action = "order",
+ labelSize
}: KanbanLabelPDFProps) => {
+ if (labelSize) {
+ return (
+ <ThermalKanbanLabels
+ baseUrl={baseUrl}
+ labels={labels}
+ action={action}
+ labelSize={labelSize}
+ />
+ );
+ }
+
// Fixed 2x3 layout (6 labels per page)
const rows = 3;
const columns = 2;
@@ -242,16 +253,33 @@ const KanbanLabelPDF = ({
</View>
</View>
- {/* Kanban ID at bottom */}
- <Text
- style={{
- ...tw("text-center"),
- fontSize: "12pt",
- color: "#7d7d7d"
- }}
+ {/* Kanban ID and supplier at bottom */}
+ <View
+ style={tw("flex flex-row items-center justify-between")}
>
- {label.supplierName}
- </Text>
+ {/* The built-in Helvetica has no bold weight, so
+ fontWeight alone renders regular. */}
+ <Text
+ style={{
+ fontSize: "12pt",
+ fontFamily: "Helvetica-Bold",
+ flexShrink: 0,
+ marginRight: 8
+ }}
+ >
+ {label.kanbanId ?? ""}
+ </Text>
+ <Text
+ style={{
+ fontSize: "12pt",
+ color: "#7d7d7d",
+ flex: 1,
+ textAlign: "right"
+ }}
+ >
+ {label.supplierName ?? ""}
+ </Text>
+ </View>
</View>
);
})}
@@ -265,4 +293,144 @@ const KanbanLabelPDF = ({
);
};
+/**
+ * One card per page, exactly the label's size, laid out by
+ * `getKanbanLabelLayout` like the ZPL so a PDF to a thermal printer's driver
+ * prints the same card. The code and its caption take the action's color
+ * (green for Start, blue for Complete); a black-only printer still has the
+ * caption.
+ */
+const ThermalKanbanLabels = ({
+ baseUrl,
+ labels,
+ action,
+ labelSize
+}: Required<KanbanLabelPDFProps>) => {
+ const pt = (inches: number) => inches * 72;
+ const color = `#${KANBAN_LABEL_COLORS[action]}`;
+
+ return (
+ <Document>
+ {labels.map((label) => {
+ const code = kanbanLabelCode(label, baseUrl, action);
+ const column = getKanbanLabelLayout(labelSize.width, labelSize.height);
+ const name = wrapKanbanLabelText(
+ label.itemName,
+ column.textWidth,
+ column.titleSize
+ );
+ const quantity = kanbanLabelQuantityLines(label);
+ const layout = getKanbanLabelLayout(
+ labelSize.width,
+ labelSize.height,
+ name.length,
+ quantity.length
+ );
+ const { titleSize } = layout;
+
+ const line = (
+ key: string,
+ y: number,
+ size: number,
+ value: string,
+ style: { bold?: boolean; color?: string } = {}
+ ) => (
+ <Text
+ key={key}
+ style={{
+ position: "absolute",
+ left: pt(layout.margin),
+ top: pt(y),
+ fontSize: pt(size),
+ fontFamily: style.bold ? "Helvetica-Bold" : "Helvetica",
+ color: style.color
+ }}
+ >
+ {fitKanbanLabelText(value, layout.textWidth, size)}
+ </Text>
+ );
+
+ return (
+ <Page
+ key={label.id}
+ size={[pt(labelSize.width), pt(labelSize.height)]}
+ >
+ {name.map((nameLine, index) =>
+ line(
+ `name-${index}`,
+ layout.nameY + index * (titleSize + layout.lineGap),
+ titleSize,
+ nameLine,
+ { bold: true }
+ )
+ )}
+ {line("item", layout.itemY, layout.textSize, label.itemReadableId)}
+ {line(
+ "storage",
+ layout.storageY,
+ layout.textSize,
+ kanbanLabelStorageText(label)
+ )}
+ {quantity.map((quantityLine, index) =>
+ line(
+ `quantity-${index}`,
+ layout.quantityY + index * (titleSize + layout.lineGap),
+ titleSize,
+ quantityLine,
+ { bold: true }
+ )
+ )}
+ {label.supplierName
+ ? line(
+ "supplier",
+ layout.supplierY,
+ layout.textSize,
+ label.supplierName,
+ { color: "#7d7d7d" }
+ )
+ : null}
+ {label.kanbanId
+ ? line(
+ "kanbanId",
+ layout.kanbanIdY,
+ layout.textSize,
+ label.kanbanId,
+ { color: "#7d7d7d" }
+ )
+ : null}
+ <Image
+ src={generateQRCode(
+ code.url,
+ layout.codeSize,
+ KANBAN_LABEL_COLORS[action]
+ )}
+ style={{
+ position: "absolute",
+ left: pt(layout.codeX),
+ top: pt(layout.codeY),
+ width: pt(layout.codeSize),
+ height: pt(layout.codeSize)
+ }}
+ />
+ <Text
+ style={{
+ position: "absolute",
+ left: pt(layout.codeX),
+ top: pt(layout.captionY),
+ width: pt(layout.codeSize),
+ textAlign: "center",
+ fontSize: pt(layout.captionSize),
+ fontFamily: "Helvetica-Bold",
+ color
+ }}
+ >
+ {code.caption}
+ </Text>
+ </Page>
+ );
+ })}
+ </Document>
+ );
+};
+
export default KanbanLabelPDF;
diff --git a/packages/documents/src/zpl/KanbanLabelZPL.tsx b/packages/documents/src/zpl/KanbanLabelZPL.tsx
new file mode 100644
index 0000000000..27f33301fd
--- /dev/null
+++ b/packages/documents/src/zpl/KanbanLabelZPL.tsx
@@ -0,0 +1,298 @@
+// SPDX-License-Identifier: AGPL-3.0-only
+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,
+// including ports, remain AGPLv3; serving them over a network requires releasing their source.
+
+import type { LabelSize } from "@carbon/utils";
+import { zplFieldData } from "./utils";
+
+export type KanbanLabelItem = {
+ id: string;
+ kanbanId?: string | null;
+ itemName: string;
+ itemReadableId: string;
+ locationName: string;
+ storageUnitName?: string | null;
+ fromStorageUnitName?: string | null;
+ supplierName?: string | null;
+ quantity: number;
+ replenishmentLevel?: number | null;
+ unitOfMeasureCode?: string | null;
+ thumbnail?: string | null;
+};
+
+export type KanbanLabelAction = "order" | "start" | "complete";
+
+export type KanbanLabelCode = {
+ action: KanbanLabelAction;
+ caption: string;
+ url: string;
+};
+
+/** The code's color per action, as on the letter sheet and the PNG route. */
+export const KANBAN_LABEL_COLORS: Record<KanbanLabelAction, string> = {
+ order: "000000", // black
+ start: "059669", // emerald-600
+ complete: "2563eb" // blue-600
+};
+
+const KANBAN_LABEL_CAPTIONS: Record<KanbanLabelAction, string> = {
+ order: "CREATE",
+ start: "START",
+ complete: "COMPLETE"
+};
+
+/**
+ * The one scan code a card carries. Create, Start and Complete are separate
+ * cards, so a scan can never take the wrong action. A thermal printer prints
+ * black only, so the caption tells the three cards apart.
+ */
+export function kanbanLabelCode(
+ item: Pick<KanbanLabelItem, "id">,
+ baseUrl: string,
+ action: KanbanLabelAction = "order"
+): KanbanLabelCode {
+ const path = action === "order" ? "" : `${action}/`;
+ return {
+ action,
+ caption: KANBAN_LABEL_CAPTIONS[action],
+ url: `${baseUrl}/api/kanban/${path}${item.id}`
+ };
+}
+
+/** The bins a card refills: `from -> to` for a Transfer kanban, else its bin or location. */
+export function kanbanLabelStorageText(item: KanbanLabelItem): string {
+ const to = item.storageUnitName || item.locationName;
+ // ASCII "->": neither the PDF's built-in Helvetica nor ZPL font 0 has U+2192.
+ return item.fromStorageUnitName ? `${item.fromStorageUnitName} -> ${to}` : to;
+}
+
+/**
+ * `QTY: 100 EA`, and a second line `MIN: 20` when a level is set. The level
+ * is in stock units at the To storage unit and the unit is the purchase
+ * unit, so MIN prints no unit.
+ */
+export function kanbanLabelQuantityLines(item: KanbanLabelItem): string[] {
+ const quantity = `QTY: ${item.quantity}${
+ item.unitOfMeasureCode ? ` ${item.unitOfMeasureCode}` : ""
+ }`;
+ return item.replenishmentLevel != null
+ ? [quantity, `MIN: ${item.replenishmentLevel}`]
+ : [quantity];
+}
+
+/** The smallest label a card fits on: 3" x 2" (100 x 50 mm passes). */
+export function canHoldKanbanLabel(size: Pick<LabelSize, "width" | "height">) {
+ return size.width >= 2.9 && size.height >= 1.9;
+}
+
+/** Average glyph width as a share of the font height (Helvetica and ZPL font 0). */
+const GLYPH_WIDTH = 0.55;
+
+/** Cut `text` to what fits in `width` at a font `fontSize` high (both in inches). */
+export function fitKanbanLabelText(
+ text: string,
+ width: number,
+ fontSize: number
+): string {
+ const max = Math.max(1, Math.floor(width / (fontSize * GLYPH_WIDTH)));
+ return text.length <= max ? text : `${text.slice(0, max - 3)}...`;
+}
+
+/**
+ * The part name in at most two lines of `width` inches, broken at a space;
+ * the second line is cut when the name is longer still. Every other field
+ * is one line (`fitKanbanLabelText`).
+ */
+export function wrapKanbanLabelText(
+ text: string,
+ width: number,
+ fontSize: number
+): string[] {
+ const max = Math.max(1, Math.floor(width / (fontSize * GLYPH_WIDTH)));
+ const name = text.trim();
+ if (name.length <= max) return name ? [name] : [];
+ const space = name.lastIndexOf(" ", max);
+ const cut = space > 0 ? space : max;
+ return [
+ name.slice(0, cut).trimEnd(),
+ fitKanbanLabelText(name.slice(cut).trimStart(), width, fontSize)
+ ];
+}
+
+export type KanbanLabelLayout = {
+ margin: number;
+ titleSize: number;
+ textSize: number;
+ captionSize: number;
+ /** The text column on the left. */
+ textWidth: number;
+ lineGap: number;
+ nameY: number;
+ itemY: number;
+ storageY: number;
+ quantityY: number;
+ supplierY: number;
+ kanbanIdY: number;
+ /** The QR code on the right, with its caption under it. */
+ codeSize: number;
+ codeX: number;
+ codeY: number;
+ captionY: number;
+};
+
+/**
+ * One card on a thermal label, in inches from the top-left corner. The QR
+ * code takes the right side, as large as the label allows, with its caption
+ * under it. The text runs down the left, each field cut to the column: part
+ * name (up to two lines), item ID, bins, quantity (and MIN), supplier, and
+ * the kanban ID small at the bottom, one line each. The PDF and the
+ * ZPL read the same layout, so both print alike.
+ */
+export function getKanbanLabelLayout(
+ width: number,
+ height: number,
+ nameLines = 1,
+ quantityLines = 1
+): KanbanLabelLayout {
+ const margin = 0.08;
+ const titleSize = 0.17;
+ const textSize = 0.13;
+ const captionSize = 0.12;
+ const lineGap = 0.05;
+ const columnGap = 0.12;
+
+ // The code is square: the label's height less the caption, but never more
+ // than 45% of its width, so the text keeps a usable column.
+ const codeSize = Math.min(
+ height - 2 * margin - captionSize - 0.04,
+ width * 0.45
+ );
+ const codeX = width - margin - codeSize;
+ // Center the code and caption together on the label's height.
+ const codeY = (height - (codeSize + 0.04 + captionSize)) / 2;
+
+ const nameY = margin;
+ const itemY = nameY + nameLines * (titleSize + lineGap);
+ const storageY = itemY + textSize + lineGap;
+ const quantityY = storageY + textSize + lineGap;
+ const supplierY = quantityY + quantityLines * (titleSize + lineGap);
+
+ return {
+ margin,
+ titleSize,
+ textSize,
+ captionSize,
+ textWidth: codeX - columnGap - margin,
+ lineGap,
+ nameY,
+ itemY,
+ storageY,
+ quantityY,
+ supplierY,
+ kanbanIdY: height - margin - textSize,
+ codeSize,
+ codeX,
+ codeY,
+ captionY: codeY + codeSize + 0.04
+ };
+}
+
+/** QR byte capacity at error-correction level M, versions 1 to 10. */
+const QR_CAPACITY_M = [14, 26, 42, 62, 84, 106, 122, 152, 180, 213];
+
+/** Modules across the smallest QR (level M) that holds `data`. */
+function qrModules(data: string): number {
+ const bytes = new TextEncoder().encode(data).length;
+ const version = QR_CAPACITY_M.findIndex((capacity) => capacity >= bytes) + 1;
+ return 17 + 4 * (version > 0 ? version : QR_CAPACITY_M.length);
+}
+
+/** Generate the ZPL for one kanban card, sized to a thermal label. */
+export function generateKanbanLabelZPL(
+ item: KanbanLabelItem,
+ labelSize: LabelSize,
+ baseUrl: string,
+ action: KanbanLabelAction = "order"
+): string {
+ if (!labelSize.zpl) {
+ throw new Error("Invalid label size or missing ZPL configuration");
+ }
+ const { width, height } = labelSize.zpl;
+ const dpi = labelSize.zpl.dpi || 203;
+ const dots = (inches: number) => Math.round(inches * dpi);
+
+ const code = kanbanLabelCode(item, baseUrl, action);
+ const { textWidth: nameWidth, titleSize: nameSize } = getKanbanLabelLayout(
+ width,
+ height
+ );
+ const name = wrapKanbanLabelText(item.itemName, nameWidth, nameSize);
+ const quantity = kanbanLabelQuantityLines(item);
+ const layout = getKanbanLabelLayout(
+ width,
+ height,
+ name.length,
+ quantity.length
+ );
+ const { margin, titleSize, textSize, textWidth } = layout;
+
+ const text = (
+ x: number,
+ y: number,
+ size: number,
+ value: string,
+ fieldWidth?: number,
+ align: "L" | "C" = "L"
+ ) =>
+ `^FO${dots(x)},${dots(y)}^A0N,${dots(size)},${dots(size)}` +
+ (fieldWidth === undefined ? "" : `^FB${dots(fieldWidth)},1,0,${align}`) +
+ zplFieldData(value);
+ const line = (y: number, size: number, value: string) =>
+ text(margin, y, size, fitKanbanLabelText(value, textWidth, size));
+
+ let zpl = `^XA^PW${dots(width)}^LL${dots(height)}^MNW^CI28`;
+
+ name.forEach((nameLine, index) => {
+ zpl += line(
+ layout.nameY + index * (titleSize + layout.lineGap),
+ titleSize,
+ nameLine
+ );
+ });
+ zpl += line(layout.itemY, textSize, item.itemReadableId);
+ zpl += line(layout.storageY, textSize, kanbanLabelStorageText(item));
+ quantity.forEach((quantityLine, index) => {
+ zpl += line(
+ layout.quantityY + index * (titleSize + layout.lineGap),
+ titleSize,
+ quantityLine
+ );
+ });
+ if (item.supplierName) {
+ zpl += line(layout.supplierY, textSize, item.supplierName);
+ }
+ if (item.kanbanId) {
+ zpl += line(layout.kanbanIdY, textSize, item.kanbanId);
+ }
+
+ // A thermal printer prints black only: the caption names the action.
+ const slot = dots(layout.codeSize);
+ const modules = qrModules(code.url);
+ const magnification = Math.max(2, Math.min(10, Math.floor(slot / modules)));
+ // Right-align the code in its slot: ZPL sizes it by whole modules.
+ const offset = slot - magnification * modules;
+ zpl +=
+ `^FO${dots(layout.codeX) + offset},${dots(layout.codeY)}` +
+ `^BQN,2,${magnification}^FDMA,${code.url}^FS`;
+ zpl += text(
+ layout.codeX,
+ layout.captionY,
+ layout.captionSize,
+ code.caption,
+ layout.codeSize,
+ "C"
+ );
+
+ zpl += "^XZ";
+ return zpl;
+}
diff --git a/packages/documents/src/zpl/index.ts b/packages/documents/src/zpl/index.ts
index b69b4cbf60..91e3d0e28a 100644
--- a/packages/documents/src/zpl/index.ts
+++ b/packages/documents/src/zpl/index.ts
@@ -2,8 +2,15 @@
// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,
// including ports, remain AGPLv3; serving them over a network requires releasing their source.
+import { generateKanbanLabelZPL } from "./KanbanLabelZPL";
import { generateProductLabelZPL } from "./ProductLabelZPL";
import { generateStorageUnitLabelZPL } from "./StorageUnitLabelZPL";
+export type { KanbanLabelItem } from "./KanbanLabelZPL";
+export { canHoldKanbanLabel } from "./KanbanLabelZPL";
export type { StorageUnitLabelItem } from "./StorageUnitLabelZPL";
-export { generateProductLabelZPL, generateStorageUnitLabelZPL };
+export {
+ generateKanbanLabelZPL,
+ generateProductLabelZPL,
+ generateStorageUnitLabelZPL
+};
diff --git a/packages/documents/src/zpl/kanbanLabelZPL.test.ts b/packages/documents/src/zpl/kanbanLabelZPL.test.ts
new file mode 100644
index 0000000000..c1eb7b5f7d
--- /dev/null
+++ b/packages/documents/src/zpl/kanbanLabelZPL.test.ts
@@ -0,0 +1,153 @@
+// SPDX-License-Identifier: AGPL-3.0-only
+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,
+// including ports, remain AGPLv3; serving them over a network requires releasing their source.
+
+import type { LabelSize } from "@carbon/utils";
+import { labelSizes } from "@carbon/utils";
+import { describe, expect, it } from "vitest";
+import {
+ canHoldKanbanLabel,
+ generateKanbanLabelZPL,
+ type KanbanLabelItem,
+ wrapKanbanLabelText
+} from "./KanbanLabelZPL";
+
+const baseUrl = "https://app.carbon.ms";
+
+const item: KanbanLabelItem = {
+ id: "kb_0123456789abcdefghij",
+ kanbanId: "KB000002",
+ itemName: "M6 Socket Head Cap Screw",
+ itemReadableId: "FAS-0006.A",
+ locationName: "Plant",
+ storageUnitName: "A-01-02",
+ supplierName: "McMaster-Carr",
+ quantity: 100,
+ unitOfMeasureCode: "EA"
+};
+
+const size = (id: string): LabelSize => {
+ const found = labelSizes.find((s) => s.id === id);
+ if (!found) throw new Error(`Missing label size ${id}`);
+ return found;
+};
+
+/** Each QR's left edge, magnification and data. */
+function qrCodes(zpl: string) {
+ return [...zpl.matchAll(/\^FO(\d+),\d+\^BQN,2,(\d+)\^FDMA,([^^]+)\^FS/g)].map(
+ ([, x, magnification, url]) => ({
+ x: Number(x),
+ magnification: Number(magnification),
+ url
+ })
+ );
+}
+
+describe("generateKanbanLabelZPL", () => {
+ it("prints exactly one code per card, captioned with its action", () => {
+ const cases = [
+ ["order", `${baseUrl}/api/kanban/${item.id}`, "CREATE"],
+ ["start", `${baseUrl}/api/kanban/start/${item.id}`, "START"],
+ ["complete", `${baseUrl}/api/kanban/complete/${item.id}`, "COMPLETE"]
+ ] as const;
+ for (const [action, url, caption] of cases) {
+ const zpl = generateKanbanLabelZPL(
+ item,
+ size("label3x2"),
+ baseUrl,
+ action
+ );
+ expect(qrCodes(zpl).map((q) => q.url)).toEqual([url]);
+ expect(zpl).toContain(`^FD${caption}^FS`);
+ }
+ });
+
+ it("prints the Create card by default", () => {
+ const zpl = generateKanbanLabelZPL(item, size("label4x2"), baseUrl);
+ expect(qrCodes(zpl).map((q) => q.url)).toEqual([
+ `${baseUrl}/api/kanban/${item.id}`
+ ]);
+ });
+
+ it("prints the kanban ID, the supplier and MIN on its own line", () => {
+ const zpl = generateKanbanLabelZPL(
+ { ...item, replenishmentLevel: 20 },
+ size("label3x2"),
+ baseUrl
+ );
+ for (const text of [
+ "KB000002",
+ "McMaster-Carr",
+ "QTY: 100 EA",
+ "MIN: 20"
+ ]) {
+ expect(zpl).toContain(`^FH^FD${text}^FS`);
+ }
+ });
+
+ it("right-aligns the code", () => {
+ for (const id of ["label3x2", "label4x2"]) {
+ const labelSize = size(id);
+ // The Complete URL is 65 bytes: QR version 5, 37 modules.
+ const [qr] = qrCodes(
+ generateKanbanLabelZPL(item, labelSize, baseUrl, "complete")
+ );
+ const right = qr!.x + qr!.magnification * 37;
+ const widthDots = Math.round(labelSize.width * 203);
+ // Ends at the right margin (0.08", 16 dots at 203 dpi).
+ expect(widthDots - right).toBe(16);
+ }
+ });
+
+ it("keeps the code inside the label", () => {
+ for (const id of ["label3x2", "label4x2", "label100x50mm"]) {
+ const labelSize = size(id);
+ const zpl = generateKanbanLabelZPL(item, labelSize, baseUrl, "complete");
+ const widthDots = Math.round(labelSize.width * 203);
+ for (const qr of qrCodes(zpl)) {
+ // 37 modules: the URLs here need QR version 5.
+ expect(qr.x + qr.magnification * 37).toBeLessThanOrEqual(widthDots);
+ }
+ }
+ });
+
+ it("escapes field-data control characters in user text", () => {
+ const zpl = generateKanbanLabelZPL(
+ { ...item, itemName: "A^B~C_D" },
+ size("label4x2"),
+ baseUrl
+ );
+ expect(zpl).toContain("^FH^FDA_5EB_7EC_5FD^FS");
+ });
+});
+
+describe("canHoldKanbanLabel", () => {
+ it("takes 3 x 2 inch labels and larger", () => {
+ expect(canHoldKanbanLabel(size("label3x2"))).toBe(true);
+ expect(canHoldKanbanLabel(size("label4x2"))).toBe(true);
+ expect(canHoldKanbanLabel(size("label100x50mm"))).toBe(true);
+ expect(canHoldKanbanLabel(size("label2x1"))).toBe(false);
+ expect(canHoldKanbanLabel(size("label50x25mm"))).toBe(false);
+ });
+});
+
+describe("wrapKanbanLabelText", () => {
+ // 1" at a 0.1" font fits 18 characters (0.55 of the font height each).
+ it("keeps a name that fits on one line", () => {
+ expect(wrapKanbanLabelText("Gearbox", 1, 0.1)).toEqual(["Gearbox"]);
+ });
+
+ it("breaks a longer name at a space onto a second line", () => {
+ expect(wrapKanbanLabelText("Gearbox Sub-Assembly Left", 1, 0.1)).toEqual([
+ "Gearbox",
+ "Sub-Assembly Left"
+ ]);
+ });
+
+ it("cuts the second line when the name is longer still", () => {
+ // The cut line is 18 characters, the three dots included.
+ expect(
+ wrapKanbanLabelText("M6 Socket Head Cap Screw, Stainless Steel", 1, 0.1)
+ ).toEqual(["M6 Socket Head Cap", "Screw, Stainles..."]);
+ });
+});
diff --git a/packages/documents/src/zpl/utils.ts b/packages/documents/src/zpl/utils.ts
index 592e2beb49..6e16ddab19 100644
--- a/packages/documents/src/zpl/utils.ts
+++ b/packages/documents/src/zpl/utils.ts
@@ -42,3 +42,15 @@ export function zplLabelHeader({
}: ZplLabelGeometry): string {
return `^XA^PW${widthDots}^LL${heightDots}^MNW^CI28`;
}
+
+/**
+ * A text field's data, hex-escaped with ^FH so a `^` or `~` in user text
+ * cannot end the field or start a command (`_` is the escape character).
+ */
+export function zplFieldData(value: string): string {
+ const escaped = value.replace(
+ /[_^~]/g,
+ (c) => `_${c.charCodeAt(0).toString(16).toUpperCase()}`
+ );
+ return `^FH^FD${escaped}^FS`;
+}
diff --git a/packages/jobs/manifests/schema.json b/packages/jobs/manifests/schema.json
index 8243b1efdb..e214d875b6 100644
--- a/packages/jobs/manifests/schema.json
+++ b/packages/jobs/manifests/schema.json
@@ -1,11 +1,11 @@
{
"kind": "carbon-company-backup",
"version": 1,
- "schemaVersion": "20261028153518",
+ "schemaVersion": "20261028221530",
"sourceCompanyId": "schema-baseline",
"sourceCompanyGroupId": null,
"sourceCompanyName": null,
- "exportedAt": "2026-10-28T08:01:48.922Z",
+ "exportedAt": "2026-10-28T17:35:23.502Z",
"exportedBy": "schema-baseline",
"label": "schema baseline",
"includeStorage": "none",
@@ -486,8 +486,10 @@
"requireBackflushStorageUnit",
"preventNegativeBackflush",
"receiptQuantitiesStartAtZero",
+ "requirePurchaseOrderApprovalSignature",
"serialNumberTiming",
- "requirePurchaseOrderApprovalSignature"
+ "useCalendarWeeks",
+ "kanbanLabelSize"
]
},
{
@@ -5758,7 +5760,8 @@
"completedBarcodeOverride",
"jobId",
"fromStorageUnitId",
- "replenishmentLevel"
+ "replenishmentLevel",
+ "kanbanId"
]
},
{
diff --git a/packages/jobs/src/inngest/functions/tasks/print-job/renderers.tsx b/packages/jobs/src/inngest/functions/tasks/print-job/renderers.tsx
index 52fcd7e948..e8cd9f415f 100644
--- a/packages/jobs/src/inngest/functions/tasks/print-job/renderers.tsx
+++ b/packages/jobs/src/inngest/functions/tasks/print-job/renderers.tsx
@@ -15,8 +15,11 @@ import {
} from "@carbon/documents/pdf";
import { toDocumentTemplate } from "@carbon/documents/template";
import {
+ canHoldKanbanLabel,
+ generateKanbanLabelZPL,
generateProductLabelZPL,
- generateStorageUnitLabelZPL
+ generateStorageUnitLabelZPL,
+ type KanbanLabelItem
} from "@carbon/documents/zpl";
import { ERP_URL, SUPABASE_INTERNAL_URL } from "@carbon/env";
import { storage } from "@carbon/files";
@@ -93,7 +96,7 @@ export async function renderItemBuiltIn(
};
}
case "kanbanCard":
- return renderKanbanCardPDF(client, doc.item, format);
+ return renderKanbanCard(client, companyId, doc.item, format, mediaSizeId);
case "storageUnitLabel": {
const mediaSize = requireMediaSize(mediaSizeId);
if (format === "pdf") {
@@ -191,53 +194,88 @@ function streamToBuffer(stream: NodeJS.ReadableStream): Promise<Buffer> {
});
}
-async function renderKanbanCardPDF(
+/**
+ * A kanban's Create card (a print job has no action; Start and Complete
+ * cards print from the kanbans list) at the printer's media size when the
+ * medium holds one
+ * (3" x 2" and up): ZPL for a Zebra, else a one-card PDF. A PDF printer with
+ * a smaller or no medium (an office printer) prints the company's Kanban
+ * Label Size setting, the letter sheet by default.
+ */
+async function renderKanbanCard(
client: SupabaseClient<Database>,
+ companyId: string,
item: KanbanCardItem,
- format: "zpl" | "pdf"
+ format: "zpl" | "pdf",
+ mediaSizeId: string
): Promise<GeneratedContent> {
+ const mediaSize = labelSizes.find((s) => s.id === mediaSizeId);
+ const cardSize =
+ mediaSize && canHoldKanbanLabel(mediaSize) ? mediaSize : undefined;
+
+ const label: KanbanLabelItem = {
+ id: item.id,
+ kanbanId: item.kanbanId,
+ itemName: item.itemName,
+ itemReadableId: item.itemId,
+ locationName: item.locationName,
+ storageUnitName: item.storageUnitName,
+ fromStorageUnitName: item.fromStorageUnitName,
+ supplierName: item.supplierName,
+ quantity: item.quantity,
+ replenishmentLevel: item.replenishmentLevel,
+ unitOfMeasureCode: item.unitOfMeasureCode
+ };
+
if (format === "zpl") {
- throw new Error(
- "Built-in kanban card generation only supports PDF printers."
- );
+ if (!cardSize) {
+ throw new Error(
+ `A kanban card needs a label of at least 3" x 2"; this printer's media size is ${mediaSizeId}.`
+ );
+ }
+ requireZplCapable(cardSize);
+ return {
+ content: generateKanbanLabelZPL(label, cardSize, ERP_URL ?? ""),
+ contentType: "zpl"
+ };
}
- let thumbnail: string | null = null;
- if (item.thumbnailPath) {
+ const labelSize = cardSize ?? (await getKanbanLabelSize(client, companyId));
+
+ // Only the letter sheet prints the item thumbnail.
+ if (!labelSize && item.thumbnailPath) {
// Private object paths are prefixed with the owning companyId segment.
- const companyId = item.thumbnailPath.split("/")[0] ?? "";
+ const ownerId = item.thumbnailPath.split("/")[0] ?? "";
const { data } = await storage(client)
- .company(companyId)
+ .company(ownerId)
.download(item.thumbnailPath);
if (data) {
const buffer = Buffer.from(await data.arrayBuffer());
const ext = item.thumbnailPath.split(".").pop()?.toLowerCase();
const mime = ext === "jpg" || ext === "jpeg" ? "image/jpeg" : "image/png";
- thumbnail = `data:${mime};base64,${buffer.toString("base64")}`;
+ label.thumbnail = `data:${mime};base64,${buffer.toString("base64")}`;
}
}
return renderPdfContent(
<KanbanLabelPDF
baseUrl={ERP_URL ?? ""}
- labels={[
- {
- id: item.id,
- itemId: item.itemId,
- itemName: item.itemName,
- itemReadableId: item.itemId,
- locationName: item.locationName,
- storageUnitId: item.storageUnitId,
- storageUnitName: item.storageUnitName,
- fromStorageUnitName: item.fromStorageUnitName,
- supplierName: item.supplierName,
- quantity: item.quantity,
- replenishmentLevel: item.replenishmentLevel,
- unitOfMeasureCode: item.unitOfMeasureCode,
- thumbnail
- }
- ]}
+ labels={[label]}
action="order"
+ labelSize={labelSize}
/>
);
}
+
+/** The company's Kanban Label Size; undefined is the letter sheet. */
+async function getKanbanLabelSize(
+ client: SupabaseClient<Database>,
+ companyId: string
+): Promise<LabelSize | undefined> {
+ const { data } = await client
+ .from("companySettings")
+ .select("kanbanLabelSize")
+ .eq("id", companyId)
+ .maybeSingle();
+ return labelSizes.find((s) => s.id === data?.kanbanLabelSize);
+}
diff --git a/packages/jobs/src/inngest/functions/tasks/print-job/resolvers.ts b/packages/jobs/src/inngest/functions/tasks/print-job/resolvers.ts
index 414ad16994..dc324bfa7b 100644
--- a/packages/jobs/src/inngest/functions/tasks/print-job/resolvers.ts
+++ b/packages/jobs/src/inngest/functions/tasks/print-job/resolvers.ts
@@ -9,6 +9,7 @@ import type { SupabaseClient } from "@supabase/supabase-js";
export type KanbanCardItem = {
id: string;
+ kanbanId: string | null;
kanbanUrl: string;
itemId: string;
itemName: string;
@@ -74,6 +75,7 @@ export async function resolveKanbanData(
items: [
{
id: sourceDocumentId,
+ kanbanId: kanban.kanbanId,
kanbanUrl,
itemId: kanban.readableIdWithRevision || kanban.itemId || "",
itemName: kanban.name || "",
@@ -88,7 +90,7 @@ export async function resolveKanbanData(
thumbnailPath: kanban.thumbnailPath
}
],
- readableId: kanban.readableIdWithRevision ?? null
+ readableId: kanban.kanbanId ?? kanban.readableIdWithRevision ?? null
};
}
diff --git a/packages/locale/locales/de/erp.po b/packages/locale/locales/de/erp.po
index 7da335a6c1..e3651bf593 100644
--- a/packages/locale/locales/de/erp.po
+++ b/packages/locale/locales/de/erp.po
@@ -661,6 +661,10 @@ msgstr ""
msgid "{excluded, plural, one {# row excluded} other {# rows excluded}}"
msgstr "{excluded, plural, one {# Zeile ausgeschlossen} other {# Zeilen ausgeschlossen}}"
+#. placeholder {0}: printIds.length
+msgid "{failed} of {0} print jobs failed"
+msgstr "{failed} von {0} Druckaufträgen fehlgeschlagen"
+
msgid "{hidden, plural, one {And # more record.} other {And # more records.}}"
msgstr "{hidden, plural, one {Und # weiterer Datensatz.} other {Und # weitere Datensätze.}}"
@@ -1036,6 +1040,9 @@ msgstr "2h"
msgid "3 years"
msgstr "3 Jahre"
+msgid "3\" x 2\" label"
+msgstr "3\" x 2\" Etikett"
+
msgid "30D"
msgstr "30 Tage"
@@ -1048,6 +1055,9 @@ msgstr "3h"
msgid "4 years"
msgstr "4 Jahre"
+msgid "4\" x 2\" label"
+msgstr "4\" x 2\" Etikett"
+
msgid "4h"
msgstr "4h"
@@ -1090,6 +1100,9 @@ msgstr "Ein 3D-Modell, das der Werker ansehen kann"
msgid "A 4-digit PIN is generated when the operator is created."
msgstr "Eine 4-stellige PIN wird generiert, wenn ein Werker erstellt wird."
+msgid "A 4\" x 2\" or 3\" x 2\" label prints one card per label, for a thermal printer such as a Zebra."
+msgstr "Ein 4\" x 2\"- oder 3\" x 2\"-Etikett druckt eine Karte pro Etikett, für einen Thermodrucker wie Zebra."
+
msgid "A batch needs at least one operation. To break up the whole batch, use Dissolve instead."
msgstr "Ein Los benötigt mindestens einen Arbeitsgang. Um das ganze Los aufzulösen, nutzen Sie stattdessen Auflösen."
@@ -4692,6 +4705,9 @@ msgstr "Berechnungsmethode"
msgid "Calendar"
msgstr "Kalender"
+msgid "Calendar Weeks"
+msgstr "Kalenderwochen"
+
msgid "Calibration"
msgstr "Kalibrierung"
@@ -8873,6 +8889,9 @@ msgstr "Die Fremdarbeitsgänge jedes Lieferanten aus jedem Fertigungsauftrag wer
msgid "Each unit's fair value and economic life decide whether the term covers most of it. Click a cell to change it."
msgstr "Der beizulegende Zeitwert jeder Einheit und ihre wirtschaftliche Lebensdauer bestimmen, ob die Laufzeit den Großteil abdeckt. Klicken Sie auf eine Zelle, um sie zu ändern."
+msgid "Each week is headed with its ISO 8601 week of the year: Week 44, Week 45, Week 46."
+msgstr "Jede Woche wird mit ihrer ISO-8601-Kalenderwoche überschrieben: Woche 44, Woche 45, Woche 46."
+
msgid "Each, lb, ft…"
msgstr "Stück, kg, m…"
@@ -11696,6 +11715,9 @@ msgstr "Wie die Stichprobengröße entschieden wird — Alle inspizieren, Erste
msgid "How the unit price of each quantity was calculated."
msgstr "Wie der Einzelpreis jeder Menge berechnet wurde."
+msgid "How the weekly columns of Material Planning, Production Planning and Demand Forecasts are numbered."
+msgstr "Wie die Wochenspalten von Materialplanung, Produktionsplanung und Bedarfsprognosen nummeriert werden."
+
msgid "How the whole build is turned on a step, such as flipped to fit parts on its underside. Later steps of the same build keep it until a step turns the build again."
msgstr "Die Ausrichtung der gesamten Baugruppe bei einem Schritt, z. B. umgedreht, damit Teile an ihrer Unterseite passen. Spätere Schritte derselben Baugruppe behalten sie bei, bis ein Schritt die Baugruppe erneut dreht."
@@ -12857,6 +12879,9 @@ msgstr "Kanban"
msgid "Kanban for {kanbanName}"
msgstr "Kanban für {kanbanName}"
+msgid "Kanban ID"
+msgstr "Kanban-ID"
+
msgid "Kanban Output"
msgstr "Kanban-Ausgabe"
@@ -12929,6 +12954,9 @@ msgstr "Set"
msgid "Label"
msgstr "Bezeichnung"
+msgid "Label Size"
+msgstr "Etikettengröße"
+
msgid "Label to complete the current operation for this kanban"
msgstr "Etikett zum Abschließen des aktuellen Vorgangs für dieses Kanban"
@@ -13244,6 +13272,9 @@ msgstr "Lassen Sie uns Ihr Konto einrichten"
msgid "Letter"
msgstr "Buchstabe"
+msgid "Letter, 6 per page"
+msgstr "Letter, 6 pro Seite"
+
msgid "Liability"
msgstr "Verbindlichkeit"
@@ -16175,6 +16206,12 @@ msgstr "Anzahl offener Aufgaben"
msgid "Number of operations"
msgstr "Anzahl der Arbeitsgänge"
+msgid "Number weeks by calendar week"
+msgstr "Wochen nach Kalenderwoche nummerieren"
+
+msgid "Number weeks from the present week"
+msgstr "Wochen ab der aktuellen Woche nummerieren"
+
msgid "Numbering sequence"
msgstr "Nummernkreis"
@@ -18004,6 +18041,7 @@ msgstr "Kapital eingezogen"
msgid "Print"
msgstr "Drucken"
+#. placeholder {0}: printIds.length
#. placeholder {0}: selectedIds.size
msgid "Print {0} Labels"
msgstr "Drucke {0} Etiketten"
@@ -18711,6 +18749,10 @@ msgstr "Fragen"
msgid "Queued"
msgstr "In Warteschlange"
+#. placeholder {0}: printIds.length
+msgid "Queued {0} labels for printing"
+msgstr "{0} Etiketten zum Drucken eingereiht"
+
msgid "Queued {count} sync operations for sync"
msgstr ""
@@ -27092,13 +27134,12 @@ msgstr "Woche"
msgid "Week {0}"
msgstr "Woche {0}"
-#. placeholder {0}: i + 1
-msgid "Week {0} ({formattedDate})"
-msgstr "Woche {0} ({formattedDate})"
-
msgid "Week {weekNumber}"
msgstr "Woche {weekNumber}"
+msgid "Week {weekNumber} ({formattedDate})"
+msgstr "Woche {weekNumber} ({formattedDate})"
+
msgid "Week 8 cutover"
msgstr "Woche 8 Umstellung"
@@ -27135,6 +27176,15 @@ msgstr "Wochen 5 bis 7"
msgid "Weeks 7 to 8"
msgstr "Wochen 7 bis 8"
+msgid "Weeks are counted from today: Present Week, Week 2, Week 3."
+msgstr "Wochen werden ab heute gezählt: Aktuelle Woche, Woche 2, Woche 3."
+
+msgid "Weeks are numbered by calendar week"
+msgstr "Wochen werden nach Kalenderwoche nummeriert"
+
+msgid "Weeks are numbered from the present week"
+msgstr "Wochen werden ab der aktuellen Woche nummeriert"
+
msgid "Weeks Open"
msgstr "Wochen offen"
diff --git a/packages/locale/locales/de/mes.po b/packages/locale/locales/de/mes.po
index efaf177e4b..1e136ce191 100644
--- a/packages/locale/locales/de/mes.po
+++ b/packages/locale/locales/de/mes.po
@@ -1762,6 +1762,9 @@ msgstr "Seriennummer scannen oder suchen..."
msgid "Scan or select a tracked entity from this lot to add it as a sample column, then record its result in the grid."
msgstr "Scannen oder wählen Sie eine Verfolgte Einheit aus dieser Charge, um sie als Probenspalte hinzuzufügen, dann erfassen Sie das Ergebnis in der Tabelle."
+msgid "Scan or select the unit, then scan the kanban card again"
+msgstr "Scannen oder wählen Sie die Einheit aus und scannen Sie dann die Kanban-Karte erneut"
+
msgid "Scan received"
msgstr "Scan empfangen"
diff --git a/packages/locale/locales/en/erp.po b/packages/locale/locales/en/erp.po
index e5b7c493d6..a09f4a0372 100644
--- a/packages/locale/locales/en/erp.po
+++ b/packages/locale/locales/en/erp.po
@@ -661,6 +661,10 @@ msgstr "{errors} failed"
msgid "{excluded, plural, one {# row excluded} other {# rows excluded}}"
msgstr "{excluded, plural, one {# row excluded} other {# rows excluded}}"
+#. placeholder {0}: printIds.length
+msgid "{failed} of {0} print jobs failed"
+msgstr "{failed} of {0} print jobs failed"
+
msgid "{hidden, plural, one {And # more record.} other {And # more records.}}"
msgstr "{hidden, plural, one {And # more record.} other {And # more records.}}"
@@ -1036,6 +1040,9 @@ msgstr "2h"
msgid "3 years"
msgstr "3 years"
+msgid "3\" x 2\" label"
+msgstr "3\" x 2\" label"
+
msgid "30D"
msgstr "30D"
@@ -1048,6 +1055,9 @@ msgstr "3h"
msgid "4 years"
msgstr "4 years"
+msgid "4\" x 2\" label"
+msgstr "4\" x 2\" label"
+
msgid "4h"
msgstr "4h"
@@ -1090,6 +1100,9 @@ msgstr "A 3D model the operator can turn around"
msgid "A 4-digit PIN is generated when the operator is created."
msgstr "A 4-digit PIN is generated when the operator is created."
+msgid "A 4\" x 2\" or 3\" x 2\" label prints one card per label, for a thermal printer such as a Zebra."
+msgstr "A 4\" x 2\" or 3\" x 2\" label prints one card per label, for a thermal printer such as a Zebra."
+
msgid "A batch needs at least one operation. To break up the whole batch, use Dissolve instead."
msgstr "A batch needs at least one operation. To break up the whole batch, use Dissolve instead."
@@ -4692,6 +4705,9 @@ msgstr "Calculation Method"
msgid "Calendar"
msgstr "Calendar"
+msgid "Calendar Weeks"
+msgstr "Calendar Weeks"
+
msgid "Calibration"
msgstr "Calibration"
@@ -8873,6 +8889,9 @@ msgstr "Each supplier's outside operations from every job go on one new purchase
msgid "Each unit's fair value and economic life decide whether the term covers most of it. Click a cell to change it."
msgstr "Each unit's fair value and economic life decide whether the term covers most of it. Click a cell to change it."
+msgid "Each week is headed with its ISO 8601 week of the year: Week 44, Week 45, Week 46."
+msgstr "Each week is headed with its ISO 8601 week of the year: Week 44, Week 45, Week 46."
+
msgid "Each, lb, ft…"
msgstr "Each, lb, ft…"
@@ -11696,6 +11715,9 @@ msgstr "How the sample size is decided — Inspect All, Inspect First N, Percent
msgid "How the unit price of each quantity was calculated."
msgstr "How the unit price of each quantity was calculated."
+msgid "How the weekly columns of Material Planning, Production Planning and Demand Forecasts are numbered."
+msgstr "How the weekly columns of Material Planning, Production Planning and Demand Forecasts are numbered."
+
msgid "How the whole build is turned on a step, such as flipped to fit parts on its underside. Later steps of the same build keep it until a step turns the build again."
msgstr "How the whole build is turned on a step, such as flipped to fit parts on its underside. Later steps of the same build keep it until a step turns the build again."
@@ -12857,6 +12879,9 @@ msgstr "Kanban"
msgid "Kanban for {kanbanName}"
msgstr "Kanban for {kanbanName}"
+msgid "Kanban ID"
+msgstr "Kanban ID"
+
msgid "Kanban Output"
msgstr "Kanban Output"
@@ -12929,6 +12954,9 @@ msgstr "Kit"
msgid "Label"
msgstr "Label"
+msgid "Label Size"
+msgstr "Label Size"
+
msgid "Label to complete the current operation for this kanban"
msgstr "Label to complete the current operation for this kanban"
@@ -13244,6 +13272,9 @@ msgstr "Let's setup your account"
msgid "Letter"
msgstr "Letter"
+msgid "Letter, 6 per page"
+msgstr "Letter, 6 per page"
+
msgid "Liability"
msgstr "Liability"
@@ -16175,6 +16206,12 @@ msgstr "Number of open tasks"
msgid "Number of operations"
msgstr "Number of operations"
+msgid "Number weeks by calendar week"
+msgstr "Number weeks by calendar week"
+
+msgid "Number weeks from the present week"
+msgstr "Number weeks from the present week"
+
msgid "Numbering sequence"
msgstr "Numbering sequence"
@@ -18004,6 +18041,7 @@ msgstr "Principal Collected"
msgid "Print"
msgstr "Print"
+#. placeholder {0}: printIds.length
#. placeholder {0}: selectedIds.size
msgid "Print {0} Labels"
msgstr "Print {0} Labels"
@@ -18711,6 +18749,10 @@ msgstr "Questions"
msgid "Queued"
msgstr "Queued"
+#. placeholder {0}: printIds.length
+msgid "Queued {0} labels for printing"
+msgstr "Queued {0} labels for printing"
+
msgid "Queued {count} sync operations for sync"
msgstr "Queued {count} sync operations for sync"
@@ -27092,13 +27134,12 @@ msgstr "Week"
msgid "Week {0}"
msgstr "Week {0}"
-#. placeholder {0}: i + 1
-msgid "Week {0} ({formattedDate})"
-msgstr "Week {0} ({formattedDate})"
-
msgid "Week {weekNumber}"
msgstr "Week {weekNumber}"
+msgid "Week {weekNumber} ({formattedDate})"
+msgstr "Week {weekNumber} ({formattedDate})"
+
msgid "Week 8 cutover"
msgstr "Week 8 cutover"
@@ -27135,6 +27176,15 @@ msgstr "Weeks 5 to 7"
msgid "Weeks 7 to 8"
msgstr "Weeks 7 to 8"
+msgid "Weeks are counted from today: Present Week, Week 2, Week 3."
+msgstr "Weeks are counted from today: Present Week, Week 2, Week 3."
+
+msgid "Weeks are numbered by calendar week"
+msgstr "Weeks are numbered by calendar week"
+
+msgid "Weeks are numbered from the present week"
+msgstr "Weeks are numbered from the present week"
+
msgid "Weeks Open"
msgstr "Weeks Open"
diff --git a/packages/locale/locales/en/mes.po b/packages/locale/locales/en/mes.po
index dee8d72553..baa3471345 100644
--- a/packages/locale/locales/en/mes.po
+++ b/packages/locale/locales/en/mes.po
@@ -1762,6 +1762,9 @@ msgstr "Scan or search serial number..."
msgid "Scan or select a tracked entity from this lot to add it as a sample column, then record its result in the grid."
msgstr "Scan or select a tracked entity from this lot to add it as a sample column, then record its result in the grid."
+msgid "Scan or select the unit, then scan the kanban card again"
+msgstr "Scan or select the unit, then scan the kanban card again"
+
msgid "Scan received"
msgstr "Scan received"
diff --git a/packages/locale/locales/es/erp.po b/packages/locale/locales/es/erp.po
index 5d26092ae0..422e9cee90 100644
--- a/packages/locale/locales/es/erp.po
+++ b/packages/locale/locales/es/erp.po
@@ -661,6 +661,10 @@ msgstr ""
msgid "{excluded, plural, one {# row excluded} other {# rows excluded}}"
msgstr "{excluded, plural, one {# fila excluida} other {# filas excluidas}}"
+#. placeholder {0}: printIds.length
+msgid "{failed} of {0} print jobs failed"
+msgstr "{failed} de {0} trabajos de impresión fallaron"
+
msgid "{hidden, plural, one {And # more record.} other {And # more records.}}"
msgstr "{hidden, plural, one {Y # registro más.} other {Y # registros más.}}"
@@ -1036,6 +1040,9 @@ msgstr "2h"
msgid "3 years"
msgstr "3 años"
+msgid "3\" x 2\" label"
+msgstr "Etiqueta de 3\" x 2\""
+
msgid "30D"
msgstr "30 días"
@@ -1048,6 +1055,9 @@ msgstr "3h"
msgid "4 years"
msgstr "4 años"
+msgid "4\" x 2\" label"
+msgstr "Etiqueta de 4\" x 2\""
+
msgid "4h"
msgstr "4h"
@@ -1090,6 +1100,9 @@ msgstr "Un modelo 3D que el operario puede girar"
msgid "A 4-digit PIN is generated when the operator is created."
msgstr "Se genera un PIN de 4 dígitos cuando se crea el operario."
+msgid "A 4\" x 2\" or 3\" x 2\" label prints one card per label, for a thermal printer such as a Zebra."
+msgstr "Una etiqueta de 4\" x 2\" o 3\" x 2\" imprime una tarjeta por etiqueta, para una impresora térmica como Zebra."
+
msgid "A batch needs at least one operation. To break up the whole batch, use Dissolve instead."
msgstr "Un lote de producción necesita al menos una operación. Para dividir el lote de producción completo, utilice Disolver en su lugar."
@@ -4692,6 +4705,9 @@ msgstr "Método de Cálculo"
msgid "Calendar"
msgstr "Calendario"
+msgid "Calendar Weeks"
+msgstr "Semanas naturales"
+
msgid "Calibration"
msgstr "Calibración"
@@ -8873,6 +8889,9 @@ msgstr "Las operaciones externas de cada proveedor de cada orden de trabajo se c
msgid "Each unit's fair value and economic life decide whether the term covers most of it. Click a cell to change it."
msgstr "El valor justo y vida económica de cada unidad deciden si el término cubre la mayor parte de ella. Haz clic en una celda para cambiarlo."
+msgid "Each week is headed with its ISO 8601 week of the year: Week 44, Week 45, Week 46."
+msgstr "Cada semana se encabeza con su semana del año ISO 8601: Semana 44, Semana 45, Semana 46."
+
msgid "Each, lb, ft…"
msgstr "Cada, lb, ft…"
@@ -11696,6 +11715,9 @@ msgstr "Cómo se decide el tamaño de la muestra — Inspeccionar Todo, Inspecci
msgid "How the unit price of each quantity was calculated."
msgstr "Cómo se calculó el precio unitario de cada cantidad."
+msgid "How the weekly columns of Material Planning, Production Planning and Demand Forecasts are numbered."
+msgstr "Cómo se numeran las columnas semanales de Planificación de materiales, Planificación de producción y Pronósticos de demanda."
+
msgid "How the whole build is turned on a step, such as flipped to fit parts on its underside. Later steps of the same build keep it until a step turns the build again."
msgstr "Cómo se orienta todo el conjunto en un paso, por ejemplo, dado la vuelta para encajar piezas en su parte inferior. Los pasos posteriores del mismo conjunto mantienen esta orientación hasta que un paso vuelva a girar el conjunto."
@@ -12857,6 +12879,9 @@ msgstr "Kanban"
msgid "Kanban for {kanbanName}"
msgstr "Kanban para {kanbanName}"
+msgid "Kanban ID"
+msgstr "ID de Kanban"
+
msgid "Kanban Output"
msgstr "Salida Kanban"
@@ -12929,6 +12954,9 @@ msgstr "Kit"
msgid "Label"
msgstr "Etiqueta"
+msgid "Label Size"
+msgstr "Tamaño de etiqueta"
+
msgid "Label to complete the current operation for this kanban"
msgstr "Etiqueta para completar la operación actual de este kanban"
@@ -13244,6 +13272,9 @@ msgstr "Configuremos tu cuenta"
msgid "Letter"
msgstr "Letra"
+msgid "Letter, 6 per page"
+msgstr "Carta, 6 por página"
+
msgid "Liability"
msgstr "Pasivo"
@@ -16175,6 +16206,12 @@ msgstr "Número de tareas abiertas"
msgid "Number of operations"
msgstr "Número de operaciones"
+msgid "Number weeks by calendar week"
+msgstr "Numerar las semanas por semana natural"
+
+msgid "Number weeks from the present week"
+msgstr "Numerar las semanas desde la semana actual"
+
msgid "Numbering sequence"
msgstr "Secuencia de numeración"
@@ -18004,6 +18041,7 @@ msgstr "Principal cobrado"
msgid "Print"
msgstr "Imprimir"
+#. placeholder {0}: printIds.length
#. placeholder {0}: selectedIds.size
msgid "Print {0} Labels"
msgstr "Imprimir {0} etiquetas"
@@ -18711,6 +18749,10 @@ msgstr "Preguntas"
msgid "Queued"
msgstr "En cola"
+#. placeholder {0}: printIds.length
+msgid "Queued {0} labels for printing"
+msgstr "{0} etiquetas en cola para imprimir"
+
msgid "Queued {count} sync operations for sync"
msgstr ""
@@ -27092,13 +27134,12 @@ msgstr "Semana"
msgid "Week {0}"
msgstr "Semana {0}"
-#. placeholder {0}: i + 1
-msgid "Week {0} ({formattedDate})"
-msgstr "Semana {0} ({formattedDate})"
-
msgid "Week {weekNumber}"
msgstr "Semana {weekNumber}"
+msgid "Week {weekNumber} ({formattedDate})"
+msgstr "Semana {weekNumber} ({formattedDate})"
+
msgid "Week 8 cutover"
msgstr "Semana 8 cambio"
@@ -27135,6 +27176,15 @@ msgstr "Semanas 5 a 7"
msgid "Weeks 7 to 8"
msgstr "Semanas 7 a 8"
+msgid "Weeks are counted from today: Present Week, Week 2, Week 3."
+msgstr "Las semanas se cuentan desde hoy: Semana actual, Semana 2, Semana 3."
+
+msgid "Weeks are numbered by calendar week"
+msgstr "Las semanas se numeran por semana natural"
+
+msgid "Weeks are numbered from the present week"
+msgstr "Las semanas se numeran desde la semana actual"
+
msgid "Weeks Open"
msgstr "Semanas Abiertas"
diff --git a/packages/locale/locales/es/mes.po b/packages/locale/locales/es/mes.po
index 39f0021d7e..fd01c4e703 100644
--- a/packages/locale/locales/es/mes.po
+++ b/packages/locale/locales/es/mes.po
@@ -1762,6 +1762,9 @@ msgstr "Escanear o buscar número de serie..."
msgid "Scan or select a tracked entity from this lot to add it as a sample column, then record its result in the grid."
msgstr "Escanee o seleccione una entidad rastreada de este lote para agregarla como columna de muestra, luego registre su resultado en la cuadrícula."
+msgid "Scan or select the unit, then scan the kanban card again"
+msgstr "Escanea o selecciona la unidad y luego vuelve a escanear la tarjeta kanban"
+
msgid "Scan received"
msgstr "Escaneo recibido"
diff --git a/packages/locale/locales/fr/erp.po b/packages/locale/locales/fr/erp.po
index a38972786d..d90149caeb 100644
--- a/packages/locale/locales/fr/erp.po
+++ b/packages/locale/locales/fr/erp.po
@@ -661,6 +661,10 @@ msgstr ""
msgid "{excluded, plural, one {# row excluded} other {# rows excluded}}"
msgstr "{excluded, plural, one {# ligne exclue} other {# lignes exclues}}"
+#. placeholder {0}: printIds.length
+msgid "{failed} of {0} print jobs failed"
+msgstr "{failed} sur {0} travaux d'impression ont échoué"
+
msgid "{hidden, plural, one {And # more record.} other {And # more records.}}"
msgstr "{hidden, plural, one {Et # enregistrement de plus.} other {Et # enregistrements de plus.}}"
@@ -1036,6 +1040,9 @@ msgstr "2h"
msgid "3 years"
msgstr "3 ans"
+msgid "3\" x 2\" label"
+msgstr "Étiquette 3\" x 2\""
+
msgid "30D"
msgstr "30 jours"
@@ -1048,6 +1055,9 @@ msgstr "3h"
msgid "4 years"
msgstr "4 ans"
+msgid "4\" x 2\" label"
+msgstr "Étiquette 4\" x 2\""
+
msgid "4h"
msgstr "4h"
@@ -1090,6 +1100,9 @@ msgstr "Un modèle 3D que l'opérateur peut faire tourner"
msgid "A 4-digit PIN is generated when the operator is created."
msgstr "Un code PIN à 4 chiffres est généré lors de la création de l'opérateur."
+msgid "A 4\" x 2\" or 3\" x 2\" label prints one card per label, for a thermal printer such as a Zebra."
+msgstr "Une étiquette 4\" x 2\" ou 3\" x 2\" imprime une carte par étiquette, pour une imprimante thermique comme Zebra."
+
msgid "A batch needs at least one operation. To break up the whole batch, use Dissolve instead."
msgstr "Un lot de production a besoin d'au moins une opération. Pour diviser tout le lot, utilisez plutôt Dissoudre."
@@ -4692,6 +4705,9 @@ msgstr "Méthode de calcul"
msgid "Calendar"
msgstr "Calendrier"
+msgid "Calendar Weeks"
+msgstr "Semaines calendaires"
+
msgid "Calibration"
msgstr "Étalonnage"
@@ -8873,6 +8889,9 @@ msgstr "Les opérations externalisées de chaque fournisseur de chaque ordre de
msgid "Each unit's fair value and economic life decide whether the term covers most of it. Click a cell to change it."
msgstr "La juste valeur et la vie économique de chaque unité décident si la durée couvre la majeure partie. Cliquez sur une cellule pour le modifier."
+msgid "Each week is headed with its ISO 8601 week of the year: Week 44, Week 45, Week 46."
+msgstr "Chaque semaine porte son numéro de semaine ISO 8601 : Semaine 44, Semaine 45, Semaine 46."
+
msgid "Each, lb, ft…"
msgstr "Chacun, lb, ft…"
@@ -11696,6 +11715,9 @@ msgstr "Comment la taille d'échantillon est décidée — Inspecter tout, Inspe
msgid "How the unit price of each quantity was calculated."
msgstr "Comment le prix unitaire de chaque quantité a été calculé."
+msgid "How the weekly columns of Material Planning, Production Planning and Demand Forecasts are numbered."
+msgstr "Comment sont numérotées les colonnes hebdomadaires de la Planification des matériaux, de la Planification de la production et des Prévisions de Besoins."
+
msgid "How the whole build is turned on a step, such as flipped to fit parts on its underside. Later steps of the same build keep it until a step turns the build again."
msgstr "Orientation de l'ensemble complet à une étape, par exemple retourné pour poser des pièces sur sa face inférieure. Les étapes suivantes du même ensemble conservent cette orientation jusqu'à ce qu'une étape oriente à nouveau l'ensemble."
@@ -12857,6 +12879,9 @@ msgstr "Kanban"
msgid "Kanban for {kanbanName}"
msgstr "Kanban pour {kanbanName}"
+msgid "Kanban ID"
+msgstr "ID du kanban"
+
msgid "Kanban Output"
msgstr "Sortie Kanban"
@@ -12929,6 +12954,9 @@ msgstr "Kit"
msgid "Label"
msgstr "Étiquette"
+msgid "Label Size"
+msgstr "Taille d'étiquette"
+
msgid "Label to complete the current operation for this kanban"
msgstr "Étiquette pour terminer l'opération actuelle pour ce kanban"
@@ -13244,6 +13272,9 @@ msgstr "Configurons votre compte"
msgid "Letter"
msgstr "Lettre"
+msgid "Letter, 6 per page"
+msgstr "Lettre, 6 par page"
+
msgid "Liability"
msgstr "Passif"
@@ -16175,6 +16206,12 @@ msgstr "Nombre de tâches ouvertes"
msgid "Number of operations"
msgstr "Nombre d'opérations"
+msgid "Number weeks by calendar week"
+msgstr "Numéroter les semaines par semaine calendaire"
+
+msgid "Number weeks from the present week"
+msgstr "Numéroter les semaines à partir de la semaine en cours"
+
msgid "Numbering sequence"
msgstr "Séquence de numérotation"
@@ -18004,6 +18041,7 @@ msgstr "Principal collecté"
msgid "Print"
msgstr "Imprimer"
+#. placeholder {0}: printIds.length
#. placeholder {0}: selectedIds.size
msgid "Print {0} Labels"
msgstr "Imprimer {0} étiquettes"
@@ -18711,6 +18749,10 @@ msgstr "Questions"
msgid "Queued"
msgstr "En file d'attente"
+#. placeholder {0}: printIds.length
+msgid "Queued {0} labels for printing"
+msgstr "{0} étiquettes mises en file d'impression"
+
msgid "Queued {count} sync operations for sync"
msgstr ""
@@ -27092,13 +27134,12 @@ msgstr "Semaine"
msgid "Week {0}"
msgstr "Semaine {0}"
-#. placeholder {0}: i + 1
-msgid "Week {0} ({formattedDate})"
-msgstr "Semaine {0} ({formattedDate})"
-
msgid "Week {weekNumber}"
msgstr "Semaine {weekNumber}"
+msgid "Week {weekNumber} ({formattedDate})"
+msgstr "Semaine {weekNumber} ({formattedDate})"
+
msgid "Week 8 cutover"
msgstr "Basculement semaine 8"
@@ -27135,6 +27176,15 @@ msgstr "Semaines 5 à 7"
msgid "Weeks 7 to 8"
msgstr "Semaines 7 à 8"
+msgid "Weeks are counted from today: Present Week, Week 2, Week 3."
+msgstr "Les semaines sont comptées à partir d'aujourd'hui : Semaine en cours, Semaine 2, Semaine 3."
+
+msgid "Weeks are numbered by calendar week"
+msgstr "Les semaines sont numérotées par semaine calendaire"
+
+msgid "Weeks are numbered from the present week"
+msgstr "Les semaines sont numérotées à partir de la semaine en cours"
+
msgid "Weeks Open"
msgstr "Semaines ouvertes"
diff --git a/packages/locale/locales/fr/mes.po b/packages/locale/locales/fr/mes.po
index 2e58373c5e..192123b1f7 100644
--- a/packages/locale/locales/fr/mes.po
+++ b/packages/locale/locales/fr/mes.po
@@ -1762,6 +1762,9 @@ msgstr "Scannez ou recherchez un numéro de série..."
msgid "Scan or select a tracked entity from this lot to add it as a sample column, then record its result in the grid."
msgstr "Scannez ou sélectionnez une entité suivie de ce lot pour l'ajouter en tant que colonne d'échantillon, puis enregistrez son résultat dans la grille."
+msgid "Scan or select the unit, then scan the kanban card again"
+msgstr "Scannez ou sélectionnez l'unité, puis scannez à nouveau la carte kanban"
+
msgid "Scan received"
msgstr "Scan reçu"
diff --git a/packages/locale/locales/hi/erp.po b/packages/locale/locales/hi/erp.po
index 553e5fb7e3..886f288fdc 100644
--- a/packages/locale/locales/hi/erp.po
+++ b/packages/locale/locales/hi/erp.po
@@ -661,6 +661,10 @@ msgstr ""
msgid "{excluded, plural, one {# row excluded} other {# rows excluded}}"
msgstr "{excluded, plural, one {# पंक्ति बाहर रखी गई} other {# पंक्तियाँ बाहर रखी गईं}}"
+#. placeholder {0}: printIds.length
+msgid "{failed} of {0} print jobs failed"
+msgstr "{0} में से {failed} प्रिंट जॉब विफल रहे"
+
msgid "{hidden, plural, one {And # more record.} other {And # more records.}}"
msgstr "{hidden, plural, one {और # अधिक रिकॉर्ड।} other {और # अधिक रिकॉर्ड।}}"
@@ -1036,6 +1040,9 @@ msgstr "2 घंटा"
msgid "3 years"
msgstr "3 वर्ष"
+msgid "3\" x 2\" label"
+msgstr "3\" x 2\" लेबल"
+
msgid "30D"
msgstr "30 दिन"
@@ -1048,6 +1055,9 @@ msgstr "3 घंटे"
msgid "4 years"
msgstr "4 साल"
+msgid "4\" x 2\" label"
+msgstr "4\" x 2\" लेबल"
+
msgid "4h"
msgstr "4 घंटे"
@@ -1090,6 +1100,9 @@ msgstr "एक 3D मॉडल जिसे ऑपरेटर घुमा स
msgid "A 4-digit PIN is generated when the operator is created."
msgstr "ऑपरेटर बनाए जाने पर एक 4-अंकीय PIN बनाया जाता है।"
+msgid "A 4\" x 2\" or 3\" x 2\" label prints one card per label, for a thermal printer such as a Zebra."
+msgstr "4\" x 2\" या 3\" x 2\" लेबल प्रति लेबल एक कार्ड प्रिंट करता है, Zebra जैसे थर्मल प्रिंटर के लिए।"
+
msgid "A batch needs at least one operation. To break up the whole batch, use Dissolve instead."
msgstr "बैच को कम से कम एक ऑपरेशन की आवश्यकता है। पूरे बैच को विभाजित करने के लिए, इसके बजाय विघटन का उपयोग करें।"
@@ -4692,6 +4705,9 @@ msgstr "गणना विधि"
msgid "Calendar"
msgstr "कैलेंडर"
+msgid "Calendar Weeks"
+msgstr "कैलेंडर सप्ताह"
+
msgid "Calibration"
msgstr "अंशांकन"
@@ -8873,6 +8889,9 @@ msgstr "प्रत्येक आपूर्तिकर्ता की ब
msgid "Each unit's fair value and economic life decide whether the term covers most of it. Click a cell to change it."
msgstr "प्रत्येक इकाई का उचित मूल्य और आर्थिक जीवन तय करता है कि क्या अवधि इसके अधिकांश को कवर करती है। इसे बदलने के लिए एक सेल पर क्लिक करें।"
+msgid "Each week is headed with its ISO 8601 week of the year: Week 44, Week 45, Week 46."
+msgstr "प्रत्येक सप्ताह के शीर्ष पर वर्ष का ISO 8601 सप्ताह होता है: सप्ताह 44, सप्ताह 45, सप्ताह 46।"
+
msgid "Each, lb, ft…"
msgstr "प्रत्येक, lb, ft…"
@@ -11696,6 +11715,9 @@ msgstr "नमूना आकार कैसे तय किया जात
msgid "How the unit price of each quantity was calculated."
msgstr "प्रत्येक मात्रा की इकाई मूल्य की गणना कैसे की गई।"
+msgid "How the weekly columns of Material Planning, Production Planning and Demand Forecasts are numbered."
+msgstr "सामग्री योजना, उत्पादन योजना और मांग पूर्वानुमान के साप्ताहिक कॉलम कैसे क्रमांकित होते हैं।"
+
msgid "How the whole build is turned on a step, such as flipped to fit parts on its underside. Later steps of the same build keep it until a step turns the build again."
msgstr "किसी चरण में पूरी असेंबली को किस तरह घुमाया गया है, जैसे नीचे की ओर लगे पार्ट्स के लिए उसे पलटना। उसी असेंबली के बाद के चरण तब तक यही स्थिति रखते हैं, जब तक कोई चरण असेंबली को फिर से न घुमाए."
@@ -12857,6 +12879,9 @@ msgstr "कानबान"
msgid "Kanban for {kanbanName}"
msgstr "{kanbanName} के लिए कानबन"
+msgid "Kanban ID"
+msgstr "कानबान आईडी"
+
msgid "Kanban Output"
msgstr "कानबन आउटपुट"
@@ -12929,6 +12954,9 @@ msgstr "किट"
msgid "Label"
msgstr "लेबल"
+msgid "Label Size"
+msgstr "लेबल आकार"
+
msgid "Label to complete the current operation for this kanban"
msgstr "इस कानबान के लिए वर्तमान ऑपरेशन पूर्ण करें"
@@ -13244,6 +13272,9 @@ msgstr "आइए अपना खाता सेट अप करें"
msgid "Letter"
msgstr "अक्षर"
+msgid "Letter, 6 per page"
+msgstr "लेटर, प्रति पेज 6"
+
msgid "Liability"
msgstr "देयता"
@@ -16175,6 +16206,12 @@ msgstr "खुले कार्यों की संख्या"
msgid "Number of operations"
msgstr "ऑपरेशन की संख्या"
+msgid "Number weeks by calendar week"
+msgstr "सप्ताहों को कैलेंडर सप्ताह के अनुसार क्रमांकित करें"
+
+msgid "Number weeks from the present week"
+msgstr "सप्ताहों को वर्तमान सप्ताह से क्रमांकित करें"
+
msgid "Numbering sequence"
msgstr "संख्या अनुक्रम"
@@ -18004,6 +18041,7 @@ msgstr "एकत्रित मूलधन"
msgid "Print"
msgstr "प्रिंट करें"
+#. placeholder {0}: printIds.length
#. placeholder {0}: selectedIds.size
msgid "Print {0} Labels"
msgstr "{0} लेबल प्रिंट करें"
@@ -18711,6 +18749,10 @@ msgstr "प्रश्न"
msgid "Queued"
msgstr "कतार में"
+#. placeholder {0}: printIds.length
+msgid "Queued {0} labels for printing"
+msgstr "{0} लेबल प्रिंट के लिए कतार में लगाए गए"
+
msgid "Queued {count} sync operations for sync"
msgstr ""
@@ -27092,13 +27134,12 @@ msgstr "सप्ताह"
msgid "Week {0}"
msgstr "सप्ताह {0}"
-#. placeholder {0}: i + 1
-msgid "Week {0} ({formattedDate})"
-msgstr "सप्ताह {0} ({formattedDate})"
-
msgid "Week {weekNumber}"
msgstr "सप्ताह {weekNumber}"
+msgid "Week {weekNumber} ({formattedDate})"
+msgstr "सप्ताह {weekNumber} ({formattedDate})"
+
msgid "Week 8 cutover"
msgstr "सप्ताह 8 कटओवर"
@@ -27135,6 +27176,15 @@ msgstr "सप्ताह 5 से 7"
msgid "Weeks 7 to 8"
msgstr "सप्ताह 7 से 8"
+msgid "Weeks are counted from today: Present Week, Week 2, Week 3."
+msgstr "सप्ताह आज से गिने जाते हैं: वर्तमान सप्ताह, सप्ताह 2, सप्ताह 3।"
+
+msgid "Weeks are numbered by calendar week"
+msgstr "सप्ताह कैलेंडर सप्ताह के अनुसार क्रमांकित हैं"
+
+msgid "Weeks are numbered from the present week"
+msgstr "सप्ताह वर्तमान सप्ताह से क्रमांकित हैं"
+
msgid "Weeks Open"
msgstr "हफ्ते खुले"
diff --git a/packages/locale/locales/hi/mes.po b/packages/locale/locales/hi/mes.po
index 350f40e845..29e3f9f2f6 100644
--- a/packages/locale/locales/hi/mes.po
+++ b/packages/locale/locales/hi/mes.po
@@ -1762,6 +1762,9 @@ msgstr "सीरियल नंबर स्कैन करें या ख
msgid "Scan or select a tracked entity from this lot to add it as a sample column, then record its result in the grid."
msgstr "इस लॉट से एक ट्रैक की गई इकाई को स्कैन या चुनें, इसे नमूना कॉलम के रूप में जोड़ें, और फिर ग्रिड में इसका परिणाम रिकॉर्ड करें।"
+msgid "Scan or select the unit, then scan the kanban card again"
+msgstr "इकाई को स्कैन करें या चुनें, फिर कानबान कार्ड को दोबारा स्कैन करें"
+
msgid "Scan received"
msgstr "स्कैन प्राप्त हुआ"
diff --git a/packages/locale/locales/it/erp.po b/packages/locale/locales/it/erp.po
index 3efd2d5fb2..f9bb0e1caf 100644
--- a/packages/locale/locales/it/erp.po
+++ b/packages/locale/locales/it/erp.po
@@ -661,6 +661,10 @@ msgstr ""
msgid "{excluded, plural, one {# row excluded} other {# rows excluded}}"
msgstr "{excluded, plural, one {# riga esclusa} other {# righe escluse}}"
+#. placeholder {0}: printIds.length
+msgid "{failed} of {0} print jobs failed"
+msgstr "{failed} di {0} stampe non riuscite"
+
msgid "{hidden, plural, one {And # more record.} other {And # more records.}}"
msgstr "{hidden, plural, one {E # altro record.} other {E # altri record.}}"
@@ -1036,6 +1040,9 @@ msgstr "2h"
msgid "3 years"
msgstr "3 anni"
+msgid "3\" x 2\" label"
+msgstr "Etichetta 3\" x 2\""
+
msgid "30D"
msgstr "30 giorni"
@@ -1048,6 +1055,9 @@ msgstr "3h"
msgid "4 years"
msgstr "4 anni"
+msgid "4\" x 2\" label"
+msgstr "Etichetta 4\" x 2\""
+
msgid "4h"
msgstr "4h"
@@ -1090,6 +1100,9 @@ msgstr "Un modello 3D che l'operatore può ruotare"
msgid "A 4-digit PIN is generated when the operator is created."
msgstr "Un PIN a 4 cifre viene generato quando l'operatore viene creato."
+msgid "A 4\" x 2\" or 3\" x 2\" label prints one card per label, for a thermal printer such as a Zebra."
+msgstr "Un'etichetta 4\" x 2\" o 3\" x 2\" stampa una scheda per etichetta, per una stampante termica come Zebra."
+
msgid "A batch needs at least one operation. To break up the whole batch, use Dissolve instead."
msgstr "Un lotto di produzione richiede almeno un'operazione. Per dividere l'intero lotto di produzione, utilizza Dissolvi."
@@ -4692,6 +4705,9 @@ msgstr "Metodo di Calcolo"
msgid "Calendar"
msgstr "Calendario"
+msgid "Calendar Weeks"
+msgstr "Settimane di calendario"
+
msgid "Calibration"
msgstr "Taratura"
@@ -8873,6 +8889,9 @@ msgstr "Le operazioni esterne di ogni fornitore da ogni ordine di produzione ven
msgid "Each unit's fair value and economic life decide whether the term covers most of it. Click a cell to change it."
msgstr "Il valore equo di ogni unità e la sua vita economica decidono se il termine la copre per la maggior parte. Fai clic su una cella per modificarla."
+msgid "Each week is headed with its ISO 8601 week of the year: Week 44, Week 45, Week 46."
+msgstr "Ogni settimana è intestata con la sua settimana dell'anno ISO 8601: Settimana 44, Settimana 45, Settimana 46."
+
msgid "Each, lb, ft…"
msgstr "Ogni, lb, ft…"
@@ -11696,6 +11715,9 @@ msgstr "Come viene decisa la dimensione del campione — Ispeziona Tutto, Ispezi
msgid "How the unit price of each quantity was calculated."
msgstr "Come il prezzo unitario di ogni quantità è stato calcolato."
+msgid "How the weekly columns of Material Planning, Production Planning and Demand Forecasts are numbered."
+msgstr "Come vengono numerate le colonne settimanali di Pianificazione del materiale, Pianificazione della produzione e Previsioni di fabbisogno."
+
msgid "How the whole build is turned on a step, such as flipped to fit parts on its underside. Later steps of the same build keep it until a step turns the build again."
msgstr "Come viene orientato l'intero assemblato in un passo, ad esempio capovolto per montare componenti sul lato inferiore. I passi successivi dello stesso assemblato mantengono questo orientamento finché un passo non ruota di nuovo l'assemblato."
@@ -12857,6 +12879,9 @@ msgstr "Kanban"
msgid "Kanban for {kanbanName}"
msgstr "Kanban per {kanbanName}"
+msgid "Kanban ID"
+msgstr "ID Kanban"
+
msgid "Kanban Output"
msgstr "Output Kanban"
@@ -12929,6 +12954,9 @@ msgstr "Kit"
msgid "Label"
msgstr "Etichetta"
+msgid "Label Size"
+msgstr "Dimensione etichetta"
+
msgid "Label to complete the current operation for this kanban"
msgstr "Etichetta per completare l'operazione corrente per questo kanban"
@@ -13244,6 +13272,9 @@ msgstr "Configuriamo il tuo account"
msgid "Letter"
msgstr "Lettera"
+msgid "Letter, 6 per page"
+msgstr "Lettera, 6 per pagina"
+
msgid "Liability"
msgstr "Passività"
@@ -16175,6 +16206,12 @@ msgstr "Numero di attività aperte"
msgid "Number of operations"
msgstr "Numero di operazioni"
+msgid "Number weeks by calendar week"
+msgstr "Numera le settimane per settimana di calendario"
+
+msgid "Number weeks from the present week"
+msgstr "Numera le settimane dalla settimana corrente"
+
msgid "Numbering sequence"
msgstr "Sequenza di numerazione"
@@ -18004,6 +18041,7 @@ msgstr "Capitale raccolto"
msgid "Print"
msgstr "Stampa"
+#. placeholder {0}: printIds.length
#. placeholder {0}: selectedIds.size
msgid "Print {0} Labels"
msgstr "Stampa {0} Etichette"
@@ -18711,6 +18749,10 @@ msgstr "Domande"
msgid "Queued"
msgstr "In coda"
+#. placeholder {0}: printIds.length
+msgid "Queued {0} labels for printing"
+msgstr "{0} etichette in coda di stampa"
+
msgid "Queued {count} sync operations for sync"
msgstr ""
@@ -27092,13 +27134,12 @@ msgstr "Settimana"
msgid "Week {0}"
msgstr "Settimana {0}"
-#. placeholder {0}: i + 1
-msgid "Week {0} ({formattedDate})"
-msgstr "Settimana {0} ({formattedDate})"
-
msgid "Week {weekNumber}"
msgstr "Settimana {weekNumber}"
+msgid "Week {weekNumber} ({formattedDate})"
+msgstr "Settimana {weekNumber} ({formattedDate})"
+
msgid "Week 8 cutover"
msgstr "Cutover della settimana 8"
@@ -27135,6 +27176,15 @@ msgstr "Settimane 5-7"
msgid "Weeks 7 to 8"
msgstr "Settimane 7-8"
+msgid "Weeks are counted from today: Present Week, Week 2, Week 3."
+msgstr "Le settimane sono contate da oggi: Settimana corrente, Settimana 2, Settimana 3."
+
+msgid "Weeks are numbered by calendar week"
+msgstr "Le settimane sono numerate per settimana di calendario"
+
+msgid "Weeks are numbered from the present week"
+msgstr "Le settimane sono numerate dalla settimana corrente"
+
msgid "Weeks Open"
msgstr "Settimane Aperte"
diff --git a/packages/locale/locales/it/mes.po b/packages/locale/locales/it/mes.po
index 503451dba2..89e4c50523 100644
--- a/packages/locale/locales/it/mes.po
+++ b/packages/locale/locales/it/mes.po
@@ -1762,6 +1762,9 @@ msgstr "Scansiona o cerca numero di serie..."
msgid "Scan or select a tracked entity from this lot to add it as a sample column, then record its result in the grid."
msgstr "Scansiona o seleziona un'entità tracciata da questo lotto per aggiungerla come colonna campione, quindi registra il suo risultato nella griglia."
+msgid "Scan or select the unit, then scan the kanban card again"
+msgstr "Scansiona o seleziona l'unità, poi scansiona di nuovo la scheda kanban"
+
msgid "Scan received"
msgstr "Scansione ricevuta"
diff --git a/packages/locale/locales/ja/erp.po b/packages/locale/locales/ja/erp.po
index a18585f28c..c30cd8a70d 100644
--- a/packages/locale/locales/ja/erp.po
+++ b/packages/locale/locales/ja/erp.po
@@ -661,6 +661,10 @@ msgstr ""
msgid "{excluded, plural, one {# row excluded} other {# rows excluded}}"
msgstr "{excluded, plural, one {# 行除外} other {# 行除外}}"
+#. placeholder {0}: printIds.length
+msgid "{failed} of {0} print jobs failed"
+msgstr "{0} 件中 {failed} 件の印刷ジョブが失敗しました"
+
msgid "{hidden, plural, one {And # more record.} other {And # more records.}}"
msgstr "{hidden, plural, one {他に # 件のレコード} other {他に # 件のレコード}}"
@@ -1036,6 +1040,9 @@ msgstr "2時間"
msgid "3 years"
msgstr "3 年"
+msgid "3\" x 2\" label"
+msgstr "3\" x 2\" ラベル"
+
msgid "30D"
msgstr "30日"
@@ -1048,6 +1055,9 @@ msgstr "3時間"
msgid "4 years"
msgstr "4年"
+msgid "4\" x 2\" label"
+msgstr "4\" x 2\" ラベル"
+
msgid "4h"
msgstr "4時間"
@@ -1090,6 +1100,9 @@ msgstr "作業者が回転させることができる3Dモデル"
msgid "A 4-digit PIN is generated when the operator is created."
msgstr "4 桁の PIN は、作業者が作成されるときに生成されます。"
+msgid "A 4\" x 2\" or 3\" x 2\" label prints one card per label, for a thermal printer such as a Zebra."
+msgstr "4\" x 2\" または 3\" x 2\" ラベルは、Zebra などのサーマルプリンター向けに 1 ラベルに 1 枚のカードを印刷します。"
+
msgid "A batch needs at least one operation. To break up the whole batch, use Dissolve instead."
msgstr "バッチには少なくとも 1 つの工程が必要です。バッチ全体を分割するには、代わりに [分割] を使用してください。"
@@ -4692,6 +4705,9 @@ msgstr "計算方法"
msgid "Calendar"
msgstr "カレンダー"
+msgid "Calendar Weeks"
+msgstr "暦週"
+
msgid "Calibration"
msgstr "校正"
@@ -8873,6 +8889,9 @@ msgstr "各仕入先の全製造指図からの外注工程は、1つの新規
msgid "Each unit's fair value and economic life decide whether the term covers most of it. Click a cell to change it."
msgstr "各個の公正価値と経済的耐用年数により、条件がほとんどをカバーするかどうかが決まります。セルをクリックして変更してください。"
+msgid "Each week is headed with its ISO 8601 week of the year: Week 44, Week 45, Week 46."
+msgstr "各週の見出しには ISO 8601 の年間週番号が表示されます: 週 44、週 45、週 46。"
+
msgid "Each, lb, ft…"
msgstr "各、ポンド、フィート…"
@@ -11696,6 +11715,9 @@ msgstr "サンプルサイズがどのように決定されるか—すべてを
msgid "How the unit price of each quantity was calculated."
msgstr "各数量の単価がどのように計算されたか。"
+msgid "How the weekly columns of Material Planning, Production Planning and Demand Forecasts are numbered."
+msgstr "材料計画、生産計画、所要量予測の週次列の番号の付け方。"
+
msgid "How the whole build is turned on a step, such as flipped to fit parts on its underside. Later steps of the same build keep it until a step turns the build again."
msgstr "ステップ内でアセンブリ全体の向きを変えます。たとえば、底面に部品を取り付けるために裏返す場合などです。同じアセンブリの後続ステップは、別のステップで向きが変わるまでこの向きを維持します。"
@@ -12857,6 +12879,9 @@ msgstr "かんばん"
msgid "Kanban for {kanbanName}"
msgstr "{kanbanName}のかんばん"
+msgid "Kanban ID"
+msgstr "かんばんID"
+
msgid "Kanban Output"
msgstr "かんばん出力"
@@ -12929,6 +12954,9 @@ msgstr "キット"
msgid "Label"
msgstr "ラベル"
+msgid "Label Size"
+msgstr "ラベルサイズ"
+
msgid "Label to complete the current operation for this kanban"
msgstr "このかんばんの現在の工程を完了するためのラベル"
@@ -13244,6 +13272,9 @@ msgstr "アカウントをセットアップしましょう"
msgid "Letter"
msgstr "文字"
+msgid "Letter, 6 per page"
+msgstr "レター、1 ページに 6 枚"
+
msgid "Liability"
msgstr "負債"
@@ -16175,6 +16206,12 @@ msgstr "未実行タスクの数"
msgid "Number of operations"
msgstr "工程の数"
+msgid "Number weeks by calendar week"
+msgstr "週を暦週で番号付けする"
+
+msgid "Number weeks from the present week"
+msgstr "週を今週から番号付けする"
+
msgid "Numbering sequence"
msgstr "採番"
@@ -18004,6 +18041,7 @@ msgstr "元本回収済み"
msgid "Print"
msgstr "印刷"
+#. placeholder {0}: printIds.length
#. placeholder {0}: selectedIds.size
msgid "Print {0} Labels"
msgstr "{0}個のラベルを印刷"
@@ -18711,6 +18749,10 @@ msgstr "質問"
msgid "Queued"
msgstr "キュー待ち"
+#. placeholder {0}: printIds.length
+msgid "Queued {0} labels for printing"
+msgstr "{0} 枚のラベルを印刷キューに追加しました"
+
msgid "Queued {count} sync operations for sync"
msgstr ""
@@ -27092,13 +27134,12 @@ msgstr "週"
msgid "Week {0}"
msgstr "第{0}週"
-#. placeholder {0}: i + 1
-msgid "Week {0} ({formattedDate})"
-msgstr "週 {0} ({formattedDate})"
-
msgid "Week {weekNumber}"
msgstr "週 {weekNumber}"
+msgid "Week {weekNumber} ({formattedDate})"
+msgstr "週 {weekNumber} ({formattedDate})"
+
msgid "Week 8 cutover"
msgstr "第8週のカットオーバー"
@@ -27135,6 +27176,15 @@ msgstr "週5~7"
msgid "Weeks 7 to 8"
msgstr "7~8週目"
+msgid "Weeks are counted from today: Present Week, Week 2, Week 3."
+msgstr "週は今日から数えます: 今週、週 2、週 3。"
+
+msgid "Weeks are numbered by calendar week"
+msgstr "週は暦週で番号付けされます"
+
+msgid "Weeks are numbered from the present week"
+msgstr "週は今週から番号付けされます"
+
msgid "Weeks Open"
msgstr "開いている週数"
diff --git a/packages/locale/locales/ja/mes.po b/packages/locale/locales/ja/mes.po
index 098e257759..4dd00620dd 100644
--- a/packages/locale/locales/ja/mes.po
+++ b/packages/locale/locales/ja/mes.po
@@ -1762,6 +1762,9 @@ msgstr "シリアル番号をスキャンまたは検索..."
msgid "Scan or select a tracked entity from this lot to add it as a sample column, then record its result in the grid."
msgstr "このロットから追跡対象をスキャンまたは選択してサンプル列として追加し、グリッドに結果を記録します。"
+msgid "Scan or select the unit, then scan the kanban card again"
+msgstr "ユニットをスキャンまたは選択してから、かんばんカードをもう一度スキャンしてください"
+
msgid "Scan received"
msgstr "スキャンを受け付けました"
diff --git a/packages/locale/locales/ko/erp.po b/packages/locale/locales/ko/erp.po
index 15847e3f19..db4ffa632e 100644
--- a/packages/locale/locales/ko/erp.po
+++ b/packages/locale/locales/ko/erp.po
@@ -661,6 +661,10 @@ msgstr ""
msgid "{excluded, plural, one {# row excluded} other {# rows excluded}}"
msgstr "{excluded, plural, one {# 행 제외됨} other {# 행 제외됨}}"
+#. placeholder {0}: printIds.length
+msgid "{failed} of {0} print jobs failed"
+msgstr "인쇄 작업 {0}개 중 {failed}개가 실패했습니다"
+
msgid "{hidden, plural, one {And # more record.} other {And # more records.}}"
msgstr "{hidden, plural, one {그리고 # 개 이상의 기록.} other {그리고 # 개 이상의 기록.}}"
@@ -1036,6 +1040,9 @@ msgstr "2시간"
msgid "3 years"
msgstr "3년"
+msgid "3\" x 2\" label"
+msgstr "3\" x 2\" 라벨"
+
msgid "30D"
msgstr "30일"
@@ -1048,6 +1055,9 @@ msgstr "3시간"
msgid "4 years"
msgstr "4년"
+msgid "4\" x 2\" label"
+msgstr "4\" x 2\" 라벨"
+
msgid "4h"
msgstr "4시간"
@@ -1090,6 +1100,9 @@ msgstr "작업자가 회전할 수 있는 3D 모델"
msgid "A 4-digit PIN is generated when the operator is created."
msgstr "작업자를 생성할 때 4자리 PIN이 생성됩니다."
+msgid "A 4\" x 2\" or 3\" x 2\" label prints one card per label, for a thermal printer such as a Zebra."
+msgstr "4\" x 2\" 또는 3\" x 2\" 라벨은 Zebra 같은 감열 프린터용으로 라벨당 카드 한 장을 인쇄합니다."
+
msgid "A batch needs at least one operation. To break up the whole batch, use Dissolve instead."
msgstr "배치는 최소한 하나의 공정이 필요합니다. 전체 배치를 분할하려면 대신 Dissolve를 사용하세요."
@@ -4692,6 +4705,9 @@ msgstr "계산 방법"
msgid "Calendar"
msgstr "달력"
+msgid "Calendar Weeks"
+msgstr "달력 주"
+
msgid "Calibration"
msgstr "교정"
@@ -8873,6 +8889,9 @@ msgstr "각 공급업체의 외주 공정은 모든 작업 지시에서 새로
msgid "Each unit's fair value and economic life decide whether the term covers most of it. Click a cell to change it."
msgstr "각 단위의 공정가액과 경제수명이 약관이 대부분을 포함하는지 결정합니다. 셀을 클릭하여 변경하세요."
+msgid "Each week is headed with its ISO 8601 week of the year: Week 44, Week 45, Week 46."
+msgstr "각 주의 제목은 ISO 8601 연간 주차로 표시됩니다: 44주차, 45주차, 46주차."
+
msgid "Each, lb, ft…"
msgstr "개, lb, ft…"
@@ -11696,6 +11715,9 @@ msgstr "샘플 크기를 결정하는 방식 — 전수 검사, 처음 N개 검
msgid "How the unit price of each quantity was calculated."
msgstr "각 수량의 단가를 계산한 방법"
+msgid "How the weekly columns of Material Planning, Production Planning and Demand Forecasts are numbered."
+msgstr "물질 계획, 생산 계획 및 소요량 예측의 주별 열 번호를 매기는 방식입니다."
+
msgid "How the whole build is turned on a step, such as flipped to fit parts on its underside. Later steps of the same build keep it until a step turns the build again."
msgstr "단계에서 전체 빌드를 돌리는 방향입니다(예: 아랫면에 부품을 끼우기 위해 뒤집기). 같은 빌드의 이후 단계는 다른 단계에서 빌드를 다시 돌릴 때까지 이 방향을 유지합니다."
@@ -12857,6 +12879,9 @@ msgstr "칸반"
msgid "Kanban for {kanbanName}"
msgstr "{kanbanName}의 칸반"
+msgid "Kanban ID"
+msgstr "칸반 ID"
+
msgid "Kanban Output"
msgstr "칸반 산출물"
@@ -12929,6 +12954,9 @@ msgstr "키트"
msgid "Label"
msgstr "라벨"
+msgid "Label Size"
+msgstr "라벨 크기"
+
msgid "Label to complete the current operation for this kanban"
msgstr "이 칸반의 현재 공정작업을 완료하는 라벨"
@@ -13244,6 +13272,9 @@ msgstr "계정을 설정해봅시다"
msgid "Letter"
msgstr "레터"
+msgid "Letter, 6 per page"
+msgstr "레터, 페이지당 6개"
+
msgid "Liability"
msgstr "부채"
@@ -16175,6 +16206,12 @@ msgstr "열린 작업 수"
msgid "Number of operations"
msgstr "공정의 수"
+msgid "Number weeks by calendar week"
+msgstr "달력 주 기준으로 주 번호 매기기"
+
+msgid "Number weeks from the present week"
+msgstr "현재 주부터 주 번호 매기기"
+
msgid "Numbering sequence"
msgstr "채번 규칙"
@@ -18004,6 +18041,7 @@ msgstr "수집된 원금"
msgid "Print"
msgstr "인쇄"
+#. placeholder {0}: printIds.length
#. placeholder {0}: selectedIds.size
msgid "Print {0} Labels"
msgstr "{0} 라벨 인쇄"
@@ -18711,6 +18749,10 @@ msgstr "질문"
msgid "Queued"
msgstr "대기열"
+#. placeholder {0}: printIds.length
+msgid "Queued {0} labels for printing"
+msgstr "라벨 {0}개를 인쇄 대기열에 추가했습니다"
+
msgid "Queued {count} sync operations for sync"
msgstr ""
@@ -27092,13 +27134,12 @@ msgstr "주"
msgid "Week {0}"
msgstr "{0}주차"
-#. placeholder {0}: i + 1
-msgid "Week {0} ({formattedDate})"
-msgstr "{0}주차 ({formattedDate})"
-
msgid "Week {weekNumber}"
msgstr "{weekNumber}주차"
+msgid "Week {weekNumber} ({formattedDate})"
+msgstr "{weekNumber}주차 ({formattedDate})"
+
msgid "Week 8 cutover"
msgstr "8주차 전환"
@@ -27135,6 +27176,15 @@ msgstr "5~7주"
msgid "Weeks 7 to 8"
msgstr "7~8주"
+msgid "Weeks are counted from today: Present Week, Week 2, Week 3."
+msgstr "주는 오늘부터 셉니다: 현재 주, 2주차, 3주차."
+
+msgid "Weeks are numbered by calendar week"
+msgstr "주 번호가 달력 주 기준으로 매겨집니다"
+
+msgid "Weeks are numbered from the present week"
+msgstr "주 번호가 현재 주부터 매겨집니다"
+
msgid "Weeks Open"
msgstr "미결 주수"
diff --git a/packages/locale/locales/ko/mes.po b/packages/locale/locales/ko/mes.po
index 9ee0175d71..579d8d635a 100644
--- a/packages/locale/locales/ko/mes.po
+++ b/packages/locale/locales/ko/mes.po
@@ -1762,6 +1762,9 @@ msgstr "시리얼 번호를 스캔하거나 검색하세요..."
msgid "Scan or select a tracked entity from this lot to add it as a sample column, then record its result in the grid."
msgstr "이 로트에서 추적 대상을 스캔하거나 선택하여 샘플 열로 추가한 다음 그리드에 결과를 기록하세요."
+msgid "Scan or select the unit, then scan the kanban card again"
+msgstr "단위를 스캔하거나 선택한 다음 칸반 카드를 다시 스캔하세요"
+
msgid "Scan received"
msgstr "스캔을 받았습니다"
diff --git a/packages/locale/locales/nl/erp.po b/packages/locale/locales/nl/erp.po
index 3a87f91e12..50e5919827 100644
--- a/packages/locale/locales/nl/erp.po
+++ b/packages/locale/locales/nl/erp.po
@@ -4011,6 +4011,9 @@ msgstr ""
msgid "Kanban for {kanbanName}"
msgstr ""
+msgid "Kanban ID"
+msgstr ""
+
msgid "Kanban Output"
msgstr ""
diff --git a/packages/locale/locales/pl/erp.po b/packages/locale/locales/pl/erp.po
index 518cb6367b..c6c2a23588 100644
--- a/packages/locale/locales/pl/erp.po
+++ b/packages/locale/locales/pl/erp.po
@@ -661,6 +661,10 @@ msgstr ""
msgid "{excluded, plural, one {# row excluded} other {# rows excluded}}"
msgstr "{excluded, plural, one {# wiersz wyłączony} other {# wierszy wyłączonych}}"
+#. placeholder {0}: printIds.length
+msgid "{failed} of {0} print jobs failed"
+msgstr "{failed} z {0} zadań drukowania nie powiodło się"
+
msgid "{hidden, plural, one {And # more record.} other {And # more records.}}"
msgstr "{hidden, plural, one {I jeszcze # rekord.} other {I jeszcze # rekordy.}}"
@@ -1036,6 +1040,9 @@ msgstr "2h"
msgid "3 years"
msgstr "3 lata"
+msgid "3\" x 2\" label"
+msgstr "Etykieta 3\" x 2\""
+
msgid "30D"
msgstr "30 dni"
@@ -1048,6 +1055,9 @@ msgstr "3h"
msgid "4 years"
msgstr "4 lata"
+msgid "4\" x 2\" label"
+msgstr "Etykieta 4\" x 2\""
+
msgid "4h"
msgstr "4h"
@@ -1090,6 +1100,9 @@ msgstr "Model 3D, który operator może obracać"
msgid "A 4-digit PIN is generated when the operator is created."
msgstr "4-cyfrowy PIN jest generowany podczas tworzenia operatora."
+msgid "A 4\" x 2\" or 3\" x 2\" label prints one card per label, for a thermal printer such as a Zebra."
+msgstr "Etykieta 4\" x 2\" lub 3\" x 2\" drukuje jedną kartę na etykietę, dla drukarki termicznej, np. Zebra."
+
msgid "A batch needs at least one operation. To break up the whole batch, use Dissolve instead."
msgstr "Partia produkcyjna wymaga co najmniej jednej operacji. Aby rozbić całą partię produkcyjną, zamiast tego użyj opcji Rozpuszczenie."
@@ -4692,6 +4705,9 @@ msgstr "Metoda Obliczania"
msgid "Calendar"
msgstr "Kalendarz"
+msgid "Calendar Weeks"
+msgstr "Tygodnie kalendarzowe"
+
msgid "Calibration"
msgstr "Wzorcowanie"
@@ -8873,6 +8889,9 @@ msgstr "Operacje zewnętrzne każdego dostawcy z każdego zlecenia produkcyjnego
msgid "Each unit's fair value and economic life decide whether the term covers most of it. Click a cell to change it."
msgstr "Godziwa wartość i okres ekonomiczny każdej sztuki decydują, czy okres umowy obejmuje większość jej wartości. Kliknij komórkę, aby zmienić."
+msgid "Each week is headed with its ISO 8601 week of the year: Week 44, Week 45, Week 46."
+msgstr "Każdy tydzień jest opisany numerem tygodnia roku według ISO 8601: Tydzień 44, Tydzień 45, Tydzień 46."
+
msgid "Each, lb, ft…"
msgstr "Każdy, lb, ft…"
@@ -11696,6 +11715,9 @@ msgstr "Jak decyduje się o wielkości próbki — Sprawdzić Wszystko, Sprawdzi
msgid "How the unit price of each quantity was calculated."
msgstr "Jak obliczona została cena jednostkowa każdej ilości."
+msgid "How the weekly columns of Material Planning, Production Planning and Demand Forecasts are numbered."
+msgstr "Sposób numerowania kolumn tygodniowych w Planowaniu materiałów, Planowaniu produkcji i Prognozach zapotrzebowania."
+
msgid "How the whole build is turned on a step, such as flipped to fit parts on its underside. Later steps of the same build keep it until a step turns the build again."
msgstr "Jak cały zespół jest obrócony w danym kroku, np. przewrócony, aby dopasować części od spodu. Kolejne kroki tego samego zespołu zachowują to ułożenie, dopóki któryś krok ponownie nie obróci zespołu."
@@ -12857,6 +12879,9 @@ msgstr "Kanban"
msgid "Kanban for {kanbanName}"
msgstr "Kanban dla {kanbanName}"
+msgid "Kanban ID"
+msgstr "ID kanbanu"
+
msgid "Kanban Output"
msgstr "Wyjście Kanban"
@@ -12929,6 +12954,9 @@ msgstr "Zestaw"
msgid "Label"
msgstr "Etykieta"
+msgid "Label Size"
+msgstr "Rozmiar etykiety"
+
msgid "Label to complete the current operation for this kanban"
msgstr "Etykieta do ukończenia bieżącej operacji dla tego kanbanu"
@@ -13244,6 +13272,9 @@ msgstr "Skonfigurujmy Twoje konto"
msgid "Letter"
msgstr "Litera"
+msgid "Letter, 6 per page"
+msgstr "Letter, 6 na stronę"
+
msgid "Liability"
msgstr "Zobowiązanie"
@@ -16175,6 +16206,12 @@ msgstr "Liczba otwartych zadań"
msgid "Number of operations"
msgstr "Liczba operacji"
+msgid "Number weeks by calendar week"
+msgstr "Numeruj tygodnie według tygodnia kalendarzowego"
+
+msgid "Number weeks from the present week"
+msgstr "Numeruj tygodnie od bieżącego tygodnia"
+
msgid "Numbering sequence"
msgstr "Sekwencja numeracji"
@@ -18004,6 +18041,7 @@ msgstr "Zebrana główna kwota"
msgid "Print"
msgstr "Drukuj"
+#. placeholder {0}: printIds.length
#. placeholder {0}: selectedIds.size
msgid "Print {0} Labels"
msgstr "Drukuj {0} etykiet"
@@ -18711,6 +18749,10 @@ msgstr "Pytania"
msgid "Queued"
msgstr "W kolejce"
+#. placeholder {0}: printIds.length
+msgid "Queued {0} labels for printing"
+msgstr "Dodano {0} etykiet do kolejki drukowania"
+
msgid "Queued {count} sync operations for sync"
msgstr ""
@@ -27092,13 +27134,12 @@ msgstr "Tydzień"
msgid "Week {0}"
msgstr "Tydzień {0}"
-#. placeholder {0}: i + 1
-msgid "Week {0} ({formattedDate})"
-msgstr "Tydzień {0} ({formattedDate})"
-
msgid "Week {weekNumber}"
msgstr "Tydzień {weekNumber}"
+msgid "Week {weekNumber} ({formattedDate})"
+msgstr "Tydzień {weekNumber} ({formattedDate})"
+
msgid "Week 8 cutover"
msgstr "Przejście w tygodniu 8"
@@ -27135,6 +27176,15 @@ msgstr "Tygodnie 5 do 7"
msgid "Weeks 7 to 8"
msgstr "Tygodnie 7 do 8"
+msgid "Weeks are counted from today: Present Week, Week 2, Week 3."
+msgstr "Tygodnie są liczone od dziś: Bieżący tydzień, Tydzień 2, Tydzień 3."
+
+msgid "Weeks are numbered by calendar week"
+msgstr "Tygodnie są numerowane według tygodnia kalendarzowego"
+
+msgid "Weeks are numbered from the present week"
+msgstr "Tygodnie są numerowane od bieżącego tygodnia"
+
msgid "Weeks Open"
msgstr "Tygodnie otwarte"
diff --git a/packages/locale/locales/pl/mes.po b/packages/locale/locales/pl/mes.po
index 413dd42288..0c8893cebf 100644
--- a/packages/locale/locales/pl/mes.po
+++ b/packages/locale/locales/pl/mes.po
@@ -1762,6 +1762,9 @@ msgstr "Skanuj lub wyszukaj numer seryjny..."
msgid "Scan or select a tracked entity from this lot to add it as a sample column, then record its result in the grid."
msgstr "Skanuj lub wybierz jednostkę śledzoną z tej partii, aby dodać ją jako kolumnę próby, a następnie zapisz jej wynik w siatce."
+msgid "Scan or select the unit, then scan the kanban card again"
+msgstr "Zeskanuj lub wybierz jednostkę, a następnie ponownie zeskanuj kartę kanban"
+
msgid "Scan received"
msgstr "Skan odebrany"
diff --git a/packages/locale/locales/pt/erp.po b/packages/locale/locales/pt/erp.po
index a43d115220..eb830e2a99 100644
--- a/packages/locale/locales/pt/erp.po
+++ b/packages/locale/locales/pt/erp.po
@@ -661,6 +661,10 @@ msgstr ""
msgid "{excluded, plural, one {# row excluded} other {# rows excluded}}"
msgstr "{excluded, plural, one {# linha excluída} other {# linhas excluídas}}"
+#. placeholder {0}: printIds.length
+msgid "{failed} of {0} print jobs failed"
+msgstr "{failed} de {0} trabalhos de impressão falharam"
+
msgid "{hidden, plural, one {And # more record.} other {And # more records.}}"
msgstr "{hidden, plural, one {E # mais registro.} other {E # mais registros.}}"
@@ -1036,6 +1040,9 @@ msgstr "2h"
msgid "3 years"
msgstr "3 anos"
+msgid "3\" x 2\" label"
+msgstr "Etiqueta de 3\" x 2\""
+
msgid "30D"
msgstr "30 dias"
@@ -1048,6 +1055,9 @@ msgstr "3h"
msgid "4 years"
msgstr "4 anos"
+msgid "4\" x 2\" label"
+msgstr "Etiqueta de 4\" x 2\""
+
msgid "4h"
msgstr "4h"
@@ -1090,6 +1100,9 @@ msgstr "Um modelo 3D que o operador pode girar"
msgid "A 4-digit PIN is generated when the operator is created."
msgstr "Um PIN de 4 dígitos é gerado quando o operador é criado."
+msgid "A 4\" x 2\" or 3\" x 2\" label prints one card per label, for a thermal printer such as a Zebra."
+msgstr "Uma etiqueta de 4\" x 2\" ou 3\" x 2\" imprime um cartão por etiqueta, para uma impressora térmica como a Zebra."
+
msgid "A batch needs at least one operation. To break up the whole batch, use Dissolve instead."
msgstr "Um lote de produção precisa de pelo menos uma operação. Para dividir o lote de produção inteiro, use Dissolver em vez disso."
@@ -4692,6 +4705,9 @@ msgstr "Método de Cálculo"
msgid "Calendar"
msgstr "Calendário"
+msgid "Calendar Weeks"
+msgstr "Semanas do calendário"
+
msgid "Calibration"
msgstr "Calibração"
@@ -8873,6 +8889,9 @@ msgstr "As operações terceirizadas de cada fornecedor de todas as ordens de pr
msgid "Each unit's fair value and economic life decide whether the term covers most of it. Click a cell to change it."
msgstr "O valor justo de cada unidade e sua vida econômica decidem se o termo cobre a maior parte dela. Clique em uma célula para alterá-la."
+msgid "Each week is headed with its ISO 8601 week of the year: Week 44, Week 45, Week 46."
+msgstr "Cada semana é identificada pela sua semana do ano ISO 8601: Semana 44, Semana 45, Semana 46."
+
msgid "Each, lb, ft…"
msgstr "Cada, lb, ft…"
@@ -11696,6 +11715,9 @@ msgstr "Como o tamanho da amostra é decidido — Inspecionar Tudo, Inspecionar
msgid "How the unit price of each quantity was calculated."
msgstr "Como o preço unitário de cada quantidade foi calculado."
+msgid "How the weekly columns of Material Planning, Production Planning and Demand Forecasts are numbered."
+msgstr "Como as colunas semanais de Planejamento de Materiais, Planejamento de Produção e Previsões de Demanda são numeradas."
+
msgid "How the whole build is turned on a step, such as flipped to fit parts on its underside. Later steps of the same build keep it until a step turns the build again."
msgstr "Como o conjunto inteiro fica posicionado em uma etapa, por exemplo virado para encaixar peças na parte de baixo. As etapas seguintes do mesmo conjunto mantêm essa posição até que uma etapa gire o conjunto novamente."
@@ -12857,6 +12879,9 @@ msgstr "Kanban"
msgid "Kanban for {kanbanName}"
msgstr "Kanban para {kanbanName}"
+msgid "Kanban ID"
+msgstr "ID do Kanban"
+
msgid "Kanban Output"
msgstr "Saída Kanban"
@@ -12929,6 +12954,9 @@ msgstr "Kit"
msgid "Label"
msgstr "Rótulo"
+msgid "Label Size"
+msgstr "Tamanho da etiqueta"
+
msgid "Label to complete the current operation for this kanban"
msgstr "Etiqueta para concluir a operação atual para este kanban"
@@ -13244,6 +13272,9 @@ msgstr "Vamos configurar sua conta"
msgid "Letter"
msgstr "Letra"
+msgid "Letter, 6 per page"
+msgstr "Carta, 6 por página"
+
msgid "Liability"
msgstr "Passivo"
@@ -16175,6 +16206,12 @@ msgstr "Número de tarefas abertas"
msgid "Number of operations"
msgstr "Número de operações"
+msgid "Number weeks by calendar week"
+msgstr "Numerar as semanas pela semana do calendário"
+
+msgid "Number weeks from the present week"
+msgstr "Numerar as semanas a partir da semana atual"
+
msgid "Numbering sequence"
msgstr "Sequência de numeração"
@@ -18004,6 +18041,7 @@ msgstr "Principal Coletado"
msgid "Print"
msgstr "Imprimir"
+#. placeholder {0}: printIds.length
#. placeholder {0}: selectedIds.size
msgid "Print {0} Labels"
msgstr "Imprimir {0} Etiquetas"
@@ -18711,6 +18749,10 @@ msgstr "Perguntas"
msgid "Queued"
msgstr "Na fila"
+#. placeholder {0}: printIds.length
+msgid "Queued {0} labels for printing"
+msgstr "{0} etiquetas na fila de impressão"
+
msgid "Queued {count} sync operations for sync"
msgstr ""
@@ -27092,13 +27134,12 @@ msgstr "Semana"
msgid "Week {0}"
msgstr "Semana {0}"
-#. placeholder {0}: i + 1
-msgid "Week {0} ({formattedDate})"
-msgstr "Semana {0} ({formattedDate})"
-
msgid "Week {weekNumber}"
msgstr "Semana {weekNumber}"
+msgid "Week {weekNumber} ({formattedDate})"
+msgstr "Semana {weekNumber} ({formattedDate})"
+
msgid "Week 8 cutover"
msgstr "Semana 8 cutover"
@@ -27135,6 +27176,15 @@ msgstr "Semanas 5 a 7"
msgid "Weeks 7 to 8"
msgstr "Semanas 7 a 8"
+msgid "Weeks are counted from today: Present Week, Week 2, Week 3."
+msgstr "As semanas são contadas a partir de hoje: Semana atual, Semana 2, Semana 3."
+
+msgid "Weeks are numbered by calendar week"
+msgstr "As semanas são numeradas pela semana do calendário"
+
+msgid "Weeks are numbered from the present week"
+msgstr "As semanas são numeradas a partir da semana atual"
+
msgid "Weeks Open"
msgstr "Semanas Abertas"
diff --git a/packages/locale/locales/pt/mes.po b/packages/locale/locales/pt/mes.po
index b4d5d828d2..10f34afcb9 100644
--- a/packages/locale/locales/pt/mes.po
+++ b/packages/locale/locales/pt/mes.po
@@ -1762,6 +1762,9 @@ msgstr "Escanear ou pesquisar número de série..."
msgid "Scan or select a tracked entity from this lot to add it as a sample column, then record its result in the grid."
msgstr "Escanear ou selecionar uma entidade rastreada deste lote para adicioná-la como coluna de amostra, depois registrar seu resultado na grade."
+msgid "Scan or select the unit, then scan the kanban card again"
+msgstr "Escaneie ou selecione a unidade e depois escaneie o cartão kanban novamente"
+
msgid "Scan received"
msgstr "Escaneamento recebido"
diff --git a/packages/locale/locales/ru/erp.po b/packages/locale/locales/ru/erp.po
index 400749ec1a..ef82012298 100644
--- a/packages/locale/locales/ru/erp.po
+++ b/packages/locale/locales/ru/erp.po
@@ -661,6 +661,10 @@ msgstr ""
msgid "{excluded, plural, one {# row excluded} other {# rows excluded}}"
msgstr "{excluded, plural, one {# строка исключена} other {# строк исключено}}"
+#. placeholder {0}: printIds.length
+msgid "{failed} of {0} print jobs failed"
+msgstr "Не удалось выполнить {failed} из {0} заданий печати"
+
msgid "{hidden, plural, one {And # more record.} other {And # more records.}}"
msgstr "{hidden, plural, one {Еще # запись.} other {Еще # записей.}}"
@@ -1036,6 +1040,9 @@ msgstr "2ч"
msgid "3 years"
msgstr "3 года"
+msgid "3\" x 2\" label"
+msgstr "Этикетка 3\" x 2\""
+
msgid "30D"
msgstr "30 дней"
@@ -1048,6 +1055,9 @@ msgstr "3ч"
msgid "4 years"
msgstr "4 года"
+msgid "4\" x 2\" label"
+msgstr "Этикетка 4\" x 2\""
+
msgid "4h"
msgstr "4ч"
@@ -1090,6 +1100,9 @@ msgstr "3D-модель, которую оператор может вращат
msgid "A 4-digit PIN is generated when the operator is created."
msgstr "4-значный PIN создается при создании оператора."
+msgid "A 4\" x 2\" or 3\" x 2\" label prints one card per label, for a thermal printer such as a Zebra."
+msgstr "Этикетка 4\" x 2\" или 3\" x 2\" печатает одну карточку на этикетку, для термопринтера, например Zebra."
+
msgid "A batch needs at least one operation. To break up the whole batch, use Dissolve instead."
msgstr "Серия должна содержать по крайней мере одну операцию. Чтобы разделить всю серию, используйте вместо этого «Растворить»."
@@ -4692,6 +4705,9 @@ msgstr "Метод расчета"
msgid "Calendar"
msgstr "Календарь"
+msgid "Calendar Weeks"
+msgstr "Календарные недели"
+
msgid "Calibration"
msgstr "Калибровка"
@@ -8873,6 +8889,9 @@ msgstr "Внешние операции каждого поставщика из
msgid "Each unit's fair value and economic life decide whether the term covers most of it. Click a cell to change it."
msgstr "Справедливая стоимость и экономический срок службы каждой единицы определяют, покрывает ли срок большую часть ее. Нажмите на ячейку, чтобы изменить ее."
+msgid "Each week is headed with its ISO 8601 week of the year: Week 44, Week 45, Week 46."
+msgstr "Каждая неделя подписывается номером недели года по ISO 8601: Неделя 44, Неделя 45, Неделя 46."
+
msgid "Each, lb, ft…"
msgstr "Каждый, фунт, фут…"
@@ -11696,6 +11715,9 @@ msgstr "Как определяется объем выборки — прове
msgid "How the unit price of each quantity was calculated."
msgstr "Как была рассчитана цена за единицу для каждого количества."
+msgid "How the weekly columns of Material Planning, Production Planning and Demand Forecasts are numbered."
+msgstr "Как нумеруются недельные столбцы в Планировании материалов, Планировании производства и Прогнозах потребностей."
+
msgid "How the whole build is turned on a step, such as flipped to fit parts on its underside. Later steps of the same build keep it until a step turns the build again."
msgstr "Как вся сборка повернута на шаге, например перевернута, чтобы установить детали на её нижней стороне. Следующие шаги этой сборки сохраняют положение, пока какой-либо шаг снова не повернёт сборку."
@@ -12857,6 +12879,9 @@ msgstr "Канбан"
msgid "Kanban for {kanbanName}"
msgstr "Канбан для {kanbanName}"
+msgid "Kanban ID"
+msgstr "ID канбана"
+
msgid "Kanban Output"
msgstr "Выпуск Канбана"
@@ -12929,6 +12954,9 @@ msgstr "Комплект"
msgid "Label"
msgstr "Метка"
+msgid "Label Size"
+msgstr "Размер этикетки"
+
msgid "Label to complete the current operation for this kanban"
msgstr "Этикетка для завершения текущей операции для этого канбана"
@@ -13244,6 +13272,9 @@ msgstr "Давайте настроим вашу учетную запись"
msgid "Letter"
msgstr "Буква"
+msgid "Letter, 6 per page"
+msgstr "Letter, 6 на страницу"
+
msgid "Liability"
msgstr "Обязательство"
@@ -16175,6 +16206,12 @@ msgstr "Количество открытых задач"
msgid "Number of operations"
msgstr "Количество операций"
+msgid "Number weeks by calendar week"
+msgstr "Нумеровать недели по календарной неделе"
+
+msgid "Number weeks from the present week"
+msgstr "Нумеровать недели от текущей недели"
+
msgid "Numbering sequence"
msgstr "Нумерационная последовательность"
@@ -18004,6 +18041,7 @@ msgstr "Собрана основная сумма"
msgid "Print"
msgstr "Печать"
+#. placeholder {0}: printIds.length
#. placeholder {0}: selectedIds.size
msgid "Print {0} Labels"
msgstr "Печать {0} этикеток"
@@ -18711,6 +18749,10 @@ msgstr "Вопросы"
msgid "Queued"
msgstr "В очереди"
+#. placeholder {0}: printIds.length
+msgid "Queued {0} labels for printing"
+msgstr "{0} этикеток поставлено в очередь печати"
+
msgid "Queued {count} sync operations for sync"
msgstr ""
@@ -27092,13 +27134,12 @@ msgstr "Неделя"
msgid "Week {0}"
msgstr "Неделя {0}"
-#. placeholder {0}: i + 1
-msgid "Week {0} ({formattedDate})"
-msgstr "Неделя {0} ({formattedDate})"
-
msgid "Week {weekNumber}"
msgstr "Неделя {weekNumber}"
+msgid "Week {weekNumber} ({formattedDate})"
+msgstr "Неделя {weekNumber} ({formattedDate})"
+
msgid "Week 8 cutover"
msgstr "Неделя 8 переход"
@@ -27135,6 +27176,15 @@ msgstr "Недели 5–7"
msgid "Weeks 7 to 8"
msgstr "Недели 7–8"
+msgid "Weeks are counted from today: Present Week, Week 2, Week 3."
+msgstr "Недели отсчитываются от сегодняшнего дня: Текущая неделя, Неделя 2, Неделя 3."
+
+msgid "Weeks are numbered by calendar week"
+msgstr "Недели нумеруются по календарной неделе"
+
+msgid "Weeks are numbered from the present week"
+msgstr "Недели нумеруются от текущей недели"
+
msgid "Weeks Open"
msgstr "Недель открыто"
diff --git a/packages/locale/locales/ru/mes.po b/packages/locale/locales/ru/mes.po
index 86b999381b..901f31b1cc 100644
--- a/packages/locale/locales/ru/mes.po
+++ b/packages/locale/locales/ru/mes.po
@@ -1762,6 +1762,9 @@ msgstr "Сканировать или найти серийный номер..."
msgid "Scan or select a tracked entity from this lot to add it as a sample column, then record its result in the grid."
msgstr "Сканировать или выбрать отслеживаемый объект из этой партии, чтобы добавить его как столбец образца, затем записать его результат в таблицу."
+msgid "Scan or select the unit, then scan the kanban card again"
+msgstr "Отсканируйте или выберите единицу, затем снова отсканируйте карточку канбана"
+
msgid "Scan received"
msgstr "Скан получен"
diff --git a/packages/locale/locales/tr/erp.po b/packages/locale/locales/tr/erp.po
index 0a5cd9c449..e90db8fa78 100644
--- a/packages/locale/locales/tr/erp.po
+++ b/packages/locale/locales/tr/erp.po
@@ -661,6 +661,10 @@ msgstr ""
msgid "{excluded, plural, one {# row excluded} other {# rows excluded}}"
msgstr "{excluded, plural, one {# satır hariç tutuldu} other {# satır hariç tutuldu}}"
+#. placeholder {0}: printIds.length
+msgid "{failed} of {0} print jobs failed"
+msgstr "{0} yazdırma işinden {failed} tanesi başarısız oldu"
+
msgid "{hidden, plural, one {And # more record.} other {And # more records.}}"
msgstr "{hidden, plural, one {Ve # daha fazla kayıt.} other {Ve # daha fazla kayıt.}}"
@@ -1036,6 +1040,9 @@ msgstr "2s"
msgid "3 years"
msgstr "3 yıl"
+msgid "3\" x 2\" label"
+msgstr "3\" x 2\" etiket"
+
msgid "30D"
msgstr "30G"
@@ -1048,6 +1055,9 @@ msgstr "3s"
msgid "4 years"
msgstr "4 yıl"
+msgid "4\" x 2\" label"
+msgstr "4\" x 2\" etiket"
+
msgid "4h"
msgstr "4s"
@@ -1090,6 +1100,9 @@ msgstr "Operatörün döndürebileceği 3D model"
msgid "A 4-digit PIN is generated when the operator is created."
msgstr "Operatör oluşturulduğunda bir 4 haneli PIN oluşturulur."
+msgid "A 4\" x 2\" or 3\" x 2\" label prints one card per label, for a thermal printer such as a Zebra."
+msgstr "4\" x 2\" veya 3\" x 2\" etiket, Zebra gibi bir termal yazıcı için etiket başına bir kart yazdırır."
+
msgid "A batch needs at least one operation. To break up the whole batch, use Dissolve instead."
msgstr "Bir parti en az bir operasyon gerektirir. Bütün partiyi ayırmak için bunun yerine Çöz'ü kullanın."
@@ -4692,6 +4705,9 @@ msgstr "Hesaplama Yöntemi"
msgid "Calendar"
msgstr "Takvim"
+msgid "Calendar Weeks"
+msgstr "Takvim Haftaları"
+
msgid "Calibration"
msgstr "Kalibrasyon"
@@ -8873,6 +8889,9 @@ msgstr "Her tedarikçinin her iş emrinden dış operasyonları yeni bir satın
msgid "Each unit's fair value and economic life decide whether the term covers most of it. Click a cell to change it."
msgstr "Her adetin adil değeri ve ekonomik ömrü, terimin çoğunluğunu kapsayıp kapsamadığını belirler. Değiştirmek için hücreyi tıklayın."
+msgid "Each week is headed with its ISO 8601 week of the year: Week 44, Week 45, Week 46."
+msgstr "Her hafta, yılın ISO 8601 haftasıyla başlıklandırılır: Hafta 44, Hafta 45, Hafta 46."
+
msgid "Each, lb, ft…"
msgstr "Her, lb, ft…"
@@ -11696,6 +11715,9 @@ msgstr "Örneklem büyüklüğünün nasıl belirlendiği — Tümünü İncele,
msgid "How the unit price of each quantity was calculated."
msgstr "Her miktarın birim fiyatı nasıl hesaplandığı."
+msgid "How the weekly columns of Material Planning, Production Planning and Demand Forecasts are numbered."
+msgstr "Malzeme Planlama, Üretim Planlama ve Talep Tahminleri'ndeki haftalık sütunların nasıl numaralandırılacağı."
+
msgid "How the whole build is turned on a step, such as flipped to fit parts on its underside. Later steps of the same build keep it until a step turns the build again."
msgstr "Bir adımda tüm montajın nasıl çevrildiği; örneğin alt yüzeyine parça takmak için ters çevrilmesi. Aynı montajın sonraki adımları, bir adım montajı yeniden çevirene kadar bu konumu korur."
@@ -12857,6 +12879,9 @@ msgstr "Kanban"
msgid "Kanban for {kanbanName}"
msgstr "Kanban için {kanbanName}"
+msgid "Kanban ID"
+msgstr "Kanban Kimliği"
+
msgid "Kanban Output"
msgstr "Kanban Çıktısı"
@@ -12929,6 +12954,9 @@ msgstr "Set"
msgid "Label"
msgstr "Etiket"
+msgid "Label Size"
+msgstr "Etiket Boyutu"
+
msgid "Label to complete the current operation for this kanban"
msgstr "Bu kanban için mevcut işlemi tamamlamak üzere etiket"
@@ -13244,6 +13272,9 @@ msgstr "Hesabınızı kuralım"
msgid "Letter"
msgstr "Harf"
+msgid "Letter, 6 per page"
+msgstr "Letter, sayfa başına 6"
+
msgid "Liability"
msgstr "Yükümlülük"
@@ -16175,6 +16206,12 @@ msgstr "Açık görev sayısı"
msgid "Number of operations"
msgstr "Operasyon sayısı"
+msgid "Number weeks by calendar week"
+msgstr "Haftaları takvim haftasına göre numaralandır"
+
+msgid "Number weeks from the present week"
+msgstr "Haftaları mevcut haftadan itibaren numaralandır"
+
msgid "Numbering sequence"
msgstr "Numaralandırma Sırası"
@@ -18004,6 +18041,7 @@ msgstr "Toplanan Anapara"
msgid "Print"
msgstr "Yazdır"
+#. placeholder {0}: printIds.length
#. placeholder {0}: selectedIds.size
msgid "Print {0} Labels"
msgstr "{0} Etiket Yazdır"
@@ -18711,6 +18749,10 @@ msgstr "Sorular"
msgid "Queued"
msgstr "Kuyrukta"
+#. placeholder {0}: printIds.length
+msgid "Queued {0} labels for printing"
+msgstr "{0} etiket yazdırma kuyruğuna eklendi"
+
msgid "Queued {count} sync operations for sync"
msgstr ""
@@ -27092,13 +27134,12 @@ msgstr "Hafta"
msgid "Week {0}"
msgstr "Hafta {0}"
-#. placeholder {0}: i + 1
-msgid "Week {0} ({formattedDate})"
-msgstr "Hafta {0} ({formattedDate})"
-
msgid "Week {weekNumber}"
msgstr "Hafta {weekNumber}"
+msgid "Week {weekNumber} ({formattedDate})"
+msgstr "Hafta {weekNumber} ({formattedDate})"
+
msgid "Week 8 cutover"
msgstr "8. Hafta geçişi"
@@ -27135,6 +27176,15 @@ msgstr "5. ile 7. Haftalar"
msgid "Weeks 7 to 8"
msgstr "Haftalar 7 ila 8"
+msgid "Weeks are counted from today: Present Week, Week 2, Week 3."
+msgstr "Haftalar bugünden itibaren sayılır: Mevcut Hafta, Hafta 2, Hafta 3."
+
+msgid "Weeks are numbered by calendar week"
+msgstr "Haftalar takvim haftasına göre numaralandırılır"
+
+msgid "Weeks are numbered from the present week"
+msgstr "Haftalar mevcut haftadan itibaren numaralandırılır"
+
msgid "Weeks Open"
msgstr "Açık Haftalar"
diff --git a/packages/locale/locales/tr/mes.po b/packages/locale/locales/tr/mes.po
index 6d07064fd7..1df1658ee4 100644
--- a/packages/locale/locales/tr/mes.po
+++ b/packages/locale/locales/tr/mes.po
@@ -1762,6 +1762,9 @@ msgstr "Seri numaras tarayın veya arayın..."
msgid "Scan or select a tracked entity from this lot to add it as a sample column, then record its result in the grid."
msgstr "Bu lottan izlenen bir varlığı tarayın veya seçin, onu bir örnek sütunu olarak ekleyin ve sonucunu ızgarada kaydedin."
+msgid "Scan or select the unit, then scan the kanban card again"
+msgstr "Birimi tarayın veya seçin, ardından kanban kartını yeniden tarayın"
+
msgid "Scan received"
msgstr "Tarama alındı"
diff --git a/packages/locale/locales/zh/erp.po b/packages/locale/locales/zh/erp.po
index 83102db1df..b1d1ca6d4f 100644
--- a/packages/locale/locales/zh/erp.po
+++ b/packages/locale/locales/zh/erp.po
@@ -661,6 +661,10 @@ msgstr ""
msgid "{excluded, plural, one {# row excluded} other {# rows excluded}}"
msgstr "{excluded, plural, one {# 行已排除} other {# 行已排除}}"
+#. placeholder {0}: printIds.length
+msgid "{failed} of {0} print jobs failed"
+msgstr "{0} 个打印任务中有 {failed} 个失败"
+
msgid "{hidden, plural, one {And # more record.} other {And # more records.}}"
msgstr "{hidden, plural, one {还有 # 条记录。} other {还有 # 条记录。}}"
@@ -1036,6 +1040,9 @@ msgstr "2小时"
msgid "3 years"
msgstr "3 年"
+msgid "3\" x 2\" label"
+msgstr "3\" x 2\" 标签"
+
msgid "30D"
msgstr "30天"
@@ -1048,6 +1055,9 @@ msgstr "3小时"
msgid "4 years"
msgstr "4 年"
+msgid "4\" x 2\" label"
+msgstr "4\" x 2\" 标签"
+
msgid "4h"
msgstr "4小时"
@@ -1090,6 +1100,9 @@ msgstr "操作员可以旋转查看的 3D 模型"
msgid "A 4-digit PIN is generated when the operator is created."
msgstr "创建操作员时会生成4位数PIN。"
+msgid "A 4\" x 2\" or 3\" x 2\" label prints one card per label, for a thermal printer such as a Zebra."
+msgstr "4\" x 2\" 或 3\" x 2\" 标签每张打印一张卡片,适用于 Zebra 等热敏打印机。"
+
msgid "A batch needs at least one operation. To break up the whole batch, use Dissolve instead."
msgstr "生产批次需要至少一个工序。要分解整个生产批次,请改用\"分解\"。"
@@ -4692,6 +4705,9 @@ msgstr "计算方法"
msgid "Calendar"
msgstr "日历"
+msgid "Calendar Weeks"
+msgstr "日历周"
+
msgid "Calibration"
msgstr "校准"
@@ -8873,6 +8889,9 @@ msgstr "每个供应商的外协工序从每个工单转至一份新采购订单
msgid "Each unit's fair value and economic life decide whether the term covers most of it. Click a cell to change it."
msgstr "每件的公允价值和经济生命周期决定该条款是否涵盖大部分。点击单元格进行更改。"
+msgid "Each week is headed with its ISO 8601 week of the year: Week 44, Week 45, Week 46."
+msgstr "每周以其 ISO 8601 年度周数作为标题:第 44 周、第 45 周、第 46 周。"
+
msgid "Each, lb, ft…"
msgstr "每个、磅、英尺…"
@@ -11696,6 +11715,9 @@ msgstr "样本量如何确定——检验全部、检验前N个、批次百分
msgid "How the unit price of each quantity was calculated."
msgstr "每个数量的单价是如何计算的。"
+msgid "How the weekly columns of Material Planning, Production Planning and Demand Forecasts are numbered."
+msgstr "物料规划、生产规划和需求预测中每周列的编号方式。"
+
msgid "How the whole build is turned on a step, such as flipped to fit parts on its underside. Later steps of the same build keep it until a step turns the build again."
msgstr "在某一步骤中整个组件的转动方式,例如翻面以便将零件装在其底面。同一组件的后续步骤会保持该方向,直到某一步骤再次转动组件。"
@@ -12857,6 +12879,9 @@ msgstr "看板"
msgid "Kanban for {kanbanName}"
msgstr "看板 {kanbanName}"
+msgid "Kanban ID"
+msgstr "看板ID"
+
msgid "Kanban Output"
msgstr "看板输出"
@@ -12929,6 +12954,9 @@ msgstr "套件"
msgid "Label"
msgstr "标签"
+msgid "Label Size"
+msgstr "标签尺寸"
+
msgid "Label to complete the current operation for this kanban"
msgstr "用于完成此看板当前操作的标签"
@@ -13244,6 +13272,9 @@ msgstr "让我们设置您的账户"
msgid "Letter"
msgstr "字母"
+msgid "Letter, 6 per page"
+msgstr "Letter,每页 6 张"
+
msgid "Liability"
msgstr "负债"
@@ -16175,6 +16206,12 @@ msgstr "未结任务数"
msgid "Number of operations"
msgstr "工序数量"
+msgid "Number weeks by calendar week"
+msgstr "按日历周为周编号"
+
+msgid "Number weeks from the present week"
+msgstr "从本周开始为周编号"
+
msgid "Numbering sequence"
msgstr "编号规则"
@@ -18004,6 +18041,7 @@ msgstr "已收本金"
msgid "Print"
msgstr "打印"
+#. placeholder {0}: printIds.length
#. placeholder {0}: selectedIds.size
msgid "Print {0} Labels"
msgstr "打印 {0} 个标签"
@@ -18711,6 +18749,10 @@ msgstr "问题"
msgid "Queued"
msgstr "排队中"
+#. placeholder {0}: printIds.length
+msgid "Queued {0} labels for printing"
+msgstr "已将 {0} 个标签加入打印队列"
+
msgid "Queued {count} sync operations for sync"
msgstr ""
@@ -27092,13 +27134,12 @@ msgstr "周"
msgid "Week {0}"
msgstr "第{0}周"
-#. placeholder {0}: i + 1
-msgid "Week {0} ({formattedDate})"
-msgstr "第 {0} 周 ({formattedDate})"
-
msgid "Week {weekNumber}"
msgstr "第 {weekNumber} 周"
+msgid "Week {weekNumber} ({formattedDate})"
+msgstr "第 {weekNumber} 周 ({formattedDate})"
+
msgid "Week 8 cutover"
msgstr "第8周切换"
@@ -27135,6 +27176,15 @@ msgstr "第5至7周"
msgid "Weeks 7 to 8"
msgstr "第7至8周"
+msgid "Weeks are counted from today: Present Week, Week 2, Week 3."
+msgstr "周从今天开始计数:本周、第 2 周、第 3 周。"
+
+msgid "Weeks are numbered by calendar week"
+msgstr "周按日历周编号"
+
+msgid "Weeks are numbered from the present week"
+msgstr "周从本周开始编号"
+
msgid "Weeks Open"
msgstr "未结周数"
diff --git a/packages/locale/locales/zh/mes.po b/packages/locale/locales/zh/mes.po
index 1f5a3c5123..343413cda5 100644
--- a/packages/locale/locales/zh/mes.po
+++ b/packages/locale/locales/zh/mes.po
@@ -1762,6 +1762,9 @@ msgstr "扫码或搜索序列号..."
msgid "Scan or select a tracked entity from this lot to add it as a sample column, then record its result in the grid."
msgstr "从此批次中扫码或选择追踪实体并将其添加为样本列,然后在网格中记录其结果。"
+msgid "Scan or select the unit, then scan the kanban card again"
+msgstr "请扫描或选择该单元,然后再次扫描看板卡"
+
msgid "Scan received"
msgstr "已收到扫码"
diff --git a/packages/printing/src/registry.ts b/packages/printing/src/registry.ts
index e46805e814..b7d5a4d8ab 100644
--- a/packages/printing/src/registry.ts
+++ b/packages/printing/src/registry.ts
@@ -32,7 +32,7 @@ export const documentTypeRegistry = [
id: "kanbanCard",
displayName: "Kanban Card",
sourceDocuments: ["Kanban"],
- builtInRenderer: "pdf" as const,
+ builtInRenderer: "zpl" as const,
defaultFormat: "pdf" as const,
description: "Replenishment cards for kanban bins"
},
diff --git a/packages/react/src/Editor/Editor.tsx b/packages/react/src/Editor/Editor.tsx
index f0a78ef83e..748293dbaa 100644
--- a/packages/react/src/Editor/Editor.tsx
+++ b/packages/react/src/Editor/Editor.tsx
@@ -325,7 +325,7 @@ const Editor = ({
}
slotAfter={<ImageResizer />}
>
- <EditorCommand className="z-50 h-auto max-h-[330px] overflow-y-auto rounded-md border border-muted bg-background px-1 py-2 shadow-md transition-[opacity,transform]">
+ <EditorCommand className="z-50 h-auto max-h-[330px] overflow-y-auto rounded-md border border-muted bg-card px-1 py-2 shadow-md transition-[opacity,transform]">
<EditorCommandEmpty className="px-2 text-muted-foreground">
No results
</EditorCommandEmpty>
@@ -337,7 +337,7 @@ const Editor = ({
className={`flex w-full items-center space-x-2 rounded-md px-2 py-1 text-left text-sm hover:bg-accent aria-selected:bg-accent `}
key={item.title}
>
- <div className="flex h-10 w-10 items-center justify-center rounded-md border border-muted bg-background">
+ <div className="flex h-10 w-10 items-center justify-center rounded-md border border-muted bg-card">
{item.icon}
</div>
<div>
diff --git a/packages/react/src/Editor/components/LinkSelector.tsx b/packages/react/src/Editor/components/LinkSelector.tsx
index ad1e356b7c..b31ed2643b 100644
--- a/packages/react/src/Editor/components/LinkSelector.tsx
+++ b/packages/react/src/Editor/components/LinkSelector.tsx
@@ -63,7 +63,7 @@ export const LinkSelector = ({ open, onOpenChange }: LinkSelectorProps) => {
ref={inputRef}
type="text"
placeholder="Paste a link"
- className="flex-1 bg-background p-1 text-sm outline-none"
+ className="flex-1 bg-transparent p-1 text-sm outline-none"
defaultValue={editor.getAttributes("link").href || ""}
/>
{editor.getAttributes("link").href ? (
diff --git a/packages/utils/src/labels.ts b/packages/utils/src/labels.ts
index 0eb0665364..282fbba612 100644
--- a/packages/utils/src/labels.ts
+++ b/packages/utils/src/labels.ts
@@ -64,6 +64,17 @@ export const labelSizes: LabelSize[] = [
height: 1
}
},
+ {
+ id: "label3x2",
+ name: "Label 3x2",
+ width: 3,
+ height: 2,
+ zpl: {
+ dpi: 203,
+ width: 3,
+ height: 2
+ }
+ },
{
id: "label4x2",
name: "Label 4x2",