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(production): number serials at job release, and let an item override the timing

Raul842d9dfd6546
diff --git a/apps/erp/app/modules/inventory/inventory.service.ts b/apps/erp/app/modules/inventory/inventory.service.ts
index e32d49c456..0cd34fa11b 100644
--- a/apps/erp/app/modules/inventory/inventory.service.ts
+++ b/apps/erp/app/modules/inventory/inventory.service.ts
@@ -23007,13 +23007,16 @@ export async function issueMaterial(
// sequence was configured later), so it would otherwise be created with
// a null readableId. Resolve the job's location for the %{location}
// token; the reservation runs in this transaction, atomic with the spawn.
- // Under serialNumberTiming = 'production' the spawned unit stays
- // unnumbered until it is first touched.
+ // Under the item's serialNumberTiming = 'production' the spawned
+ // unit stays unnumbered until it is first touched.
let spawnReadableId: string | null = null;
if (
trackedEntity.itemId &&
- (await sequence.getSerialNumberTiming(trx, companyId)) !==
- "production"
+ (await sequence.getSerialNumberTiming(
+ trx,
+ companyId,
+ trackedEntity.itemId
+ )) !== "production"
) {
let locationCode: string | null = null;
let locationName: string | null = null;
@@ -23366,8 +23369,11 @@ export async function issueMaterial(
let spawnReadableId: string | null = null;
if (
makeMethod.itemId &&
- (await sequence.getSerialNumberTiming(trx, companyId)) !==
- "production"
+ (await sequence.getSerialNumberTiming(
+ trx,
+ companyId,
+ makeMethod.itemId
+ )) !== "production"
) {
let locationCode: string | null = null;
let locationName: string | null = null;
@@ -24366,8 +24372,11 @@ export async function issueMaterial(
// Under serialNumberTiming = 'production' the replacement stays
// unnumbered until it is first touched.
const spawnSerials =
- (await sequence.getSerialNumberTiming(trx, companyId)) ===
- "production"
+ (await sequence.getSerialNumberTiming(
+ trx,
+ companyId,
+ subMakeMethod.itemId
+ )) === "production"
? []
: await sequence.getNextSerialNumbers(trx, {
itemId: subMakeMethod.itemId,
diff --git a/apps/erp/app/modules/production/AGENTS.md b/apps/erp/app/modules/production/AGENTS.md
index f354fba81d..52f772ff30 100644
--- a/apps/erp/app/modules/production/AGENTS.md
+++ b/apps/erp/app/modules/production/AGENTS.md
@@ -40,7 +40,7 @@ Work orders (jobs), scheduling, routings (operations), bill of materials, proced
- It **refuses** a quantity ≤ 0 or below what was already received (stocked items), and a fractional quantity on a serial job. Those raises reach the `jobOperation` UPDATE when they happen under the trigger — `sync_finish_job_operation` therefore clamps with `GREATEST(computed, received)` before calling.
- The serial branch receives the delta one numbered unit at a time — shop-floor-finished (`Available`) first, then by `readableId` — skipping `Consumed`/`Rejected`/`Scrapped` and any unit with a `Job Receipt` ledger row for this job, so re-completion never double-receives. An item with **no serial sequence** never reaches `assign-serial-numbers`, so its job keeps one whole-quantity seed entity and the delta is received against that seed instead.
- **Make to Asset branch.** A job with `fixedAssetClassId` completes into one new `fixedAsset` per unit (status `Active`, or `Under Construction` when the class `isConstructionInProgress`; `acquisitionCost` = swept WIP ÷ units; one Posted `fixedAssetTransfer` per asset, `type 'Capitalization'`, `sourceType 'Job'`); a job with `fixedAssetId` sweeps its WIP onto that Construction in Progress asset as one `fixedAssetCipCost` row + one transfer. The units never enter stock: no `itemLedger`, `costLedger`, `pickMethod` or `itemCost` write, and the WIP discharge posts Dr class `assetAccountId` / Cr WIP as an `'Asset Transfer'` journal (both lines still `documentId = jobId`, so the per-job WIP balance nets to zero). Each serial unit goes `Consumed` with `attributes["Fixed Asset"]` and a `'Capitalize'` `trackedActivity`; every company writes the asset cost (the journal is Provisional before the accounting cutover). Guards raise before anything moves: `'A job linked to a sales order line cannot complete to a fixed asset'`; `'A job that completes to a fixed asset class needs a serialized item'` (any quantity — every asset a class job makes is a fleet unit followed by its serial); `'Make to Asset needs a serialized item or a quantity of one'` (a job attached to an asset under construction); a job attached to a non-CIP asset is also refused (`'… is not in a Construction in Progress class'`). The item rule is `makeToAssetItemError` (`production.models.ts`), applied by `x+/job+/new.tsx` on save (a field error on the item), by `updateJobDetails` (the details form), by `setJobItem` on a property-panel item change and by `resumeJob` when a paused job goes back to `Ready`, with the sales order line gate. Covered by `packages/database/supabase/tests/job-completion-to-asset.test.sql`. Full flow: `.claude/rules/fixed-asset-lifecycle.md`.
-- **Serial number timing** (`companySettings.serialNumberTiming`, Settings → Production → Serial Numbers). `jobCreation` (default): `assignJobSerialNumbers` splits and numbers every unit when the job is created. `production`: it is skipped, the job keeps its unnumbered seed, and a unit draws its number at its first touch through `assignSerialNumberIfMissing` (`@carbon/database/sequence`): the MES start (`start.$operationId.tsx`, `x+/event.tsx`, via `services/serial-number.server.ts`), the `issue` posting's serial completion, batch output and operation scrap, and the completion that receives it. A unit the serial completion or a scrap spawns stays unnumbered under `production`. Both completion paths call the SQL `number_serial_units_for_completion` (`20261021103400_serial-number-timing-completion.sql`) before `complete_job_to_inventory`: `completeJob` (through `numberSerialUnitsForCompletion`) and the `sync_finish_job_operation` interceptor (an operation marked Done). It takes the units the RPC will take, in its receipt or Make to Asset order, splits what is missing off the seed and numbers every unit taken, so no unnumbered lump is received. The shop floor's first completion or scrap of the seed leaves it holding one unit (a serial scrap takes one unit, never the whole seed) and spawns the next units one at a time, so the rows can hold fewer units than the job quantity: the function creates the units no row holds yet, up to the job quantity less the units in rows (a scrapped unit does not count), and the Complete dialog counts them as receivable. Every serial is formatted by the SQL `get_next_serial_numbers`, which `getNextSerialNumbers` calls. The Complete dialog unlocks the quantity for such a job (`getSerialCompleteChoice`, mode `numberOnReceipt`) and says the serials are drawn at receipt; under `jobCreation` it stays locked to what the shop floor finished.
+- **Serial number timing** (`companySettings.serialNumberTiming`, Settings → Production → Serial Numbers; an item's serial sequence overrides it with `itemSerialSequence.serialNumberTiming`, NULL follows the company, edited in Settings → Serial Numbers). Every reader resolves the item's own value first: `getSerialNumberTiming(db, companyId, itemId)` (`@carbon/database/sequence`), the SQL `number_serial_units_for_completion`, and the Complete dialog. `jobCreation` (default): `assignJobSerialNumbers` splits and numbers every unit when the job is created. `jobRelease`: the same split and numbering runs when `releaseCheckedJobs` flips the job to Ready (`moment: "release"`), so every release path (Release dialog, bulk, batch, kanban) numbers it; a unit spawned later is numbered at spawn, as under `jobCreation`. `production`: it is skipped, the job keeps its unnumbered seed, and a unit draws its number at its first touch through `assignSerialNumberIfMissing` (`@carbon/database/sequence`): the MES start (`start.$operationId.tsx`, `x+/event.tsx`, via `services/serial-number.server.ts`), the `issue` posting's serial completion, batch output and operation scrap, and the completion that receives it. A unit the serial completion or a scrap spawns stays unnumbered under `production`. Under `jobRelease` and `production` both completion paths call the SQL `number_serial_units_for_completion` (`20261021103400_serial-number-timing-completion.sql`) before `complete_job_to_inventory`: `completeJob` (through `numberSerialUnitsForCompletion`) and the `sync_finish_job_operation` interceptor (an operation marked Done). It takes the units the RPC will take, in its receipt or Make to Asset order, splits what is missing off the seed and numbers every unit taken, so no unnumbered lump is received. The shop floor's first completion or scrap of the seed leaves it holding one unit (a serial scrap takes one unit, never the whole seed) and spawns the next units one at a time, so the rows can hold fewer units than the job quantity: the function creates the units no row holds yet, up to the job quantity less the units in rows (a scrapped unit does not count), and the Complete dialog counts them as receivable. Every serial is formatted by the SQL `get_next_serial_numbers`, which `getNextSerialNumbers` calls. The Complete dialog unlocks the quantity for such a job (`getSerialCompleteChoice`, mode `numberOnReceipt`, for either deferred timing) and says the serials are drawn at receipt; under `jobCreation` it stays locked to what the shop floor finished.
- Dialog logic lives in `ui/Jobs/job-complete-logic.ts` (pure, no JSX/lingui, unit-tested by `apps/erp/test/job-complete-logic.test.ts`); the SQL is covered by `packages/database/supabase/tests/job-completion-received-quantity.test.sql`, hand-run like its siblings (nothing in CI runs `supabase/tests/`).
### Loaded operation and unattributed machine time
diff --git a/apps/erp/app/modules/production/production.server.ts b/apps/erp/app/modules/production/production.server.ts
index 920becff96..bfebd68049 100644
--- a/apps/erp/app/modules/production/production.server.ts
+++ b/apps/erp/app/modules/production/production.server.ts
@@ -229,8 +229,9 @@ export const planDraftJob = defineServiceFn({
*
* @remarks
* The step every release path shares (`releaseJobs`, `releaseBatchMemberJobs`).
- * Per job, in order: refresh requirements, run MRP, flip to Ready, put outside
- * operations on purchase orders, stamp releasedDate. Scheduling is the
+ * Per job, in order: refresh requirements, run MRP, flip to Ready, number the
+ * serial units when the item's timing is `jobRelease`, put outside operations
+ * on purchase orders, stamp releasedDate. Scheduling is the
* caller's (one location run, or a notify, after all jobs are released).
* Validation (`getJobReleaseReadiness`) is the caller's, BEFORE this runs.
*
@@ -321,6 +322,28 @@ export const releaseCheckedJobs = defineServiceFn({
}
releasedJobIds.push(id);
+ // Under the jobRelease serial number timing (the item's, else the
+ // company's) every unit is numbered now. Best-effort, as at creation.
+ const releasedJob = await ctx.asSystem.pg
+ .selectFrom("job")
+ .select(["itemId"])
+ .where("id", "=", id)
+ .where("companyId", "=", companyId)
+ .executeTakeFirst();
+ if (releasedJob?.itemId) {
+ await service.assignJobSerialNumbers(
+ ctx.asSystem.supabase,
+ ctx.asSystem.pg,
+ {
+ jobId: id,
+ itemId: releasedJob.itemId,
+ companyId,
+ userId,
+ moment: "release"
+ }
+ );
+ }
+
const purchaseOrder = await invokeCreate(
{ db: ctx.asSystem.pg, companyId, userId },
{
@@ -864,9 +887,10 @@ export const closeJob = defineServiceFn({
* job's own), backflushes materials, rolls up cost and, for a Make to Asset
* job, creates the fixed assets. It refuses a quantity of zero or below what
* was received, a fractional quantity on a serial job, and the Make to Asset
- * rules; its message says what to fix (a `rule` error). When the company
- * numbers serials at production, the units the completion takes are split off
- * the job's seed and numbered first. Then the picked material the job did not
+ * rules; its message says what to fix (a `rule` error). When the item's serial
+ * number timing (its own, else the company's) is release or production, the
+ * units the completion takes are split off the job's seed, created when no
+ * record holds them yet, and numbered first. Then the picked material the job did not
* consume is returned to the warehouse; a failure there leaves the job
* completed and is returned as `warning`.
*
@@ -885,9 +909,10 @@ export const completeJob = defineServiceFn({
const companyId = ctx.company.id;
const userId = ctx.auditUserId;
- // Under serialNumberTiming = 'production' the units this completion takes
- // may be unnumbered, or still one unsplit seed: the receipt is their first
- // touch, so split and number them before the RPC receives them.
+ // Under the release or production serial number timing the units this
+ // completion takes may be unnumbered, or still one unsplit seed: the
+ // receipt is their first touch, so split and number them before the RPC
+ // receives them.
try {
await service.numberSerialUnitsForCompletion(ctx.asSystem.pg, {
jobId,
diff --git a/apps/erp/app/modules/production/production.service.ts b/apps/erp/app/modules/production/production.service.ts
index 00d5edd97b..8b762d3be6 100644
--- a/apps/erp/app/modules/production/production.service.ts
+++ b/apps/erp/app/modules/production/production.service.ts
@@ -3801,20 +3801,28 @@ export async function insertJob(
}
/**
- * Assign configured serial numbers to a freshly-created job's tracked entities.
- * Best-effort and cheap: it skips the operation entirely unless the item has
- * an `itemSerialSequence` configured. Shared by every job-creation path so serial
- * numbering is applied consistently (insertJob, sales-order conversion, ...).
+ * Assign configured serial numbers to a job's tracked entities, when the job is
+ * created or when it is released. Best-effort and cheap: it skips the operation
+ * entirely unless the item has an `itemSerialSequence` configured. Shared by
+ * every job-creation path (insertJob, sales-order conversion, ...) and by
+ * `releaseCheckedJobs`, so serial numbering is applied consistently.
*
- * Skipped when `companySettings.serialNumberTiming = 'production'`: the job's
- * units then stay unnumbered and each draws its number the first time it is
+ * Runs only at the moment the item's timing names (`getSerialNumberTiming`):
+ * `jobCreation` at creation, `jobRelease` at release. Under `production` the
+ * job's units stay unnumbered and each draws its number the first time it is
* touched (see `assignSerialNumberIfMissing` and
* `numberSerialUnitsForCompletion`).
*/
-async function assignJobSerialNumbers(
+export async function assignJobSerialNumbers(
client: SupabaseClient<Database>,
db: Kysely<KyselyDatabase>,
- args: { jobId: string; itemId: string; companyId: string; userId: string }
+ args: {
+ jobId: string;
+ itemId: string;
+ companyId: string;
+ userId: string;
+ moment?: "creation" | "release";
+ }
) {
const serialSequence = await client
.from("itemSerialSequence")
@@ -3833,7 +3841,11 @@ async function assignJobSerialNumbers(
return;
}
if (!serialSequence.data) return;
- if ((await getSerialNumberTiming(db, args.companyId)) === "production") {
+ const timing = await getSerialNumberTiming(db, args.companyId, args.itemId);
+ if (
+ timing !==
+ ((args.moment ?? "creation") === "creation" ? "jobCreation" : "jobRelease")
+ ) {
return;
}
const { error } = await invokePosting(
@@ -12735,7 +12747,8 @@ export async function assignSerialNumbers(
}
/**
- * Receipt as first touch (`companySettings.serialNumberTiming = 'production'`):
+ * Receipt as first touch (the item's serial number timing is `jobRelease` or
+ * `production`):
* before `complete_job_to_inventory` takes `quantityComplete` units of a serial
* job, split what it needs off the job's unsplit seed and number every unit it
* takes. Without this an untouched job would be received as one unnumbered
diff --git a/apps/erp/app/modules/production/ui/Jobs/JobHeader.tsx b/apps/erp/app/modules/production/ui/Jobs/JobHeader.tsx
index 8f026ba936..93c38309dc 100644
--- a/apps/erp/app/modules/production/ui/Jobs/JobHeader.tsx
+++ b/apps/erp/app/modules/production/ui/Jobs/JobHeader.tsx
@@ -88,6 +88,7 @@ import {
} from "~/hooks";
import { useCompanySettings } from "~/hooks/useCompanySettings";
import { usePullFromLocationIds } from "~/hooks/usePullFromLocationIds";
+import type { SerialNumberTiming } from "~/modules/settings/settings.models";
import type { action as cancelAction } from "~/routes/x+/job+/$jobId.cancel";
import type { action as completeAction } from "~/routes/x+/job+/$jobId.complete";
import type { action as statusAction } from "~/routes/x+/job+/$jobId.status";
@@ -1414,10 +1415,12 @@ function JobCompleteModal({
}) {
const { carbon } = useCarbon();
const { company } = useUser();
- const serialNumberTiming =
- useCompanySettings()?.serialNumberTiming === "production"
- ? "production"
- : "jobCreation";
+ // The company's serial number timing; an item's serial sequence can
+ // override it (read with the job's data below).
+ const companySerialNumberTiming =
+ (useCompanySettings()?.serialNumberTiming as
+ | SerialNumberTiming
+ | undefined) ?? "jobCreation";
const [loading, setLoading] = useState(true);
const { t } = useLingui();
const [defaultStorageUnitId, setDefaultStorageUnitId] = useState<
@@ -1434,7 +1437,7 @@ function JobCompleteModal({
const [receivableSerials, setReceivableSerials] = useState<string[] | null>(
null
);
- // Under serialNumberTiming = 'production': how many units the completion can
+ // Under the jobRelease or production timing: how many units the completion can
// still receive and number as it receives them. Null otherwise.
const [unitsNumberedOnReceipt, setUnitsNumberedOnReceipt] = useState<
number | null
@@ -1473,22 +1476,29 @@ function JobCompleteModal({
const getJobData = async () => {
if (!carbon) return;
- const [pickMethod, makeMethod, receipts] = await Promise.all([
- carbon
- .from("pickMethod")
- .select("*")
- .eq("locationId", job?.locationId!)
- .eq("itemId", job?.itemId!)
- .single(),
- carbon
- .from("jobMakeMethod")
- .select("*")
- .eq("jobId", job?.id!)
- .eq("companyId", company.id)
- .is("parentMaterialId", null)
- .single(),
- getJobReceipts(job?.id!)
- ]);
+ const [pickMethod, makeMethod, receipts, serialSequence] =
+ await Promise.all([
+ carbon
+ .from("pickMethod")
+ .select("*")
+ .eq("locationId", job?.locationId!)
+ .eq("itemId", job?.itemId!)
+ .single(),
+ carbon
+ .from("jobMakeMethod")
+ .select("*")
+ .eq("jobId", job?.id!)
+ .eq("companyId", company.id)
+ .is("parentMaterialId", null)
+ .single(),
+ getJobReceipts(job?.id!),
+ carbon
+ .from("itemSerialSequence")
+ .select("serialNumberTiming")
+ .eq("itemId", job?.itemId!)
+ .eq("companyId", company.id)
+ .maybeSingle()
+ ]);
// Read now rather than from the job route: a receipt may have been made
// since the page loaded. When the read fails, fall back to the route's job
@@ -1529,7 +1539,13 @@ function JobCompleteModal({
? getSerialCompleteChoice({
trackedEntities: trackedEntities.data,
receivedEntityIds: receipts ? receivedEntityIds : null,
- serialNumberTiming,
+ // The item's own timing, else the company's, as
+ // getSerialNumberTiming resolves it on the server.
+ serialNumberTiming:
+ (serialSequence.data?.serialNumberTiming as
+ | SerialNumberTiming
+ | null
+ | undefined) ?? companySerialNumberTiming,
jobQuantity: job?.quantity ?? 0
})
: ({ mode: "locked" } as const);
diff --git a/apps/erp/app/modules/production/ui/Jobs/job-complete-logic.ts b/apps/erp/app/modules/production/ui/Jobs/job-complete-logic.ts
index 2ec919f934..48e3f1272b 100644
--- a/apps/erp/app/modules/production/ui/Jobs/job-complete-logic.ts
+++ b/apps/erp/app/modules/production/ui/Jobs/job-complete-logic.ts
@@ -10,6 +10,8 @@
// works on the units the job has not received yet, so the dialog and the
// database always agree on which units a completion takes.
+import type { SerialNumberTiming } from "~/modules/settings/settings.models";
+
export type JobSerialUnit = {
id: string;
status: string;
@@ -82,11 +84,11 @@ export function getReceivableSerialUnits(
* How the Complete dialog lets the quantity be chosen for a serial job.
*
* - `serials`: every unit left to receive is a numbered single unit, so the
- * dialog lists the serials a completion takes (either timing).
- * - `numberOnReceipt`: the company numbers serials at production
- * (`serialNumberTiming = 'production'`) and some units are unnumbered, still
- * one unsplit seed, or held by no row yet. The completion numbers the units
- * it receives and creates the missing ones
+ * dialog lists the serials a completion takes (any timing).
+ * - `numberOnReceipt`: the item's serial number timing (its own, else the
+ * company's) is `jobRelease` or `production`, and some units are unnumbered,
+ * still one unsplit seed, or held by no row yet. The completion numbers the
+ * units it receives and creates the missing ones
* (`number_serial_units_for_completion`), so the quantity can be chosen up to
* `receivableCount` even though the serials cannot be named yet.
* - `locked`: the quantity stays what the shop floor finished — the default
@@ -106,32 +108,35 @@ export function getSerialCompleteChoice({
trackedEntities: JobSerialUnit[];
/** Null when the job's receipts could not be read. */
receivedEntityIds: ReadonlySet<string> | null;
- serialNumberTiming: "jobCreation" | "production";
+ serialNumberTiming: SerialNumberTiming;
jobQuantity: number;
}): SerialCompleteChoice {
// Without the receipts the dialog could offer a unit the job already
// received, whatever the timing.
if (!receivedEntityIds) return { mode: "locked" };
+ // Under the default timing every unit was numbered when the job was created;
+ // under the other two the completion numbers what it receives.
+ const numbersOnReceipt = serialNumberTiming !== "jobCreation";
+
// The shop floor's first completion or scrap of an unsplit seed leaves it
// holding one unit and spawns the rest one at a time, so the rows can hold
- // fewer units than the job quantity. Only a completion under the production
- // timing creates the missing units. A scrapped unit does not count: the job
+ // fewer units than the job quantity. Only a completion that numbers on
+ // receipt creates the missing units. A scrapped unit does not count: the job
// still owes it.
- const unitsWithoutRow =
- serialNumberTiming === "production"
- ? Math.max(
- jobQuantity -
- trackedEntities
- .filter((entity) => entity.status !== "Scrapped")
- .reduce((total, entity) => total + Number(entity.quantity), 0),
- 0
- )
- : 0;
+ const unitsWithoutRow = numbersOnReceipt
+ ? Math.max(
+ jobQuantity -
+ trackedEntities
+ .filter((entity) => entity.status !== "Scrapped")
+ .reduce((total, entity) => total + Number(entity.quantity), 0),
+ 0
+ )
+ : 0;
const serials = getReceivableSerialUnits(trackedEntities, receivedEntityIds);
if (serials && unitsWithoutRow === 0) return { mode: "serials", serials };
- if (serialNumberTiming !== "production") return { mode: "locked" };
+ if (!numbersOnReceipt) return { mode: "locked" };
const receivableCount =
trackedEntities
diff --git a/apps/erp/app/modules/settings/AGENTS.md b/apps/erp/app/modules/settings/AGENTS.md
index 75779cb4aa..89ae6d46d0 100644
--- a/apps/erp/app/modules/settings/AGENTS.md
+++ b/apps/erp/app/modules/settings/AGENTS.md
@@ -56,7 +56,7 @@ pnpm run lint
| `documentSection` | Company-global reusable header/body/footer rich text |
| `terms` | Company `salesTerms` / `purchasingTerms` JSON (PK = company id) |
| `sequence` | Readable-id numbering per table |
-| `itemSerialSequence` / `itemSerialSequences` (view) | Per-item serial-number numbering |
+| `itemSerialSequence` / `itemSerialSequences` (view) | Per-item serial-number numbering; `serialNumberTiming` overrides the company's serial number timing for the item (NULL follows it) |
| `customField` / `customFieldTables` (view) | User-defined fields, grouped per table |
| `companyIntegration` / `integrations` (view) | Per-company third-party config + metadata |
| `apiKey` | Hashed API keys with per-module scopes |
diff --git a/apps/erp/app/modules/settings/settings.models.ts b/apps/erp/app/modules/settings/settings.models.ts
index 0be70ea6dc..a1437082fa 100644
--- a/apps/erp/app/modules/settings/settings.models.ts
+++ b/apps/erp/app/modules/settings/settings.models.ts
@@ -399,9 +399,15 @@ export const returnPickedMaterialTimingValidator = z.object({
// When a produced unit's serial number is drawn from the item's serial sequence.
// 'jobCreation' (default) reserves one number per unit as soon as the job exists;
-// 'production' waits until the unit is first touched on the floor — its first
-// production event, its first operation completion, or its scrap.
-export const serialNumberTimings = ["jobCreation", "production"] as const;
+// 'jobRelease' when the job is released to the shop floor; 'production' waits
+// until the unit is first touched on the floor — its first production event,
+// its first operation completion, its scrap, or its receipt. The company's
+// choice is the default; an item's serial sequence can override it.
+export const serialNumberTimings = [
+ "jobCreation",
+ "jobRelease",
+ "production"
+] as const;
export type SerialNumberTiming = (typeof serialNumberTimings)[number];
export const serialNumberTimingValidator = z.object({
@@ -517,7 +523,9 @@ export const itemSerialSequenceValidator = z.object({
suffix: zfd.text(z.string().optional()),
next: zfd.numeric(z.number().min(0)),
step: zfd.numeric(z.number().min(1)),
- size: zfd.numeric(z.number().min(1).max(20))
+ size: zfd.numeric(z.number().min(1).max(20)),
+ // Empty follows the company's serial number timing.
+ serialNumberTiming: zfd.text(z.enum(serialNumberTimings).optional())
});
export const themes = [
diff --git a/apps/erp/app/modules/settings/settings.server.ts b/apps/erp/app/modules/settings/settings.server.ts
index c69027b0e4..124233e2e2 100644
--- a/apps/erp/app/modules/settings/settings.server.ts
+++ b/apps/erp/app/modules/settings/settings.server.ts
@@ -2798,6 +2798,13 @@ export const createItemSerialSequence = defineServiceFn({
next: z.number().min(0),
step: z.number().min(1),
size: z.number().min(1).max(20),
+ serialNumberTiming: z
+ .enum(serialNumberTimings)
+ .nullable()
+ .optional()
+ .describe(
+ "When this item's units draw their serial numbers. Omit or null to follow the company setting."
+ ),
id: z
.string()
.describe("Send to update that record; omit to create a new one.")
@@ -2832,6 +2839,13 @@ export const updateItemSerialSequence = defineServiceFn({
next: z.number().min(0),
step: z.number().min(1),
size: z.number().min(1).max(20),
+ serialNumberTiming: z
+ .enum(serialNumberTimings)
+ .nullable()
+ .optional()
+ .describe(
+ "When this item's units draw their serial numbers. Omit or null to follow the company setting."
+ ),
id: z
.string()
.describe("Send to update that record; omit to create a new one.")
diff --git a/apps/erp/app/modules/settings/ui/SerialNumbers/ItemSerialSequenceForm.tsx b/apps/erp/app/modules/settings/ui/SerialNumbers/ItemSerialSequenceForm.tsx
index cf0469a324..547041f11b 100644
--- a/apps/erp/app/modules/settings/ui/SerialNumbers/ItemSerialSequenceForm.tsx
+++ b/apps/erp/app/modules/settings/ui/SerialNumbers/ItemSerialSequenceForm.tsx
@@ -19,11 +19,20 @@ import {
import { Trans, useLingui } from "@lingui/react/macro";
import { useState } from "react";
import type { z } from "zod";
-import { Hidden, Input, Item, Number, Submit } from "~/components/Form";
-import { useCompanyTimeZone, usePermissions } from "~/hooks";
-import { itemSerialSequenceValidator } from "~/modules/settings/settings.models";
+import { Hidden, Input, Item, Number, Select, Submit } from "~/components/Form";
+import {
+ useCompanySettings,
+ useCompanyTimeZone,
+ usePermissions
+} from "~/hooks";
+import {
+ itemSerialSequenceValidator,
+ type SerialNumberTiming,
+ serialNumberTimings
+} from "~/modules/settings/settings.models";
import { path } from "~/utils/path";
import { interpolateSequenceDate } from "~/utils/string";
+import { useSerialNumberTimingLabels } from "./useSerialNumberTimingLabels";
type ItemSerialSequenceFormProps = {
initialValues: z.infer<typeof itemSerialSequenceValidator>;
@@ -69,6 +78,14 @@ const ItemSerialSequenceForm = ({
return `${p}${(next + step).toString().padStart(size, "0")}${s}`;
};
+ // Empty follows the company's timing; the placeholder names it.
+ const timingLabels = useSerialNumberTimingLabels();
+ const companyTiming = useCompanySettings()?.serialNumberTiming as
+ | SerialNumberTiming
+ | undefined;
+ const companyDefault =
+ timingLabels[companyTiming ?? "jobCreation"] ?? timingLabels.jobCreation;
+
const isDisabled = isEditing
? !permissions.can("update", "settings")
: !permissions.can("create", "settings");
@@ -144,6 +161,16 @@ const ItemSerialSequenceForm = ({
label={t`Suffix`}
onChange={(e) => setSuffix(e.target.value)}
/>
+ <Select
+ name="serialNumberTiming"
+ label={t`Timing`}
+ placeholder={t`Company default (${companyDefault})`}
+ options={serialNumberTimings.map((timing) => ({
+ value: timing,
+ label: timingLabels[timing]
+ }))}
+ helperText={t`When this item's units draw their serial numbers. Leave empty to follow Settings → Production.`}
+ />
<VStack spacing={0}>
<p className="text-muted-foreground text-sm">{`%{yyyy} = Full Year`}</p>
<p className="text-muted-foreground text-sm">{`%{yy} = Year`}</p>
diff --git a/apps/erp/app/modules/settings/ui/SerialNumbers/ItemSerialSequencesTable.tsx b/apps/erp/app/modules/settings/ui/SerialNumbers/ItemSerialSequencesTable.tsx
index 8a861f8d8e..6f822352fe 100644
--- a/apps/erp/app/modules/settings/ui/SerialNumbers/ItemSerialSequencesTable.tsx
+++ b/apps/erp/app/modules/settings/ui/SerialNumbers/ItemSerialSequencesTable.tsx
@@ -8,6 +8,7 @@ import type { ColumnDef } from "@tanstack/react-table";
import { memo, useCallback, useMemo } from "react";
import {
LuArrowRight,
+ LuClock,
LuHash,
LuMaximize,
LuPackage,
@@ -20,9 +21,12 @@ import {
import { useNavigate } from "react-router";
import { Hyperlink, New, Table } from "~/components";
import { usePermissions, useUrlParams } from "~/hooks";
+import type { SerialNumberTiming } from "~/modules/settings/settings.models";
+import { serialNumberTimings } from "~/modules/settings/settings.models";
import type { ItemSerialSequence } from "~/modules/settings/types";
import { useItems } from "~/stores/items";
import { path } from "~/utils/path";
+import { useSerialNumberTimingLabels } from "./useSerialNumberTimingLabels";
type ItemSerialSequencesTableProps = {
data: ItemSerialSequence[];
@@ -36,6 +40,7 @@ const ItemSerialSequencesTable = memo(
const navigate = useNavigate();
const permissions = usePermissions();
const [items] = useItems();
+ const timingLabels = useSerialNumberTimingLabels();
const columns = useMemo<ColumnDef<(typeof data)[number]>[]>(() => {
return [
@@ -108,9 +113,38 @@ const ItemSerialSequencesTable = memo(
meta: {
icon: <LuHash />
}
+ },
+ {
+ accessorKey: "serialNumberTiming",
+ header: t`Timing`,
+ cell: ({ row }) => {
+ const timing = row.original
+ .serialNumberTiming as SerialNumberTiming | null;
+ return timing ? (
+ timingLabels[timing]
+ ) : (
+ <span className="text-muted-foreground">
+ <Trans>Company default</Trans>
+ </span>
+ );
+ },
+ meta: {
+ icon: <LuClock />,
+ filter: {
+ type: "static",
+ options: serialNumberTimings.map((timing) => ({
+ value: timing,
+ label: timingLabels[timing]
+ }))
+ },
+ exportValue: (row) =>
+ row.serialNumberTiming
+ ? timingLabels[row.serialNumberTiming as SerialNumberTiming]
+ : t`Company default`
+ }
}
];
- }, [items, t]);
+ }, [items, t, timingLabels]);
const renderContextMenu = useCallback(
(row: (typeof data)[number]) => {
diff --git a/apps/erp/app/modules/settings/ui/SerialNumbers/useSerialNumberTimingLabels.ts b/apps/erp/app/modules/settings/ui/SerialNumbers/useSerialNumberTimingLabels.ts
new file mode 100644
index 0000000000..d0eb0d7b39
--- /dev/null
+++ b/apps/erp/app/modules/settings/ui/SerialNumbers/useSerialNumberTimingLabels.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 { useLingui } from "@lingui/react/macro";
+import { useMemo } from "react";
+import type { SerialNumberTiming } from "~/modules/settings/settings.models";
+
+/** The name of each serial number timing, as Settings → Production shows it. */
+export function useSerialNumberTimingLabels(): Record<
+ SerialNumberTiming,
+ string
+> {
+ const { t } = useLingui();
+ return useMemo(
+ () => ({
+ jobCreation: t`When the job is created`,
+ jobRelease: t`When the job is released`,
+ production: t`When the unit is produced`
+ }),
+ [t]
+ );
+}
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 c94c341b0a..7281d36805 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
@@ -1509,7 +1509,7 @@
{"name":"sales_upsertSalesOrderPayment","classification":"WRITE","schema":"d637b4fad42f","response":"3797626bd17e","permission":"sales:create+update","paginates":false},
{"name":"sales_upsertSalesOrderShipment","classification":"WRITE","schema":"c91b5d79606d","response":"3797626bd17e","permission":"sales:create+update","paginates":false},
{"name":"settings_assignPrinter","classification":"WRITE","schema":"e396a6d7690b","response":"de371a276a58","permission":"settings:update","paginates":false},
- {"name":"settings_createItemSerialSequence","classification":"WRITE","schema":"4a1a00848a52","response":"3797626bd17e","permission":"settings:create","paginates":false},
+ {"name":"settings_createItemSerialSequence","classification":"WRITE","schema":"544565accbe4","response":"3797626bd17e","permission":"settings:create","paginates":false},
{"name":"settings_deactivateCompanyIntegration","classification":"DESTRUCTIVE","schema":"3797626bd17e","response":"f06d2d858884","permission":"settings:update","paginates":false},
{"name":"settings_deleteItemSerialSequence","classification":"DESTRUCTIVE","schema":"7f8214d1083f","response":"bcde375ebd4c","permission":"settings:delete","paginates":false},
{"name":"settings_deletePrintJob","classification":"DESTRUCTIVE","schema":"d46f637367f8","response":"3797626bd17e","permission":"settings:update","paginates":false},
@@ -1532,8 +1532,8 @@
{"name":"settings_getEmployeeCompanies","classification":"READ","schema":"31b84d65b2ac","response":"5783a32e0f4a","permission":"settings:view","paginates":false},
{"name":"settings_getIndustries","classification":"READ","schema":"31b84d65b2ac","response":"5dcce0f224dd","permission":"settings:view","paginates":false},
{"name":"settings_getIntegration","classification":"READ","schema":"7f8214d1083f","response":"099545249106","permission":"settings:view","paginates":false},
- {"name":"settings_getItemSerialSequence","classification":"READ","schema":"7f8214d1083f","response":"be8519536044","permission":"settings:view","paginates":false},
- {"name":"settings_getItemSerialSequences","classification":"READ","schema":"cd40ae40fad5","response":"1caa1f035e17","permission":"settings:view","paginates":true},
+ {"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_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},
@@ -1558,11 +1558,11 @@
{"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_updateInvoicingSettings","classification":"WRITE","schema":"48fd9aba9ea8","response":"a32ee5ad2099","permission":"settings:update","paginates":false},
- {"name":"settings_updateItemSerialSequence","classification":"WRITE","schema":"8e65da365dcb","response":"3797626bd17e","permission":"settings:update","paginates":false},
+ {"name":"settings_updateItemSerialSequence","classification":"WRITE","schema":"43ad381904e2","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_updatePostingSync","classification":"WRITE","schema":"a545e3ef8da3","response":"f95fa90d0071","permission":"settings:update","paginates":false},
- {"name":"settings_updateProductionSettings","classification":"WRITE","schema":"d5c37cc53911","response":"4ba764a5dab1","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":"bac40d77d38a","response":"b3fda8ac0d5f","permission":"settings:update","paginates":false},
{"name":"settings_updateQualitySettings","classification":"WRITE","schema":"1bcfa3043aa1","response":"e87697c359ae","permission":"settings:update","paginates":false},
{"name":"settings_updateResourcesSettings","classification":"WRITE","schema":"ba1b98fe944a","response":"ec0f37163627","permission":"settings:update","paginates":false},
diff --git a/apps/erp/app/routes/x+/settings+/production.tsx b/apps/erp/app/routes/x+/settings+/production.tsx
index dc95a9abb4..e800734a6a 100644
--- a/apps/erp/app/routes/x+/settings+/production.tsx
+++ b/apps/erp/app/routes/x+/settings+/production.tsx
@@ -34,7 +34,7 @@ import { redirect } from "@carbon/utils";
import { msg } from "@lingui/core/macro";
import { Trans, useLingui } from "@lingui/react/macro";
import { useCallback } from "react";
-import { LuFactory, LuMapPin, LuTicket } from "react-icons/lu";
+import { LuFactory, LuMapPin, LuSend, LuTicket } from "react-icons/lu";
import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";
import { useLoaderData } from "react-router";
import { z } from "zod";
@@ -164,8 +164,11 @@ export default function ProductionSettingsRoute() {
: t`Material pre-selection disabled`;
}
if (data.serialNumberTiming !== undefined) {
- return data.serialNumberTiming === "production"
- ? t`Serial numbers are drawn when a unit is produced`
+ if (data.serialNumberTiming === "production") {
+ return t`Serial numbers are drawn when a unit is produced`;
+ }
+ return data.serialNumberTiming === "jobRelease"
+ ? t`Serial numbers are drawn when the job is released`
: t`Serial numbers are drawn when the job is created`;
}
if (data.locationStaffing) {
@@ -429,6 +432,9 @@ export default function ProductionSettingsRoute() {
<Trans>
Decide when a produced unit draws its number from the item's
serial sequence. Items without a sequence are unaffected.
+ </Trans>{" "}
+ <Trans>
+ An item's serial number sequence can override this choice.
</Trans>
</CardDescription>
</CardHeader>
@@ -585,6 +591,12 @@ function SerialNumberTimingChoice() {
description: t`Every unit is numbered up front, so serials can be printed before work starts.`,
icon: <LuTicket />
},
+ {
+ value: "jobRelease",
+ title: t`When the job is released`,
+ description: t`Every unit is numbered when the job goes to the shop floor, so travelers can still be printed and jobs cancelled before release burn none.`,
+ icon: <LuSend />
+ },
{
value: "production",
title: t`When the unit is produced`,
diff --git a/apps/erp/app/routes/x+/settings+/serial-numbers.$id.tsx b/apps/erp/app/routes/x+/settings+/serial-numbers.$id.tsx
index 7aca7427a2..7172cdaccc 100644
--- a/apps/erp/app/routes/x+/settings+/serial-numbers.$id.tsx
+++ b/apps/erp/app/routes/x+/settings+/serial-numbers.$id.tsx
@@ -9,7 +9,10 @@ import { validationError, validator } from "@carbon/form";
import { redirect } from "@carbon/utils";
import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";
import { data, useLoaderData } from "react-router";
-import { itemSerialSequenceValidator } from "~/modules/settings/settings.models";
+import {
+ itemSerialSequenceValidator,
+ type SerialNumberTiming
+} from "~/modules/settings/settings.models";
import {
getItemSerialSequence,
upsertItemSerialSequence
@@ -92,7 +95,10 @@ export default function EditSerialNumberRoute() {
suffix: itemSerialSequence.suffix ?? "",
next: itemSerialSequence.next ?? 0,
size: itemSerialSequence.size ?? 5,
- step: itemSerialSequence.step ?? 1
+ step: itemSerialSequence.step ?? 1,
+ serialNumberTiming:
+ (itemSerialSequence.serialNumberTiming as SerialNumberTiming | null) ??
+ undefined
};
return (
diff --git a/apps/erp/test/database/serial-number-timing.test.ts b/apps/erp/test/database/serial-number-timing.test.ts
index 45a08d9f70..c5ff5816e1 100644
--- a/apps/erp/test/database/serial-number-timing.test.ts
+++ b/apps/erp/test/database/serial-number-timing.test.ts
@@ -11,14 +11,21 @@ import { createServiceContext } from "@carbon/api/service-fn.server";
import {
assignSerialNumberIfMissing,
getNextSerialNumbers,
- getSerialNumberTiming
+ getSerialNumberTiming,
+ type SerialNumberTiming
} from "@carbon/database/sequence";
import { now } from "@internationalized/date";
import { sql } from "kysely";
-import { describe, expect, it } from "vitest";
+import { describe, expect, it, vi } from "vitest";
import { issueMaterial as issue } from "../../app/modules/inventory/inventory.service";
-import { completeJob } from "../../app/modules/production/production.server";
-import { numberSerialUnitsForCompletion } from "../../app/modules/production/production.service";
+import {
+ completeJob,
+ releaseCheckedJobs
+} from "../../app/modules/production/production.server";
+import {
+ assignJobSerialNumbers,
+ numberSerialUnitsForCompletion
+} from "../../app/modules/production/production.service";
import { invokePosting } from "../../app/modules/shared/shared.service";
import {
alwaysPostFixture,
@@ -34,6 +41,16 @@ import { handlesOf } from "./fixtures/handles";
import { hasLocalDatabase } from "./fixtures/local-database";
import { localServiceRoleClient } from "./fixtures/local-supabase";
+// Release recalculates the job and numbers it through postings, and the
+// posting gate tells the system by its key.
+vi.mock("@carbon/env", async (importOriginal) => {
+ const { localServiceRoleKey } = await import("./fixtures/local-supabase");
+ return {
+ ...(await importOriginal<object>()),
+ SUPABASE_SERVICE_ROLE_KEY: localServiceRoleKey() ?? "test"
+ };
+});
+
const client = hasLocalDatabase ? localServiceRoleClient() : null;
function contextFor(f: Fixture) {
@@ -50,7 +67,7 @@ function contextFor(f: Fixture) {
}
/** A serial assembly with a sequence (SN-001, SN-002, ...) and the timing set. */
-async function serialSetup(f: Fixture, timing: "jobCreation" | "production") {
+async function serialSetup(f: Fixture, timing: SerialNumberTiming) {
await seed(f, async (trx) => {
await trx
.updateTable("item")
@@ -127,6 +144,18 @@ async function untouchedSerialJob(f: Fixture, key: string, quantity: number) {
return { ...job, makeMethodId: makeMethod.id };
}
+/** The item's own timing, overriding the company's (null follows it). */
+async function itemTiming(f: Fixture, timing: SerialNumberTiming | null) {
+ await seed(f, async (trx) => {
+ await trx
+ .updateTable("itemSerialSequence")
+ .set({ serialNumberTiming: timing })
+ .where("itemId", "=", f.assemblyId)
+ .where("companyId", "=", f.companyId)
+ .execute();
+ });
+}
+
async function units(f: Fixture, makeMethodId: string) {
return f.db
.selectFrom("trackedEntity")
@@ -400,6 +429,108 @@ describe.skipIf(!client)("serial number timing", () => {
}
});
+ it("numbers every unit when the job is released under the release timing", async () => {
+ const f = await alwaysPostFixture();
+ try {
+ await stockPart(f, 20);
+ await serialSetup(f, "jobRelease");
+ const job = await untouchedSerialJob(f, "8", 3);
+ await seed(f, async (trx) => {
+ await trx
+ .updateTable("job")
+ .set({ status: "Planned" })
+ .where("id", "=", job.jobId)
+ .execute();
+ });
+
+ // Creation leaves the job's units alone under this timing.
+ await assignJobSerialNumbers(client!, f.db, {
+ jobId: job.jobId,
+ itemId: f.assemblyId,
+ companyId: f.companyId,
+ userId: USER,
+ moment: "creation"
+ });
+ expect(await units(f, job.makeMethodId)).toEqual([
+ expect.objectContaining({ readableId: null, quantity: 3 })
+ ]);
+
+ const released = await releaseCheckedJobs(contextFor(f), {
+ jobIds: [job.jobId],
+ purchaseOrdersBySupplierId: {}
+ });
+ expect(released.error).toBeNull();
+ expect(released.data?.failure).toBeNull();
+
+ expect(
+ (await units(f, job.makeMethodId)).map((unit) => [
+ unit.readableId,
+ Number(unit.quantity)
+ ])
+ ).toEqual([
+ ["SN-001", 1],
+ ["SN-002", 1],
+ ["SN-003", 1]
+ ]);
+ } finally {
+ await f.cleanup();
+ }
+ }, 60_000);
+
+ it("follows an item's own timing before the company's", async () => {
+ const f = await alwaysPostFixture();
+ try {
+ // The company numbers at creation; this item at production.
+ await serialSetup(f, "jobCreation");
+ await itemTiming(f, "production");
+ expect(
+ await getSerialNumberTiming(f.db, f.companyId, f.assemblyId)
+ ).toBe("production");
+ expect(await getSerialNumberTiming(f.db, f.companyId)).toBe(
+ "jobCreation"
+ );
+
+ const job = await untouchedSerialJob(f, "9", 2);
+ await assignJobSerialNumbers(client!, f.db, {
+ jobId: job.jobId,
+ itemId: f.assemblyId,
+ companyId: f.companyId,
+ userId: USER
+ });
+ expect(await units(f, job.makeMethodId)).toEqual([
+ expect.objectContaining({ readableId: null, quantity: 2 })
+ ]);
+ expect(
+ await numberSerialUnitsForCompletion(f.db, {
+ jobId: job.jobId,
+ quantityComplete: 2,
+ companyId: f.companyId
+ })
+ ).toEqual({ numbered: 2 });
+
+ // The company numbers at production; this item at creation, so the
+ // completion leaves its units to the creation path.
+ await seed(f, async (trx) => {
+ await trx
+ .updateTable("companySettings")
+ .set({ serialNumberTiming: "production" })
+ .where("id", "=", f.companyId)
+ .execute();
+ });
+ await itemTiming(f, "jobCreation");
+ const second = await untouchedSerialJob(f, "10", 2);
+ expect(
+ await numberSerialUnitsForCompletion(f.db, {
+ jobId: second.jobId,
+ quantityComplete: 2,
+ companyId: f.companyId
+ })
+ ).toEqual({ numbered: 0 });
+ } finally {
+ await f.cleanup();
+ }
+ });
+
it("formats serials in SQL with the company's date and the job's location", async () => {
const f = await alwaysPostFixture();
try {
diff --git a/apps/erp/test/job-complete-logic.test.ts b/apps/erp/test/job-complete-logic.test.ts
index e952515f97..60756287eb 100644
--- a/apps/erp/test/job-complete-logic.test.ts
+++ b/apps/erp/test/job-complete-logic.test.ts
@@ -316,4 +316,32 @@ describe("getSerialCompleteChoice", () => {
})
).toEqual({ mode: "numberOnReceipt", receivableCount: 3 });
});
+
+ it("numbers on receipt under the release timing, as under production", () => {
+ // A job completed before it was released still holds its unsplit seed.
+ expect(
+ getSerialCompleteChoice({
+ trackedEntities: [seed],
+ receivedEntityIds: none,
+ serialNumberTiming: "jobRelease",
+ jobQuantity: 3
+ })
+ ).toEqual({ mode: "numberOnReceipt", receivableCount: 3 });
+ });
+
+ it("lists the serials of a released job whose units were numbered at release", () => {
+ const units = [
+ unit({ id: "a", readableId: "SN-0001" }),
+ unit({ id: "b", readableId: "SN-0002" }),
+ unit({ id: "c", readableId: "SN-0003" })
+ ];
+ expect(
+ getSerialCompleteChoice({
+ trackedEntities: units,
+ receivedEntityIds: none,
+ serialNumberTiming: "jobRelease",
+ jobQuantity: 3
+ })
+ ).toEqual({ mode: "serials", serials: ["SN-0001", "SN-0002", "SN-0003"] });
+ });
});
diff --git a/apps/mes/app/services/serial-number.server.ts b/apps/mes/app/services/serial-number.server.ts
index 2f1a66ff6f..dd1469689e 100644
--- a/apps/mes/app/services/serial-number.server.ts
+++ b/apps/mes/app/services/serial-number.server.ts
@@ -10,9 +10,9 @@ const log = getLogger("mes", "serial-number");
/**
* Number a unit from its item's serial sequence when work first starts on it
- * (`companySettings.serialNumberTiming = 'production'`). A no-op for a unit
- * that already has a number, which is every unit under the default timing, so
- * it is safe on every start.
+ * (the `production` serial number timing, the item's own or else the
+ * company's). A no-op for a unit that already has a number, which is every unit
+ * under the `jobCreation` and `jobRelease` timings, so it is safe on every start.
*
* Best-effort: a failure never stops a timer from starting, and the ERP's
* completion and scrap postings number the unit later if this was lost. It
diff --git a/packages/database/src/sequence.ts b/packages/database/src/sequence.ts
index c435d0fead..a62d5b3f31 100644
--- a/packages/database/src/sequence.ts
+++ b/packages/database/src/sequence.ts
@@ -177,26 +177,50 @@ export async function getNextSerialNumbers(
return result.rows[0]?.serials ?? [];
}
+export const serialNumberTimings = [
+ "jobCreation",
+ "jobRelease",
+ "production"
+] as const;
+export type SerialNumberTiming = (typeof serialNumberTimings)[number];
+
+function asSerialNumberTiming(value: unknown): SerialNumberTiming | null {
+ return serialNumberTimings.find((timing) => timing === value) ?? null;
+}
+
/**
* When a produced unit draws its serial number: `jobCreation` (the default)
- * numbers every unit when the job is created; `production` leaves the job's
- * units unnumbered and numbers each one the first time it is touched (its first
- * production event, its first operation completion, its scrap, or the receipt
- * that completes the job). Read with a failure falling back to the default,
- * which is what every company had before the setting existed.
+ * numbers every unit when the job is created; `jobRelease` when the job is
+ * released to the shop floor; `production` leaves the job's units unnumbered
+ * and numbers each one the first time it is touched (its first production
+ * event, its first operation completion, its scrap, or the receipt that
+ * completes the job).
+ *
+ * With an item, its serial sequence's own timing wins and the company's is the
+ * default. Anything unreadable falls back to `jobCreation`, which is what every
+ * company had before the setting existed.
*/
export async function getSerialNumberTiming(
db: Transaction<KyselyDatabase> | Kysely<KyselyDatabase>,
- companyId: string
-): Promise<"jobCreation" | "production"> {
+ companyId: string,
+ itemId?: string | null
+): Promise<SerialNumberTiming> {
+ if (itemId) {
+ const sequence = await db
+ .selectFrom("itemSerialSequence")
+ .select(["serialNumberTiming"])
+ .where("itemId", "=", itemId)
+ .where("companyId", "=", companyId)
+ .executeTakeFirst();
+ const itemTiming = asSerialNumberTiming(sequence?.serialNumberTiming);
+ if (itemTiming) return itemTiming;
+ }
const settings = await db
.selectFrom("companySettings")
.select(["serialNumberTiming"])
.where("id", "=", companyId)
.executeTakeFirst();
- return settings?.serialNumberTiming === "production"
- ? "production"
- : "jobCreation";
+ return asSerialNumberTiming(settings?.serialNumberTiming) ?? "jobCreation";
}
/**
diff --git a/packages/database/src/swagger-docs-schema.ts b/packages/database/src/swagger-docs-schema.ts
index efb63c3c55..a0658135ab 100644
--- a/packages/database/src/swagger-docs-schema.ts
+++ b/packages/database/src/swagger-docs-schema.ts
@@ -24576,6 +24576,9 @@ export default {
{
$ref: "#/parameters/rowFilter.itemSerialSequences.updatedAt"
},
+ {
+ $ref: "#/parameters/rowFilter.itemSerialSequences.serialNumberTiming"
+ },
{
$ref: "#/parameters/rowFilter.itemSerialSequences.itemReadableId"
},
@@ -77460,6 +77463,9 @@ export default {
{
$ref: "#/parameters/rowFilter.itemSerialSequence.updatedAt"
},
+ {
+ $ref: "#/parameters/rowFilter.itemSerialSequence.serialNumberTiming"
+ },
{
$ref: "#/parameters/select"
},
@@ -77555,6 +77561,9 @@ export default {
{
$ref: "#/parameters/rowFilter.itemSerialSequence.updatedAt"
},
+ {
+ $ref: "#/parameters/rowFilter.itemSerialSequence.serialNumberTiming"
+ },
{
$ref: "#/parameters/preferReturn"
}
@@ -77604,6 +77613,9 @@ export default {
{
$ref: "#/parameters/rowFilter.itemSerialSequence.updatedAt"
},
+ {
+ $ref: "#/parameters/rowFilter.itemSerialSequence.serialNumberTiming"
+ },
{
$ref: "#/parameters/body.itemSerialSequence"
},
@@ -129696,6 +129708,10 @@ export default {
format: "timestamp with time zone",
type: "string"
},
+ serialNumberTiming: {
+ format: "text",
+ type: "string"
+ },
itemReadableId: {
format: "text",
type: "string"
@@ -154793,6 +154809,10 @@ export default {
updatedAt: {
format: "timestamp with time zone",
type: "string"
+ },
+ serialNumberTiming: {
+ format: "text",
+ type: "string"
}
},
type: "object"
@@ -181005,6 +181025,12 @@ export default {
in: "query",
type: "string"
},
+ "rowFilter.itemSerialSequences.serialNumberTiming": {
+ name: "serialNumberTiming",
+ required: false,
+ in: "query",
+ type: "string"
+ },
"rowFilter.itemSerialSequences.itemReadableId": {
name: "itemReadableId",
required: false,
@@ -208944,6 +208970,12 @@ export default {
in: "query",
type: "string"
},
+ "rowFilter.itemSerialSequence.serialNumberTiming": {
+ name: "serialNumberTiming",
+ required: false,
+ in: "query",
+ type: "string"
+ },
"body.batchProperty": {
name: "batchProperty",
description: "batchProperty",
diff --git a/packages/database/src/types.ts b/packages/database/src/types.ts
index 75445f0cac..7f78c34245 100644
--- a/packages/database/src/types.ts
+++ b/packages/database/src/types.ts
@@ -26584,6 +26584,7 @@ export type Database = {
itemId: string
next: number
prefix: string | null
+ serialNumberTiming: string | null
size: number
step: number
suffix: string | null
@@ -26598,6 +26599,7 @@ export type Database = {
itemId: string
next?: number
prefix?: string | null
+ serialNumberTiming?: string | null
size?: number
step?: number
suffix?: string | null
@@ -26612,6 +26614,7 @@ export type Database = {
itemId?: string
next?: number
prefix?: string | null
+ serialNumberTiming?: string | null
size?: number
step?: number
suffix?: string | null
@@ -78041,6 +78044,7 @@ export type Database = {
| null
next: number | null
prefix: string | null
+ serialNumberTiming: string | null
size: number | null
step: number | null
suffix: string | null
diff --git a/packages/database/supabase/migrations/20261021103300_serial-number-timing.sql b/packages/database/supabase/migrations/20261021103300_serial-number-timing.sql
index 5b563c11c4..fa31ea9c05 100644
--- a/packages/database/supabase/migrations/20261021103300_serial-number-timing.sql
+++ b/packages/database/supabase/migrations/20261021103300_serial-number-timing.sql
@@ -6,6 +6,10 @@
-- cancelled or reduced, and they run in planning order rather than production
-- order.
--
+-- 'jobRelease' reserves them when the job is released to the shop floor
+-- (releaseCheckedJobs), so travelers can still be printed before work starts
+-- while a Draft or Planned job that is resized or cancelled uses no numbers.
+--
-- 'production' leaves the job's tracked entities unnumbered at creation and draws
-- a number the first time a unit is touched: its first production event, its
-- first operation completion, its scrap, or the ERP completion that receives it
@@ -13,7 +17,29 @@
-- complete_job_to_inventory runs). Each allocation site guards on
-- `readableId IS NULL`, so flipping this setting never renumbers work already in
-- flight, and a unit nothing was ever done to stays unnumbered.
+--
+-- The company setting is the default. An item's serial sequence can override it
+-- (`itemSerialSequence."serialNumberTiming"`, NULL follows the company), since
+-- one plant can mark a machined part at its first operation and label an
+-- assembly at the end of the line.
ALTER TABLE "companySettings"
ADD COLUMN IF NOT EXISTS "serialNumberTiming" TEXT NOT NULL DEFAULT 'jobCreation'
- CHECK ("serialNumberTiming" IN ('jobCreation', 'production'));
+ CHECK ("serialNumberTiming" IN ('jobCreation', 'jobRelease', 'production'));
+
+ALTER TABLE "itemSerialSequence"
+ ADD COLUMN IF NOT EXISTS "serialNumberTiming" TEXT
+ CHECK ("serialNumberTiming" IN ('jobCreation', 'jobRelease', 'production'));
+
+-- The view expanded iss.* when it was created, so it is rebuilt to carry the
+-- new column (a new column inside iss.* moves the joined ones, which CREATE OR
+-- REPLACE refuses).
+DROP VIEW IF EXISTS "itemSerialSequences";
+CREATE VIEW "itemSerialSequences" WITH(SECURITY_INVOKER=true) AS
+SELECT
+ iss.*,
+ i."readableIdWithRevision" AS "itemReadableId",
+ i."name" AS "itemName",
+ i."itemTrackingType"
+FROM "itemSerialSequence" iss
+INNER JOIN "item" i ON i."id" = iss."itemId";
diff --git a/packages/database/supabase/migrations/20261021103400_serial-number-timing-completion.sql b/packages/database/supabase/migrations/20261021103400_serial-number-timing-completion.sql
index 81047ef1ec..b2d6e57ed2 100644
--- a/packages/database/supabase/migrations/20261021103400_serial-number-timing-completion.sql
+++ b/packages/database/supabase/migrations/20261021103400_serial-number-timing-completion.sql
@@ -1,8 +1,10 @@
-- Serial numbers at production: number the units a job completion takes.
--
--- Under companySettings."serialNumberTiming" = 'production' a job's units stay
--- unnumbered until they are first touched, and the completion that receives
--- them is a first touch. Both completion paths call number_serial_units_for_completion
+-- Under the 'production' timing a job's units stay unnumbered until they are
+-- first touched, and the completion that receives them is a first touch. Under
+-- 'jobRelease' they are numbered at release, so the completion only numbers what
+-- release did not (a job completed before release, or units added since). The
+-- timing is the item's serial sequence's, else the company's. Both completion paths call number_serial_units_for_completion
-- before complete_job_to_inventory: the ERP's completeJob, and the
-- sync_finish_job_operation interceptor when the last operation is marked Done.
-- It splits what the completion takes off the job's unsplit seed and numbers
@@ -135,6 +137,7 @@ AS $function$
DECLARE
v_job record;
v_make_method record;
+ v_timing text;
v_delta numeric;
v_target text;
v_taken text[];
@@ -153,13 +156,6 @@ DECLARE
BEGIN
PERFORM assert_company_access(p_company_id);
- IF COALESCE(
- (SELECT "serialNumberTiming" FROM "companySettings" WHERE "id" = p_company_id),
- 'jobCreation'
- ) <> 'production' THEN
- RETURN 0;
- END IF;
-
SELECT j."itemId", j.quantity, j."quantityReceivedToInventory", j."fixedAssetClassId",
j."fixedAssetId", j."locationId", i."itemTrackingType"
INTO v_job
@@ -170,10 +166,19 @@ BEGIN
IF NOT FOUND OR v_job."itemTrackingType" IS DISTINCT FROM 'Serial' THEN
RETURN 0;
END IF;
- IF NOT EXISTS (
- SELECT 1 FROM "itemSerialSequence"
- WHERE "itemId" = v_job."itemId" AND "companyId" = p_company_id
- ) THEN
+ SELECT "serialNumberTiming"
+ INTO v_timing
+ FROM "itemSerialSequence"
+ WHERE "itemId" = v_job."itemId" AND "companyId" = p_company_id;
+ IF NOT FOUND THEN
+ RETURN 0;
+ END IF;
+ -- Under 'jobCreation' every unit was numbered when the job was created.
+ IF COALESCE(
+ v_timing,
+ (SELECT "serialNumberTiming" FROM "companySettings" WHERE "id" = p_company_id),
+ 'jobCreation'
+ ) = 'jobCreation' THEN
RETURN 0;
END IF;
diff --git a/packages/locale/locales/de/erp.po b/packages/locale/locales/de/erp.po
index 645da80f0c..ef78b29fcb 100644
--- a/packages/locale/locales/de/erp.po
+++ b/packages/locale/locales/de/erp.po
@@ -2702,6 +2702,9 @@ msgstr "Die Beschaffungsart eines Artikels ändert sich"
msgid "An item's revision status changes"
msgstr "Der Revisionsstatus eines Elements ändert sich"
+msgid "An item's serial number sequence can override this choice."
+msgstr ""
+
msgid "An item's tracking type changes"
msgstr "Der Nachverfolgungstyp eines Elements ändert sich"
@@ -5303,6 +5306,9 @@ msgstr "Unternehmen"
msgid "Company default"
msgstr "Unternehmensstandard"
+msgid "Company default ({companyDefault})"
+msgstr ""
+
msgid "Company default ({companyLabel})"
msgstr "Unternehmensstandard ({companyLabel})"
@@ -9498,6 +9504,9 @@ msgstr "Jede Einheit hat einen Satz."
msgid "Every unit is numbered up front, so serials can be printed before work starts."
msgstr ""
+msgid "Every unit is numbered when the job goes to the shop floor, so travelers can still be printed and jobs cancelled before release burn none."
+msgstr ""
+
msgid "Everyone must set up an authenticator app before opening this company."
msgstr "Jeder muss eine Authentifizierungs-App einrichten, bevor er dieses Unternehmen öffnet."
@@ -20779,6 +20788,9 @@ msgstr ""
msgid "Serial numbers are drawn when the job is created"
msgstr ""
+msgid "Serial numbers are drawn when the job is released"
+msgstr ""
+
msgid "Serial numbers are drawn when the units are received."
msgstr ""
@@ -24494,6 +24506,9 @@ msgstr "Timer läuft"
msgid "Timezone"
msgstr "Zeitzone"
+msgid "Timing"
+msgstr ""
+
msgid "Tip away from you"
msgstr "Von sich weg kippen"
@@ -26412,6 +26427,9 @@ msgstr "Wenn die Waren tatsächlich ankamen; auf dem Beleg aufgezeichnet und zur
msgid "When the job is created"
msgstr ""
+msgid "When the job is released"
+msgstr ""
+
msgid "When the kanban card is scanned, the job is automatically moved out of draft and released to the floor."
msgstr "Wenn die Kanban-Karte gescannt wird, wird der Job automatisch aus dem Entwurf entfernt und zur Freigabe auf den Boden freigegeben."
@@ -26442,6 +26460,9 @@ msgstr "Wenn dieses Prüfmittel zur Kalibrierung fällig wird; sobald es überf
msgid "When this gauge was last successfully calibrated; the next-calibration date recomputes from this value plus the interval."
msgstr "Wann dieses Prüfmittel zuletzt erfolgreich kalibriert wurde; das nächste Kalibrierungsdatum wird aus diesem Wert plus dem Intervall neu berechnet."
+msgid "When this item's units draw their serial numbers. Leave empty to follow Settings → Production."
+msgstr ""
+
msgid "When this looks right, mark it agreed. That completes the Discovery step on your command center."
msgstr "Wenn dies richtig aussieht, markieren Sie es als vereinbart. Dies schließt den Discovery-Schritt in Ihrem Command Center ab."
diff --git a/packages/locale/locales/en/erp.po b/packages/locale/locales/en/erp.po
index 8944822cc0..3605127847 100644
--- a/packages/locale/locales/en/erp.po
+++ b/packages/locale/locales/en/erp.po
@@ -2702,6 +2702,9 @@ msgstr "An item's replenishment system changes"
msgid "An item's revision status changes"
msgstr "An item's revision status changes"
+msgid "An item's serial number sequence can override this choice."
+msgstr "An item's serial number sequence can override this choice."
+
msgid "An item's tracking type changes"
msgstr "An item's tracking type changes"
@@ -5303,6 +5306,9 @@ msgstr "Company"
msgid "Company default"
msgstr "Company default"
+msgid "Company default ({companyDefault})"
+msgstr "Company default ({companyDefault})"
+
msgid "Company default ({companyLabel})"
msgstr "Company default ({companyLabel})"
@@ -9498,6 +9504,9 @@ msgstr "Every unit has a rate."
msgid "Every unit is numbered up front, so serials can be printed before work starts."
msgstr "Every unit is numbered up front, so serials can be printed before work starts."
+msgid "Every unit is numbered when the job goes to the shop floor, so travelers can still be printed and jobs cancelled before release burn none."
+msgstr "Every unit is numbered when the job goes to the shop floor, so travelers can still be printed and jobs cancelled before release burn none."
+
msgid "Everyone must set up an authenticator app before opening this company."
msgstr "Everyone must set up an authenticator app before opening this company."
@@ -20779,6 +20788,9 @@ msgstr "Serial numbers are drawn when a unit is produced"
msgid "Serial numbers are drawn when the job is created"
msgstr "Serial numbers are drawn when the job is created"
+msgid "Serial numbers are drawn when the job is released"
+msgstr "Serial numbers are drawn when the job is released"
+
msgid "Serial numbers are drawn when the units are received."
msgstr "Serial numbers are drawn when the units are received."
@@ -24494,6 +24506,9 @@ msgstr "Timer running"
msgid "Timezone"
msgstr "Timezone"
+msgid "Timing"
+msgstr "Timing"
+
msgid "Tip away from you"
msgstr "Tip away from you"
@@ -26412,6 +26427,9 @@ msgstr "When the goods actually arrived; recorded on the receipt and used for su
msgid "When the job is created"
msgstr "When the job is created"
+msgid "When the job is released"
+msgstr "When the job is released"
+
msgid "When the kanban card is scanned, the job is automatically moved out of draft and released to the floor."
msgstr "When the kanban card is scanned, the job is automatically moved out of draft and released to the floor."
@@ -26442,6 +26460,9 @@ msgstr "When this gauge becomes due for calibration; once past due it reads Out-
msgid "When this gauge was last successfully calibrated; the next-calibration date recomputes from this value plus the interval."
msgstr "When this gauge was last successfully calibrated; the next-calibration date recomputes from this value plus the interval."
+msgid "When this item's units draw their serial numbers. Leave empty to follow Settings → Production."
+msgstr "When this item's units draw their serial numbers. Leave empty to follow Settings → Production."
+
msgid "When this looks right, mark it agreed. That completes the Discovery step on your command center."
msgstr "When this looks right, mark it agreed. That completes the Discovery step on your command center."
diff --git a/packages/locale/locales/es/erp.po b/packages/locale/locales/es/erp.po
index 3bc58b2e33..2e77780630 100644
--- a/packages/locale/locales/es/erp.po
+++ b/packages/locale/locales/es/erp.po
@@ -2702,6 +2702,9 @@ msgstr "El sistema de reposición de un elemento cambia"
msgid "An item's revision status changes"
msgstr "El estado de revisión de un elemento cambia"
+msgid "An item's serial number sequence can override this choice."
+msgstr ""
+
msgid "An item's tracking type changes"
msgstr "El tipo de seguimiento de un elemento cambia"
@@ -5303,6 +5306,9 @@ msgstr "Empresa"
msgid "Company default"
msgstr "Valor predeterminado de la empresa"
+msgid "Company default ({companyDefault})"
+msgstr ""
+
msgid "Company default ({companyLabel})"
msgstr "Valor predeterminado de la Empresa ({companyLabel})"
@@ -9498,6 +9504,9 @@ msgstr "Cada unidad tiene una tarifa."
msgid "Every unit is numbered up front, so serials can be printed before work starts."
msgstr ""
+msgid "Every unit is numbered when the job goes to the shop floor, so travelers can still be printed and jobs cancelled before release burn none."
+msgstr ""
+
msgid "Everyone must set up an authenticator app before opening this company."
msgstr "Todos deben configurar una aplicación autenticadora antes de abrir esta empresa."
@@ -20779,6 +20788,9 @@ msgstr ""
msgid "Serial numbers are drawn when the job is created"
msgstr ""
+msgid "Serial numbers are drawn when the job is released"
+msgstr ""
+
msgid "Serial numbers are drawn when the units are received."
msgstr ""
@@ -24494,6 +24506,9 @@ msgstr "Temporizador en ejecución"
msgid "Timezone"
msgstr "Zona horaria"
+msgid "Timing"
+msgstr ""
+
msgid "Tip away from you"
msgstr "Inclinar alejándose"
@@ -26412,6 +26427,9 @@ msgstr "Cuando los bienes realmente llegaron; registrado en el recibo y utilizad
msgid "When the job is created"
msgstr ""
+msgid "When the job is released"
+msgstr ""
+
msgid "When the kanban card is scanned, the job is automatically moved out of draft and released to the floor."
msgstr "Cuando se escanea la tarjeta kanban, el trabajo se mueve automáticamente fuera del borrador y se libera al piso."
@@ -26442,6 +26460,9 @@ msgstr "Cuándo este instrumento de medición se vence para calibración; una ve
msgid "When this gauge was last successfully calibrated; the next-calibration date recomputes from this value plus the interval."
msgstr "Cuándo este instrumento de medición fue calibrado exitosamente por última vez; la fecha de próxima calibración se recalcula a partir de este valor más el intervalo."
+msgid "When this item's units draw their serial numbers. Leave empty to follow Settings → Production."
+msgstr ""
+
msgid "When this looks right, mark it agreed. That completes the Discovery step on your command center."
msgstr "Cuando esto se vea correcto, márcalo como acordado. Eso completa el paso de Descubrimiento en tu centro de control."
diff --git a/packages/locale/locales/fr/erp.po b/packages/locale/locales/fr/erp.po
index 6905f12b20..96449e54c2 100644
--- a/packages/locale/locales/fr/erp.po
+++ b/packages/locale/locales/fr/erp.po
@@ -2702,6 +2702,9 @@ msgstr "Le Mode d'approvisionnement d'un Article change"
msgid "An item's revision status changes"
msgstr "Le statut de révision d'un article change"
+msgid "An item's serial number sequence can override this choice."
+msgstr ""
+
msgid "An item's tracking type changes"
msgstr "Le type de suivi d'un article change"
@@ -5303,6 +5306,9 @@ msgstr "Société"
msgid "Company default"
msgstr "Valeur par défaut de la société"
+msgid "Company default ({companyDefault})"
+msgstr ""
+
msgid "Company default ({companyLabel})"
msgstr "Par défaut de la société ({companyLabel})"
@@ -9498,6 +9504,9 @@ msgstr "Chaque unité a un taux."
msgid "Every unit is numbered up front, so serials can be printed before work starts."
msgstr ""
+msgid "Every unit is numbered when the job goes to the shop floor, so travelers can still be printed and jobs cancelled before release burn none."
+msgstr ""
+
msgid "Everyone must set up an authenticator app before opening this company."
msgstr "Tout le monde doit configurer une application d'authentification avant d'ouvrir cette société."
@@ -20779,6 +20788,9 @@ msgstr ""
msgid "Serial numbers are drawn when the job is created"
msgstr ""
+msgid "Serial numbers are drawn when the job is released"
+msgstr ""
+
msgid "Serial numbers are drawn when the units are received."
msgstr ""
@@ -24494,6 +24506,9 @@ msgstr "Minuterie en cours d'exécution"
msgid "Timezone"
msgstr "Fuseau horaire"
+msgid "Timing"
+msgstr ""
+
msgid "Tip away from you"
msgstr "Basculer en l'éloignant de vous"
@@ -26412,6 +26427,9 @@ msgstr "Quand les marchandises sont réellement arrivées ; enregistré sur le r
msgid "When the job is created"
msgstr ""
+msgid "When the job is released"
+msgstr ""
+
msgid "When the kanban card is scanned, the job is automatically moved out of draft and released to the floor."
msgstr "Lorsque la carte kanban est scannée, le travail est automatiquement déplacé hors du brouillon et libéré à l'étage."
@@ -26442,6 +26460,9 @@ msgstr "Quand cet instrument de mesure doit être étalonné ; une fois en retar
msgid "When this gauge was last successfully calibrated; the next-calibration date recomputes from this value plus the interval."
msgstr "Quand cet instrument de mesure a été étalonné la dernière fois avec succès ; la date du prochain étalonnage se recalcule à partir de cette valeur plus l'intervalle."
+msgid "When this item's units draw their serial numbers. Leave empty to follow Settings → Production."
+msgstr ""
+
msgid "When this looks right, mark it agreed. That completes the Discovery step on your command center."
msgstr "Quand cela vous semble correct, marquez-le comme convenu. Cela complète l'étape Discovery de votre centre de commande."
diff --git a/packages/locale/locales/hi/erp.po b/packages/locale/locales/hi/erp.po
index a0f662e322..f93acabf21 100644
--- a/packages/locale/locales/hi/erp.po
+++ b/packages/locale/locales/hi/erp.po
@@ -2702,6 +2702,9 @@ msgstr "किसी आइटम की पुनःपूर्ति प्
msgid "An item's revision status changes"
msgstr "एक आइटम की रिवीजन स्थिति में परिवर्तन"
+msgid "An item's serial number sequence can override this choice."
+msgstr ""
+
msgid "An item's tracking type changes"
msgstr "किसी आइटम का ट्रैकिंग प्रकार बदलता है"
@@ -5303,6 +5306,9 @@ msgstr "कंपनी"
msgid "Company default"
msgstr "कंपनी डिफ़ॉल्ट"
+msgid "Company default ({companyDefault})"
+msgstr ""
+
msgid "Company default ({companyLabel})"
msgstr "कंपनी डिफ़ॉल्ट ({companyLabel})"
@@ -9498,6 +9504,9 @@ msgstr "प्रत्येक इकाई की एक दर है।"
msgid "Every unit is numbered up front, so serials can be printed before work starts."
msgstr ""
+msgid "Every unit is numbered when the job goes to the shop floor, so travelers can still be printed and jobs cancelled before release burn none."
+msgstr ""
+
msgid "Everyone must set up an authenticator app before opening this company."
msgstr "इस कंपनी को खोलने से पहले सभी को प्रमाणकर्ता ऐप सेट अप करना होगा।"
@@ -20779,6 +20788,9 @@ msgstr ""
msgid "Serial numbers are drawn when the job is created"
msgstr ""
+msgid "Serial numbers are drawn when the job is released"
+msgstr ""
+
msgid "Serial numbers are drawn when the units are received."
msgstr ""
@@ -24494,6 +24506,9 @@ msgstr "टाइमर चल रहा है"
msgid "Timezone"
msgstr "समय क्षेत्र"
+msgid "Timing"
+msgstr ""
+
msgid "Tip away from you"
msgstr "अपनी ओर से दूर झुकाएँ"
@@ -26412,6 +26427,9 @@ msgstr "जब सामान वास्तव में आ गए; रस
msgid "When the job is created"
msgstr ""
+msgid "When the job is released"
+msgstr ""
+
msgid "When the kanban card is scanned, the job is automatically moved out of draft and released to the floor."
msgstr "जब कानबान कार्ड को स्कैन किया जाता है, तो नौकरी स्वचालित रूप से ड्राफ्ट से बाहर चली जाती है और फर्श पर रिलीज के लिए जारी की जाती है।"
@@ -26442,6 +26460,9 @@ msgstr "जब यह गेज अंशांकन के लिए देय
msgid "When this gauge was last successfully calibrated; the next-calibration date recomputes from this value plus the interval."
msgstr "जब यह गेज पिछली बार सफलतापूर्वक अंशांकित किया गया था; अगली-कैलिब्रेशन तारीख इस मूल्य और अंतराल से फिर से गणना की जाती है।"
+msgid "When this item's units draw their serial numbers. Leave empty to follow Settings → Production."
+msgstr ""
+
msgid "When this looks right, mark it agreed. That completes the Discovery step on your command center."
msgstr "जब यह सही लगे, तो इसे सहमत के रूप में चिह्नित करें। यह आपके कमांड सेंटर पर डिस्कवरी चरण को पूरा करता है।"
diff --git a/packages/locale/locales/it/erp.po b/packages/locale/locales/it/erp.po
index e42557bdcc..2bf467c2c8 100644
--- a/packages/locale/locales/it/erp.po
+++ b/packages/locale/locales/it/erp.po
@@ -2702,6 +2702,9 @@ msgstr "Il sistema di approvvigionamento di un articolo cambia"
msgid "An item's revision status changes"
msgstr "Lo stato della revisione di un elemento cambia"
+msgid "An item's serial number sequence can override this choice."
+msgstr ""
+
msgid "An item's tracking type changes"
msgstr "Il tipo di tracciabilità di un articolo cambia"
@@ -5303,6 +5306,9 @@ msgstr "Azienda"
msgid "Company default"
msgstr "Azienda predefinita"
+msgid "Company default ({companyDefault})"
+msgstr ""
+
msgid "Company default ({companyLabel})"
msgstr "Impostazione predefinita Azienda ({companyLabel})"
@@ -9498,6 +9504,9 @@ msgstr "Ogni unità ha un tasso."
msgid "Every unit is numbered up front, so serials can be printed before work starts."
msgstr ""
+msgid "Every unit is numbered when the job goes to the shop floor, so travelers can still be printed and jobs cancelled before release burn none."
+msgstr ""
+
msgid "Everyone must set up an authenticator app before opening this company."
msgstr "Tutti devono configurare un'app autenticatore prima di aprire questa azienda."
@@ -20779,6 +20788,9 @@ msgstr ""
msgid "Serial numbers are drawn when the job is created"
msgstr ""
+msgid "Serial numbers are drawn when the job is released"
+msgstr ""
+
msgid "Serial numbers are drawn when the units are received."
msgstr ""
@@ -24494,6 +24506,9 @@ msgstr "Timer in esecuzione"
msgid "Timezone"
msgstr "Fuso orario"
+msgid "Timing"
+msgstr ""
+
msgid "Tip away from you"
msgstr "Inclina lontano da te"
@@ -26412,6 +26427,9 @@ msgstr "Quando i beni sono effettivamente arrivati; registrato sulla ricevuta e
msgid "When the job is created"
msgstr ""
+msgid "When the job is released"
+msgstr ""
+
msgid "When the kanban card is scanned, the job is automatically moved out of draft and released to the floor."
msgstr "Quando la carta kanban viene scansionata, il lavoro viene automaticamente spostato dalla bozza e rilasciato al piano."
@@ -26442,6 +26460,9 @@ msgstr "Quando questo strumento di misura è scaduto per la taratura; una volta
msgid "When this gauge was last successfully calibrated; the next-calibration date recomputes from this value plus the interval."
msgstr "Quando questo strumento di misura è stato tarato con successo per l'ultima volta; la data della prossima taratura viene ricalcolata da questo valore più l'intervallo."
+msgid "When this item's units draw their serial numbers. Leave empty to follow Settings → Production."
+msgstr ""
+
msgid "When this looks right, mark it agreed. That completes the Discovery step on your command center."
msgstr "Quando sembra giusto, contrassegnalo come concordato. Questo completa il passaggio Discovery nel tuo centro di comando."
diff --git a/packages/locale/locales/ja/erp.po b/packages/locale/locales/ja/erp.po
index fdfc65e49a..4a046410fe 100644
--- a/packages/locale/locales/ja/erp.po
+++ b/packages/locale/locales/ja/erp.po
@@ -2702,6 +2702,9 @@ msgstr "品目の調達方式が変更される"
msgid "An item's revision status changes"
msgstr "アイテムのリビジョンステータスが変更されます"
+msgid "An item's serial number sequence can override this choice."
+msgstr ""
+
msgid "An item's tracking type changes"
msgstr "アイテムの追跡タイプが変更されます"
@@ -5303,6 +5306,9 @@ msgstr "会社"
msgid "Company default"
msgstr "会社のデフォルト"
+msgid "Company default ({companyDefault})"
+msgstr ""
+
msgid "Company default ({companyLabel})"
msgstr "会社のデフォルト({companyLabel})"
@@ -9498,6 +9504,9 @@ msgstr "すべての個にレートが設定されています。"
msgid "Every unit is numbered up front, so serials can be printed before work starts."
msgstr ""
+msgid "Every unit is numbered when the job goes to the shop floor, so travelers can still be printed and jobs cancelled before release burn none."
+msgstr ""
+
msgid "Everyone must set up an authenticator app before opening this company."
msgstr "この会社を開く前に、誰もが認証器アプリをセットアップする必要があります。"
@@ -20779,6 +20788,9 @@ msgstr ""
msgid "Serial numbers are drawn when the job is created"
msgstr ""
+msgid "Serial numbers are drawn when the job is released"
+msgstr ""
+
msgid "Serial numbers are drawn when the units are received."
msgstr ""
@@ -24494,6 +24506,9 @@ msgstr "タイマー実行中"
msgid "Timezone"
msgstr "タイムゾーン"
+msgid "Timing"
+msgstr ""
+
msgid "Tip away from you"
msgstr "奥に傾ける"
@@ -26412,6 +26427,9 @@ msgstr "商品が実際に到着した日時。入荷に記録され、仕入先
msgid "When the job is created"
msgstr ""
+msgid "When the job is released"
+msgstr ""
+
msgid "When the kanban card is scanned, the job is automatically moved out of draft and released to the floor."
msgstr "かんばんカードがスキャンされると、製造指図は自動的に下書きから移動され、フロアにリリース済となります。"
@@ -26442,6 +26460,9 @@ msgstr "この測定器が校正の対象日となる日時。期限を過ぎる
msgid "When this gauge was last successfully calibrated; the next-calibration date recomputes from this value plus the interval."
msgstr "この測定器が最後に正常に校正された日時。次の校正日はこの値とインターバルの合計から再計算されます。"
+msgid "When this item's units draw their serial numbers. Leave empty to follow Settings → Production."
+msgstr ""
+
msgid "When this looks right, mark it agreed. That completes the Discovery step on your command center."
msgstr "これが正しく見えたら、同意済みとしてマークしてください。これでコマンドセンターの検出ステップが完了します。"
diff --git a/packages/locale/locales/ko/erp.po b/packages/locale/locales/ko/erp.po
index f935586042..2a9fc05bdd 100644
--- a/packages/locale/locales/ko/erp.po
+++ b/packages/locale/locales/ko/erp.po
@@ -2702,6 +2702,9 @@ msgstr "품목의 조달 방식 변경"
msgid "An item's revision status changes"
msgstr "품목의 리비전 상태 변경"
+msgid "An item's serial number sequence can override this choice."
+msgstr ""
+
msgid "An item's tracking type changes"
msgstr "항목의 추적 유형이 변경됩니다"
@@ -5303,6 +5306,9 @@ msgstr "회사"
msgid "Company default"
msgstr "회사 기본값"
+msgid "Company default ({companyDefault})"
+msgstr ""
+
msgid "Company default ({companyLabel})"
msgstr "회사 기본값({companyLabel})"
@@ -9498,6 +9504,9 @@ msgstr "모든 단위에 요율이 있습니다."
msgid "Every unit is numbered up front, so serials can be printed before work starts."
msgstr ""
+msgid "Every unit is numbered when the job goes to the shop floor, so travelers can still be printed and jobs cancelled before release burn none."
+msgstr ""
+
msgid "Everyone must set up an authenticator app before opening this company."
msgstr "이 회사를 열기 전에 모든 사람이 인증기 앱을 설정해야 합니다."
@@ -20779,6 +20788,9 @@ msgstr ""
msgid "Serial numbers are drawn when the job is created"
msgstr ""
+msgid "Serial numbers are drawn when the job is released"
+msgstr ""
+
msgid "Serial numbers are drawn when the units are received."
msgstr ""
@@ -24494,6 +24506,9 @@ msgstr "타이머 실행 중"
msgid "Timezone"
msgstr "시간대"
+msgid "Timing"
+msgstr ""
+
msgid "Tip away from you"
msgstr "몸에서 멀어지는 방향으로 기울이기"
@@ -26412,6 +26427,9 @@ msgstr "재화가 실제로 도착한 시점으로, 입고에 기록되며 공
msgid "When the job is created"
msgstr ""
+msgid "When the job is released"
+msgstr ""
+
msgid "When the kanban card is scanned, the job is automatically moved out of draft and released to the floor."
msgstr "칸반 카드를 스캔하면 작업이 자동으로 초안 상태에서 벗어나 현장으로 릴리즈됩니다."
@@ -26442,6 +26460,9 @@ msgstr "이 계측기의 교정이 만료될 때; 만료되면 Out-of-Calibratio
msgid "When this gauge was last successfully calibrated; the next-calibration date recomputes from this value plus the interval."
msgstr "이 계측기가 마지막으로 성공적으로 교정된 시점; 다음 교정 날짜는 이 값에 간격을 더해서 다시 계산됩니다."
+msgid "When this item's units draw their serial numbers. Leave empty to follow Settings → Production."
+msgstr ""
+
msgid "When this looks right, mark it agreed. That completes the Discovery step on your command center."
msgstr "이 내용이 맞으면 합의됨으로 표시하세요. 그러면 커맨드 센터의 발견(Discovery) 단계가 완료됩니다."
diff --git a/packages/locale/locales/pl/erp.po b/packages/locale/locales/pl/erp.po
index 2d0457432d..9531144724 100644
--- a/packages/locale/locales/pl/erp.po
+++ b/packages/locale/locales/pl/erp.po
@@ -2702,6 +2702,9 @@ msgstr "System uzupełniania zapasów elementu ulega zmianie"
msgid "An item's revision status changes"
msgstr "Status rewizji artykułu uległ zmianie"
+msgid "An item's serial number sequence can override this choice."
+msgstr ""
+
msgid "An item's tracking type changes"
msgstr "Typ śledzenia elementu ulega zmianie"
@@ -5303,6 +5306,9 @@ msgstr "Firma"
msgid "Company default"
msgstr "Domyślne dla firmy"
+msgid "Company default ({companyDefault})"
+msgstr ""
+
msgid "Company default ({companyLabel})"
msgstr "Domyślnie dla firmy ({companyLabel})"
@@ -9498,6 +9504,9 @@ msgstr "Każda sztuka ma stawkę."
msgid "Every unit is numbered up front, so serials can be printed before work starts."
msgstr ""
+msgid "Every unit is numbered when the job goes to the shop floor, so travelers can still be printed and jobs cancelled before release burn none."
+msgstr ""
+
msgid "Everyone must set up an authenticator app before opening this company."
msgstr "Każdy musi skonfigurować aplikację uwierzytelniającą przed otwarciem tej firmy."
@@ -20779,6 +20788,9 @@ msgstr ""
msgid "Serial numbers are drawn when the job is created"
msgstr ""
+msgid "Serial numbers are drawn when the job is released"
+msgstr ""
+
msgid "Serial numbers are drawn when the units are received."
msgstr ""
@@ -24494,6 +24506,9 @@ msgstr "Czasomierz uruchomiony"
msgid "Timezone"
msgstr "Strefa czasowa"
+msgid "Timing"
+msgstr ""
+
msgid "Tip away from you"
msgstr "Przechyl od siebie"
@@ -26412,6 +26427,9 @@ msgstr "Kiedy towary faktycznie przybyły; zarejestrowane na paragonie i używan
msgid "When the job is created"
msgstr ""
+msgid "When the job is released"
+msgstr ""
+
msgid "When the kanban card is scanned, the job is automatically moved out of draft and released to the floor."
msgstr "Gdy karta kanban zostanie zeskanowana, zlecenie produkcyjne jest automatycznie przenoszone z wersji roboczej i zwalniane na halę."
@@ -26442,6 +26460,9 @@ msgstr "Gdy ten przyrząd pomiarowy jest wymagany do wzorcowania; po upłynięci
msgid "When this gauge was last successfully calibrated; the next-calibration date recomputes from this value plus the interval."
msgstr "Gdy ten przyrząd pomiarowy był ostatnio pomyślnie wzorcowany; następna data wzorcowania jest przeliczana z tej wartości plus interwału."
+msgid "When this item's units draw their serial numbers. Leave empty to follow Settings → Production."
+msgstr ""
+
msgid "When this looks right, mark it agreed. That completes the Discovery step on your command center."
msgstr "Gdy to wygląda dobrze, oznacz jako uzgodnione. To kończy krok Odkrywania w Twoim centrum dowodzenia."
diff --git a/packages/locale/locales/pt/erp.po b/packages/locale/locales/pt/erp.po
index e7ce4159dc..74c538bc09 100644
--- a/packages/locale/locales/pt/erp.po
+++ b/packages/locale/locales/pt/erp.po
@@ -2702,6 +2702,9 @@ msgstr "O sistema de reposição de um item muda"
msgid "An item's revision status changes"
msgstr "O status de revisão de um item muda"
+msgid "An item's serial number sequence can override this choice."
+msgstr ""
+
msgid "An item's tracking type changes"
msgstr "O tipo de rastreamento de um item muda"
@@ -5303,6 +5306,9 @@ msgstr "Empresa"
msgid "Company default"
msgstr "Padrão da empresa"
+msgid "Company default ({companyDefault})"
+msgstr ""
+
msgid "Company default ({companyLabel})"
msgstr "Padrão da empresa ({companyLabel})"
@@ -9498,6 +9504,9 @@ msgstr "Cada unidade tem uma taxa."
msgid "Every unit is numbered up front, so serials can be printed before work starts."
msgstr ""
+msgid "Every unit is numbered when the job goes to the shop floor, so travelers can still be printed and jobs cancelled before release burn none."
+msgstr ""
+
msgid "Everyone must set up an authenticator app before opening this company."
msgstr "Todos devem configurar um aplicativo autenticador antes de abrir esta empresa."
@@ -20779,6 +20788,9 @@ msgstr ""
msgid "Serial numbers are drawn when the job is created"
msgstr ""
+msgid "Serial numbers are drawn when the job is released"
+msgstr ""
+
msgid "Serial numbers are drawn when the units are received."
msgstr ""
@@ -24494,6 +24506,9 @@ msgstr "Cronômetro em execução"
msgid "Timezone"
msgstr "Fuso Horário"
+msgid "Timing"
+msgstr ""
+
msgid "Tip away from you"
msgstr "Inclinar para longe de você"
@@ -26412,6 +26427,9 @@ msgstr "Quando os bens realmente chegaram; registrado na nota fiscal e usado par
msgid "When the job is created"
msgstr ""
+msgid "When the job is released"
+msgstr ""
+
msgid "When the kanban card is scanned, the job is automatically moved out of draft and released to the floor."
msgstr "Quando o cartão kanban é escaneado, o trabalho é automaticamente retirado do rascunho e liberado para o piso."
@@ -26442,6 +26460,9 @@ msgstr "Quando este Instrumento de medição vence para calibração; uma vez ve
msgid "When this gauge was last successfully calibrated; the next-calibration date recomputes from this value plus the interval."
msgstr "Quando este Instrumento de medição foi calibrado pela última vez com sucesso; a data da próxima calibração é recalculada a partir deste valor mais o intervalo."
+msgid "When this item's units draw their serial numbers. Leave empty to follow Settings → Production."
+msgstr ""
+
msgid "When this looks right, mark it agreed. That completes the Discovery step on your command center."
msgstr "Quando isto parecer correto, marque como acordado. Isso completa a etapa de Descoberta no seu centro de comando."
diff --git a/packages/locale/locales/ru/erp.po b/packages/locale/locales/ru/erp.po
index a68ef8a054..28948a6991 100644
--- a/packages/locale/locales/ru/erp.po
+++ b/packages/locale/locales/ru/erp.po
@@ -2702,6 +2702,9 @@ msgstr "Способ пополнения номенклатуры измени
msgid "An item's revision status changes"
msgstr "Статус ревизии номенклатуры изменился"
+msgid "An item's serial number sequence can override this choice."
+msgstr ""
+
msgid "An item's tracking type changes"
msgstr "Тип отслеживания элемента изменяется"
@@ -5303,6 +5306,9 @@ msgstr "Организация"
msgid "Company default"
msgstr "По умолчанию организации"
+msgid "Company default ({companyDefault})"
+msgstr ""
+
msgid "Company default ({companyLabel})"
msgstr "Значение по умолчанию организации ({companyLabel})"
@@ -9498,6 +9504,9 @@ msgstr "Каждая единица имеет ставку."
msgid "Every unit is numbered up front, so serials can be printed before work starts."
msgstr ""
+msgid "Every unit is numbered when the job goes to the shop floor, so travelers can still be printed and jobs cancelled before release burn none."
+msgstr ""
+
msgid "Everyone must set up an authenticator app before opening this company."
msgstr "Все должны установить приложение-аутентификатор перед открытием этой организации."
@@ -20779,6 +20788,9 @@ msgstr ""
msgid "Serial numbers are drawn when the job is created"
msgstr ""
+msgid "Serial numbers are drawn when the job is released"
+msgstr ""
+
msgid "Serial numbers are drawn when the units are received."
msgstr ""
@@ -24494,6 +24506,9 @@ msgstr "Таймер запущен"
msgid "Timezone"
msgstr "Часовой пояс"
+msgid "Timing"
+msgstr ""
+
msgid "Tip away from you"
msgstr "Наклонить от себя"
@@ -26412,6 +26427,9 @@ msgstr "Когда товары действительно прибыли; за
msgid "When the job is created"
msgstr ""
+msgid "When the job is released"
+msgstr ""
+
msgid "When the kanban card is scanned, the job is automatically moved out of draft and released to the floor."
msgstr "Когда карточка канбана сканируется, задание автоматически удаляется из черновика и выпускается на пол."
@@ -26442,6 +26460,9 @@ msgstr "Когда это Средство измерения подлежит
msgid "When this gauge was last successfully calibrated; the next-calibration date recomputes from this value plus the interval."
msgstr "Когда это средство измерения последний раз успешно калибровалось; дата следующей калибровки пересчитывается из этого значения плюс интервал."
+msgid "When this item's units draw their serial numbers. Leave empty to follow Settings → Production."
+msgstr ""
+
msgid "When this looks right, mark it agreed. That completes the Discovery step on your command center."
msgstr "Когда это выглядит правильно, отметьте это как согласованное. Это завершает шаг Открытия на вашем центре управления."
diff --git a/packages/locale/locales/tr/erp.po b/packages/locale/locales/tr/erp.po
index 2677a58922..500d8ad3d6 100644
--- a/packages/locale/locales/tr/erp.po
+++ b/packages/locale/locales/tr/erp.po
@@ -2702,6 +2702,9 @@ msgstr "Bir stok kartının ikmal yöntemi değişir"
msgid "An item's revision status changes"
msgstr "Bir öğenin revizyon durumu değişir"
+msgid "An item's serial number sequence can override this choice."
+msgstr ""
+
msgid "An item's tracking type changes"
msgstr "Bir stok kartının izleme türü değişir"
@@ -5303,6 +5306,9 @@ msgstr "Şirket"
msgid "Company default"
msgstr "Şirket varsayılanı"
+msgid "Company default ({companyDefault})"
+msgstr ""
+
msgid "Company default ({companyLabel})"
msgstr "Şirket varsayılanı ({companyLabel})"
@@ -9498,6 +9504,9 @@ msgstr "Her adetin bir oranı vardır."
msgid "Every unit is numbered up front, so serials can be printed before work starts."
msgstr ""
+msgid "Every unit is numbered when the job goes to the shop floor, so travelers can still be printed and jobs cancelled before release burn none."
+msgstr ""
+
msgid "Everyone must set up an authenticator app before opening this company."
msgstr "Herkes bu şirketi açmadan önce bir kimlik doğrulaması uygulaması kurması gerekir."
@@ -20779,6 +20788,9 @@ msgstr ""
msgid "Serial numbers are drawn when the job is created"
msgstr ""
+msgid "Serial numbers are drawn when the job is released"
+msgstr ""
+
msgid "Serial numbers are drawn when the units are received."
msgstr ""
@@ -24494,6 +24506,9 @@ msgstr "Zamanlayıcı çalışıyor"
msgid "Timezone"
msgstr "Saat Dilim"
+msgid "Timing"
+msgstr ""
+
msgid "Tip away from you"
msgstr "Sizden uzağa eğ"
@@ -26412,6 +26427,9 @@ msgstr "Mallar gerçekten geldiğinde; makbuzda kaydedilmiş ve tedarikçinin za
msgid "When the job is created"
msgstr ""
+msgid "When the job is released"
+msgstr ""
+
msgid "When the kanban card is scanned, the job is automatically moved out of draft and released to the floor."
msgstr "Kanban kartı tarandığında, iş otomatik olarak taslaktan çıkarılır ve yere yayınlanır."
@@ -26442,6 +26460,9 @@ msgstr "Bu ölçü aleti kalibrasyonun yapılması gerektiğinde; vadesi geçtik
msgid "When this gauge was last successfully calibrated; the next-calibration date recomputes from this value plus the interval."
msgstr "Bu ölçü aletinin en son başarıyla kalibre edildiği zaman; sonraki kalibrasyonu tarihi bu değer artı aralığından yeniden hesaplanır."
+msgid "When this item's units draw their serial numbers. Leave empty to follow Settings → Production."
+msgstr ""
+
msgid "When this looks right, mark it agreed. That completes the Discovery step on your command center."
msgstr "Bu doğru göründüğünde, kabul edildi olarak işaretleyin. Bu, komut merkezinizde Keşif adımını tamamlar."
diff --git a/packages/locale/locales/zh/erp.po b/packages/locale/locales/zh/erp.po
index 0762757a75..50cc5ba3df 100644
--- a/packages/locale/locales/zh/erp.po
+++ b/packages/locale/locales/zh/erp.po
@@ -2702,6 +2702,9 @@ msgstr "物料的补货方式更改"
msgid "An item's revision status changes"
msgstr "物料的修订版状态更改"
+msgid "An item's serial number sequence can override this choice."
+msgstr ""
+
msgid "An item's tracking type changes"
msgstr "物料的追踪类型更改"
@@ -5303,6 +5306,9 @@ msgstr "公司"
msgid "Company default"
msgstr "公司默认值"
+msgid "Company default ({companyDefault})"
+msgstr ""
+
msgid "Company default ({companyLabel})"
msgstr "公司默认值 ({companyLabel})"
@@ -9498,6 +9504,9 @@ msgstr "每件都有费率。"
msgid "Every unit is numbered up front, so serials can be printed before work starts."
msgstr ""
+msgid "Every unit is numbered when the job goes to the shop floor, so travelers can still be printed and jobs cancelled before release burn none."
+msgstr ""
+
msgid "Everyone must set up an authenticator app before opening this company."
msgstr "每个人在打开此公司之前都必须设置身份验证器应用程序。"
@@ -20779,6 +20788,9 @@ msgstr ""
msgid "Serial numbers are drawn when the job is created"
msgstr ""
+msgid "Serial numbers are drawn when the job is released"
+msgstr ""
+
msgid "Serial numbers are drawn when the units are received."
msgstr ""
@@ -24494,6 +24506,9 @@ msgstr "计时器运行中"
msgid "Timezone"
msgstr "时区"
+msgid "Timing"
+msgstr ""
+
msgid "Tip away from you"
msgstr "向远离你的方向倾斜"
@@ -26412,6 +26427,9 @@ msgstr "货物实际到达时;在收据上记录,用于供应商准时交货评
msgid "When the job is created"
msgstr ""
+msgid "When the job is released"
+msgstr ""
+
msgid "When the kanban card is scanned, the job is automatically moved out of draft and released to the floor."
msgstr "当扫描看板卡时,工单自动从草稿移出并已下达到工厂。"
@@ -26442,6 +26460,9 @@ msgstr "该量具何时需要校准;过期后读数显示为失准。"
msgid "When this gauge was last successfully calibrated; the next-calibration date recomputes from this value plus the interval."
msgstr "此量具最后一次成功校准时;下一个校准日期从此值加上间隔重新计算。"
+msgid "When this item's units draw their serial numbers. Leave empty to follow Settings → Production."
+msgstr ""
+
msgid "When this looks right, mark it agreed. That completes the Discovery step on your command center."
msgstr "当这看起来正确时,将其标记为已同意。这将完成您的指挥中心上的发现步骤。"