Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.
TypeScript ai-agentsbill-of-materialserpinventory-managementleanmanufacturingmanufacturing-execution-systemmcp-servermesmrpopen-source-erppostgresqlproduction-planningqmsquality-management-systemreact-routerself-hostedsupabasetraceabilitytypescript
docs(production): strict backflush reference page and kanban auto-release
naveenkash62cfa8561ad0
diff --git a/docs/app/docs/layout.tsx b/docs/app/docs/layout.tsxindex 711dc132fa..dee6c3d1a5 100644--- a/docs/app/docs/layout.tsx+++ b/docs/app/docs/layout.tsx@@ -90,6 +90,7 @@ const REFERENCE_GROUPS: { label: string; slugs: string[] }[] = ["scheduling","batching","kanban",+ "strict-backflush","work-centers","maintenance","mes",diff --git a/docs/content/docs/reference/company-settings.mdx b/docs/content/docs/reference/company-settings.mdxindex 0a1125f4be..fc9517102f 100644--- a/docs/content/docs/reference/company-settings.mdx+++ b/docs/content/docs/reference/company-settings.mdx@@ -41,6 +41,8 @@ A user can belong to multiple companies and switch between them with the company<Field name="useMetric" type="boolean">Whether material units default to metric.</Field><Field name="materialGeneratedIds" type="boolean">Whether new materials get an auto-generated readable id.</Field><Field name="plmReleaseControl" type="text">The release-control policy for item revisions.</Field>+ <Field name="requireBackflushStorageUnit" type="boolean">Strict backflush: each material is backflushed only from the storage unit on its line. Default off. Edited from **Settings → Items**. See [strict backflush](/docs/reference/strict-backflush).</Field>+ <Field name="preventNegativeBackflush" type="boolean">With strict backflush on, stops an operation or job that would take its storage unit below zero. Default on. Edited from **Settings → Items**.</Field><Field name="kanbanOutput" type="enum">What a Kanban card prints: `label`, `qrcode`, or `url`.</Field><Field name="productLabelSize / shelfLabelSize" type="text">Default label sizes.</Field><Field name="mrpRunTime" type="time">The time of day scheduled MRP runs, on the company's time zone. Empty keeps the default, every 3 hours. Edited from **Settings → Planning**. See [planning](/docs/reference/planning#when-it-runs).</Field>diff --git a/docs/content/docs/reference/jobs.mdx b/docs/content/docs/reference/jobs.mdxindex 38264beed6..28074b7edb 100644--- a/docs/content/docs/reference/jobs.mdx+++ b/docs/content/docs/reference/jobs.mdx@@ -77,7 +77,9 @@ The **order** field sets each operation's position, and operation order (*After### Time and output-The floor records time and output separately. A <Term id="production-event">production event</Term> records **Setup**, **Labor**, or **Machine** time with start, end, and employee. A production quantity records **Production**, [**Scrap**](/docs/reference/scrap), or **Rework** units and updates operation totals. Scrap does not satisfy the target quantity. Untracked materials are <Term id="backflush">backflushed</Term> when output is reported; tracked materials are issued explicitly.+The floor records time and output separately. A <Term id="production-event">production event</Term> records **Setup**, **Labor**, or **Machine** time with start, end, and employee. A production quantity records **Production**, [**Scrap**](/docs/reference/scrap), or **Rework** units and updates operation totals. Scrap does not satisfy the target quantity.++Untracked materials are <Term id="backflush">backflushed</Term> when output is reported; tracked materials are issued explicitly. [Strict backflush](/docs/reference/strict-backflush) limits each material to the storage unit on its line.### Proceduresdiff --git a/docs/content/docs/reference/kanban.mdx b/docs/content/docs/reference/kanban.mdxindex 963997593c..5f44b9ee77 100644--- a/docs/content/docs/reference/kanban.mdx+++ b/docs/content/docs/reference/kanban.mdx@@ -24,8 +24,8 @@ Each kanban is a small record: an item, where it lives, how much to reorder, and<Field name="Replenishment level">The <Term id="kanban-replenishment-level">replenishment level</Term> for the To storage unit, 0 or more. Leave it blank for a scan-only kanban. (`Transfer` only.)</Field><Field name="Supplier">Who to buy from. **Required for `Buy` kanbans.**</Field><Field name="Purchase unit of measure / Conversion factor">The unit you buy in and how many stock units that equals. Carbon applies both to the PO line. (`Buy` only.)</Field>- <Field name="Auto Release">On a `Make` scan, release the created job to the floor immediately instead of leaving it in draft. (`Make` only.)</Field>- <Field name="Auto Start Job">On a `Make` scan, drop the operator straight into the first operation in MES. Requires Auto Release. (`Make` only.)</Field>+ <Field name="Auto Release">On a `Make` scan, release the created job to the floor when it passes the release checks, instead of leaving it in draft. (`Make` only.)</Field>+ <Field name="Auto Start Job">On a `Make` scan, drop the operator straight into the first operation in MES. Requires Auto Release, and applies only when the job was released. (`Make` only.)</Field><Field name="Completion Barcode">The code operators scan to mark the job complete; auto-generated when left blank. (`Make` only.)</Field></FieldTable>@@ -37,10 +37,16 @@ The **order** scan (the create signal) branches on the replenishment system:<StatusFlow><Status name="Buy" accent>The scan finds an open (`Draft` or `Planned`) purchase order for that supplier and adds a line for the kanban's quantity. If none exists, it creates a new draft PO. It applies the kanban's conversion factor, purchase unit, and storage unit to the line, then drops you on the purchase order.</Status>- <Status name="Make">The scan creates a <Term id="job">job</Term> for the item at the kanban's quantity, copies the item's method onto it, and links the job back to the card. With **Auto Release** on, it also runs planning and scheduling and marks the job `Ready`; with **Auto Start Job** on, it sends the operator straight into the first operation in MES.</Status>+ <Status name="Make">The scan creates a <Term id="job">job</Term> for the item at the kanban's quantity, copies the item's method onto it, and links the job back to the card. With **Auto Release** on, it runs the release checks, then releases the job: it recalculates and plans it, marks it `Ready`, and schedules it. With **Auto Start Job** on, a released job sends the operator straight into the first operation in MES.</Status><Status name="Transfer">The scan creates a `Released` stock transfer for the kanban's quantity, from the From storage unit to the To storage unit, then drops you on the transfer. A scan always creates a transfer, whether or not the kanban has a replenishment level.</Status></StatusFlow>+<Callout type="warn" title="Auto Release can leave the job in Draft">+The scan runs the same checks as the job's **Release** dialog. When one fails, for example a material with no storage unit under [strict backflush](/docs/reference/strict-backflush), the job stays `Draft` and linked to the card. The scan opens the job page with the reason, so you can fix it and release the job from there. The same happens when the item's method could not be copied onto the job.++Outside operations go on the supplier's newest `Draft` purchase order, or a new one. Nobody at the card can choose an order, so an existing draft does not stop the release.+</Callout>+**Start** and **complete** scans only apply to `Make` kanbans. They resolve the linked job's active operation and hand off to the MES operation start / complete screens, so an operator can drive the whole build from the same card that created the job.<Callout type="warning">@@ -101,6 +107,15 @@ The reorder quantity is below 1. Each scan reorders a fixed amount, which must b### "There's already a job for this kanban."You scanned **order** on a `Make` kanban that already created a job (it's linked by `jobId`). Carbon won't make a duplicate — it routes you to the collision screen showing the existing job, where you can view it or remove the link so a fresh scan can start over. The link clears automatically once the job is completed or cancelled.+### "J… was created but not released: …"+An **order** scan on a `Make` kanban with Auto Release created the job, but it failed the release checks: nothing to make, manufacturing blocked, an assembly without operations, an outside operation without a supplier, or, under strict backflush, "set a Pull From storage unit on …". The job stays `Draft` and linked to the kanban, and the scan opens the job. Fix the named problem, then release the job from its **Release** dialog. The next scan of the card is a collision until the job is completed, cancelled or unlinked.++### "J… was created, but its method could not be copied. Use Get Method on the job before releasing it."+The `Make` scan created and linked the job, but copying the item's make method failed, so the job has no materials or operations. It is not released. Run **Get Method** on the job, then release it.++### "J…: The job is no longer Draft or Planned"+Someone released or cancelled the job while the scan was releasing it. Nothing else changed; open the job to see its status.+### "No job found for kanban"A **start** or **complete** scan ran on a kanban that has no linked job yet. Those actions only work on `Make` kanbans after an **order** scan has created the job — scan order first.diff --git a/docs/content/docs/reference/meta.json b/docs/content/docs/reference/meta.jsonindex 932653aa49..e1bf6fb19c 100644--- a/docs/content/docs/reference/meta.json+++ b/docs/content/docs/reference/meta.json@@ -13,6 +13,7 @@"scheduling","batching","kanban",+ "strict-backflush","mes","assembly-instructions","maintenance",diff --git a/docs/content/docs/reference/methods.mdx b/docs/content/docs/reference/methods.mdxindex 609da1c341..134d085ad2 100644--- a/docs/content/docs/reference/methods.mdx+++ b/docs/content/docs/reference/methods.mdx@@ -50,6 +50,8 @@ Methods are versioned: **Draft**, **Active**, or **Archived**. Only a Draft is eis frozen so jobs already running against it don't shift mid-build.</Callout>+With [strict backflush](/docs/reference/strict-backflush) on, a version cannot be made Active until each material pulled from stock has a **Pull From** storage unit.+## Related<Cards>diff --git a/docs/content/docs/reference/picking.mdx b/docs/content/docs/reference/picking.mdxindex fecd36a5e9..65148ebe24 100644--- a/docs/content/docs/reference/picking.mdx+++ b/docs/content/docs/reference/picking.mdx@@ -63,7 +63,7 @@ A pick is a **transfer**, never a consumption. Posting one writes two balanced <An **unpick** reverses the transfer, restores the warehouse source as the consumption point, and returns the line to **"Pending"**. And at job complete, any picked-but-unconsumed remainder is walked back from the lineside bin to the warehouse automatically, so leftover staged stock never gets stranded at the line.<Callout type="note">-Because a pick only moves stock and never checks availability first, on-hand at a bin can go negative — the same way shipping and issuing do. Carbon lets the floor proceed and reconciles later rather than blocking the work.+Because a pick only moves stock and never checks availability first, on-hand at a bin can go negative — the same way shipping and issuing do. Carbon lets the floor proceed and reconciles later rather than blocking the work. With [strict backflush](/docs/reference/strict-backflush) and **Prevent negative stock** on, a backflush is stopped instead when its storage unit is short.</Callout>## Relateddiff --git a/docs/content/docs/reference/strict-backflush.mdx b/docs/content/docs/reference/strict-backflush.mdxnew file mode 100644index 0000000000..4b35b7e0fd--- /dev/null+++ b/docs/content/docs/reference/strict-backflush.mdx@@ -0,0 +1,86 @@+---+title: Strict backflush+description: Backflush each material only from the storage unit on its material line, and stop the work when that storage unit is short.+---++By default, a <Term>backflush</Term> that finds its material's storage unit short takes the rest from another storage unit with stock. **Strict backflush** turns that off: each material is drawn only from the **Pull From** storage unit on its material line, so on-hand stays correct per storage unit.++<Screenshot label="Settings, Items page, Strict Backflush card with Strict backflush is on, Prevent negative stock on, and the active-methods and open-jobs gap rows" />++## Turn it on++You need permission to update settings.++<Steps>+ <Step>+ Open **Settings → Items** and find the **Strict Backflush** card under Bill of Materials.+ </Step>+ <Step>+ Turn on the first switch. It reads **"Strict backflush is on"**. Nothing asks for confirmation, and no existing method or job changes.+ </Step>+ <Step>+ Choose **Prevent negative stock** (on by default). On, an operation or job that would take its storage unit below zero is stopped until the stock is there. Off, the storage unit goes below zero and the work still completes.+ </Step>+ <Step>+ Press **Review** on each gap row the card shows: active methods with materials that have no Pull From, and open jobs with materials that have no storage unit. Each opens a searchable list. Fix a method through a new version, since an Active method cannot be edited.+ </Step>+</Steps>++## Which lines need a Pull From++A material line needs a Pull From when it is pulled from stock: its method type is not **Make to Order**, the item is a Part, Material or Consumable, and the item is not Non-Inventory. Purchase to Order, batch and serial lines count.++The rule applies only at a location that has an active work center and an active storage unit. At any other location, backflush works as if the setting were off. Set the Pull From in the [bill of materials](/docs/reference/methods): expand the line, then under **Pull From** pick the location and its storage unit. A line that is missing one shows a red **"No storage unit"** badge.++## What it stops++- **Activating a method version** with a line that has no Pull From.+- **Releasing a job** with a line that has no storage unit, from the job's **Release** dialog, bulk release, batch release, or a [kanban](/docs/reference/kanban) scan with Auto Release. A new job's line takes the BoM's Pull From, else the item's default storage unit for the location. It never takes the storage unit with the most stock.+- **Completing an operation or a job**, and **issuing a planned material**, when its storage unit is missing or short. The check runs before the quantity is recorded, so a refused completion records nothing.++<Callout type="warn" title="Picked material is used first">+Material already [picked](/docs/reference/picking) to the operation's lineside storage unit is consumed before the Pull From is checked. Only the rest must be in the Pull From storage unit. After a pick, the Pull From is the storage unit the oldest pick took the material from.+</Callout>++Batch- and serial-tracked materials still need a Pull From to activate and release, but the operator scans the unit to issue it, as before.++## Related++<Cards>+ <Card title="Methods" href="/docs/reference/methods">+ Where each material line's Pull From is set.+ </Card>+ <Card title="Jobs" href="/docs/reference/jobs">+ Release, backflush, and completion.+ </Card>+ <Card title="Picking" href="/docs/reference/picking">+ Staging material at the operation before it is consumed.+ </Card>+</Cards>++<AgentContext>+## Troubleshooting++The settings are `companySettings.requireBackflushStorageUnit` (default false) and `companySettings.preventNegativeBackflush` (default true, active only while strict is on). Both are saved by `updateItemsSettings`, which needs settings update. Not plan-gated.++### "Set a Pull From storage unit before you activate this version: …"+Activating a method version, or creating a new version of an item's only version, found a pulled line with no Pull From at a location with an active work center and an active storage unit. The message names up to 5 parts, then "and N more". Set the Pull From on each line, then activate again.++### "set a Pull From storage unit on …"+A release refused the job: a pulled line has no storage unit. The job's Release dialog shows "Missing Storage Units" and lists every part. Set the storage unit on each job material, or fix the method and run Get Method again, then release.++### "… has no Pull From storage unit on job …"+A completion or issue found a material with no storage unit. This is refused even with Prevent negative stock off. Set the storage unit on the job material.++### "Not enough … in …: need …, have …"+Prevent negative stock is on and the Pull From storage unit holds less than the backflush needs. One refusal lists every short material (3 shown, then "and N more"). Move or receive stock into that storage unit, then complete again, or turn off Prevent negative stock.++### "Units completed, but …"+The MES recorded the units, then the material issue failed. The strict check runs first, so this is rare. Issue the material by hand.++### "Could not check for active methods and open jobs with gaps. Reload the page to try again."+The Settings → Items card could not load its gap counts. Reload the page.++### The gap counts and the job I am looking at disagree+The open-jobs count includes only Ready, In Progress and Paused jobs at a location with an active work center and storage unit, and skips batch and serial lines and lines with nothing left to issue. Release, by contrast, also refuses batch and serial lines.+</AgentContext>