Work Centers
A work center is a production resource — a machine, line, or station — with a throughput rating (capacity per hour) and a running cost (cost per hour). You set them up once, and your routing points to them so ERPat knows where each manufacturing step happens and what it costs.
production/Work_centers).
production/Work_centers, permission production_work_center) is the
simple master register documented here. A separate, more advanced Work Centers (Mfg) screen
(menu Manufacturing, URL production/WorkCenters, permission
manufacturing_work_center) lives under the Advanced Manufacturing sub-area — it is a
distinct feature with its own data and permissions. Don't confuse the two.
What a work center is
Think of a work center as any place where a production step actually happens: an assembly line, a CNC mill, a mixing vat, a packaging bench. For each one you record:
- Name
- The human label for the station (e.g. Assembly Line 1, CNC Mill A).
- Code
- An optional short reference identifier (e.g.
WC-001). - Capacity / hour
- How many units the station can process or produce in one hour — its throughput rating.
- Cost / hour
- The hourly operating cost of running the station, used in production costing.
- Description
- Free-text notes — what it does, its location, remarks.
- Status
- Whether it is currently in use (Active) or retired / paused (Inactive).
These records are the reference resources your routing points to. When a Bill of Materials operation (or an advanced Work Order operation) says "this step runs on this station," the station it names is a work center you defined here.
- Select work center - dropdown wherever routing operations are defined, and their
Cost / hour and Capacity / hour feed the downstream costing and scheduling logic.
The Work Centers list
The landing screen is a searchable, sortable DataTable (#work-centers-table) of every
work center. Along the top-right is an Add Work Center button (shown only if you have create
permission) and a table refresh button that reloads the data without a full page reload. The
list is always sorted by Work Center name ascending.
List columns
| Column | Meaning | Required | Notes |
|---|---|---|---|
code — Code |
The optional short reference identifier for the station. | Optional | Shows - when the code is blank. |
title — Work Center |
The display name of the station. | Required | This is the default sort column (ascending). |
capacity_per_hour — Capacity / hour |
Rated throughput, in units per hour. | Optional | Right-aligned; formatted via convert_number_to_decimal. |
cost_per_hour — Cost / hour |
Hourly operating cost of the station. | Optional | Right-aligned; formatted as currency via to_currency(), so it renders in the tenant's configured currency. |
status — Status |
Active or Inactive. | Optional | Center-aligned, shown as a coloured label (green = Active, gray = Inactive). |
created_by — Created by |
The user who originally created the record. | Display only | Set automatically on create; resolved to a name via get_user_legal_name(). |
| Options | Per-row action buttons. | — | A pencil (Edit) and an X (Delete), each shown only if you hold the matching permission. |
The Add / Edit form
Adding and editing use the same modal form (production/Work_centers/modal_form).
A hidden id field decides whether you are creating (empty) or updating (populated). The
modal title reads Add Work Center in create mode and Edit Work Center in edit mode.
The Work Center name field is autofocused when the modal opens, and the footer holds a single
Save button (with a check-circle icon) — there is no close button in the footer; the
× lives in the modal header, per house style.
Field reference
| Field | Meaning | Required | Notes |
|---|---|---|---|
title — Work Center |
The display name of the work center / station (e.g. Assembly Line 1, CNC Mill A). | Required | Required at both client (data-rule-required, message "This field is required.") and server (rule required). Autofocused when the modal opens. DB column title VARCHAR(255) NOT NULL. Labeled Work Center in the list; the default sort column. |
code — Code |
An optional short identifier / reference code (e.g. WC-001). |
Optional | Free text. Stored as an empty string when blank; shown as - in the list. DB column code VARCHAR(50) NULL. Not auto-generated and not enforced unique. |
capacity_per_hour — Capacity / hour |
How many units the station can process / produce per hour — its throughput rating. | Optional | Numeric input (type=number, step=any). Passed through convert_number_to_decimal on save. DB column capacity_per_hour DECIMAL(15,2) NOT NULL default 0 — blank saves as 0.00. |
cost_per_hour — Cost / hour |
The hourly operating cost of running this station, used for production costing. | Optional | Numeric input (type=number, step=any). Passed through convert_number_to_decimal on save; displayed via to_currency() in the list. DB column cost_per_hour DECIMAL(15,2) NOT NULL default 0 — blank saves as 0.00. |
description — Description |
Free-text notes about the work center (what it does, location, remarks). | Optional | Textarea. Stored as an empty string when blank. DB column description TEXT NULL. |
status — Status |
Whether the work center is currently in use (Active) or retired / paused (Inactive). | Optional | Select2 dropdown with two options: Active, Inactive. Defaults to active on new records and whenever left blank. DB column status VARCHAR(20) NOT NULL default 'active'. |
id — (hidden) |
Internal record identifier: empty for a new work center, populated when editing. | System | Hidden form field. Its presence / absence drives the create-vs-update permission check and whether created_by / created_at are stamped. Validated as numeric. |
.length (not :visible), per house convention.
Status: Active & Inactive
A work center has exactly two states, and it is not a workflow — you simply pick one in the Status dropdown. There is no submit / approve / complete progression. The "lifecycle" below is just the toggle between the two states.
You move freely both ways: edit the record, change the Status dropdown, and Save. Active → Inactive to take a station out of service; Inactive → Active to bring it back.
label-success).label-default).active whenever it is left blank — you cannot save a work center
with no status. To take a station out of service, set it to Inactive rather than deleting
it, so historical references from BOM and manufacturing-order operations stay intact.
Actions & permissions
Every button on this screen is gated by a permission key. Buttons only render when you hold the matching permission, and the server re-checks on save and delete.
| Action | What it does | Confirm? | Permission key |
|---|---|---|---|
| Add Work Center | Opens the modal form in create mode (empty form; status defaults to Active). The button only renders when you have create permission. | None | production_work_center_create (button visibility; the modal re-checks and redirects if missing). |
| Edit (pencil) | Opens the modal pre-filled with that work center's values for editing. Row button only renders if you have update permission. | None | production_work_center_update (row button + modal access; redirects if missing). |
| Save | Submits the form to production/Work_centers/save. Server validates, builds the data, and inserts (no id) or updates (id present). On create it also stamps created_by and created_at. The new / updated row is pushed live into the list. |
None | production_work_center_create (new) or production_work_center_update (edit) — re-checked server-side; returns no_permission if missing. |
| Delete (X) | Soft-deletes the work center (sets deleted=1). Row button only renders if you have delete permission. |
Yes — standard delete confirmation. | production_work_center_delete (row button + server check; returns no_permission if missing). |
| Table refresh | Reloads the list from production/Work_centers/list_data without a full page reload. |
None | None beyond page access (production_work_center). |
Permission keys in full
| Key | Grants |
|---|---|
module_production | Master gate — the Production module must be enabled for the whole area to be reachable. |
production_work_center | View the Work Centers page (constructor gate with_module production + with_permission production_work_center); also gates the sidebar menu item. |
production_work_center_create | See the Add Work Center button and create / save a new work center. |
production_work_center_update | See the row Edit button, open the edit modal, and save an update. |
production_work_center_delete | See the row Delete button and delete a work center. |
SOP · Add a work center
production_work_center_create.
Open the screen
In the sidebar, expand Production and click Work Centers (URL
production/Work_centers).Start a new record
Click the Add Work Center button at the top-right. The modal opens in create mode with the cursor already in the Work Center name field.
Name the station
In Work Center, type the station name (e.g. Assembly Line 1). This field is required — leaving it blank raises "This field is required."
Add a code (optional)
Enter a short Code such as
WC-001if you use them. It is optional and not enforced unique.Enter rates
Fill in Capacity / hour (units the station can produce per hour) and Cost / hour (its hourly running cost) if known. Remember a blank saves as 0.00, not "unknown".
Describe it (optional)
Add a Description — what it does, where it is, any remarks.
Leave status Active
Keep Status on Active (the default) unless the station is already retired.
Save
Click Save. On success you'll see "The record has been saved." and the new work center appears immediately in the list without a page reload.
Other common procedures
Update a cost rate
Find the station
Go to Production → Work Centers and locate the row using the DataTable search / sort.
Edit
Click the pencil (Edit) icon on its row to open the pre-filled modal.
Change the rate
Update Cost / hour (and / or Capacity / hour) to the new value.
Save
Click Save; the row updates in place. Keeping these rates current keeps downstream costing accurate.
Retire a station without deleting it
Edit the row
Go to Production → Work Centers and click Edit on the target station.
Set Inactive
Open the Status dropdown and choose Inactive.
Save
Click Save. The row's status label turns to Inactive, but all historical references to it remain intact.
Remove a work center created by mistake
deleted=1);
the record is filtered out of every list but never physically removed. To take a still-referenced
station out of service, set it Inactive instead.
Open the list
Go to Production → Work Centers.
Delete
Click the X (Delete) icon on the row.
Confirm
Answer the confirmation prompt (quoted below). On confirm it POSTs to
production/Work_centers/delete.Check the result
On success you'll see "The record has been deleted." If the station is referenced elsewhere, the delete is blocked (see the danger box below).
Messages you may see
| Situation | Message | Lang key |
|---|---|---|
| Required field missing (client) | "This field is required." (on the Work Center name) | field_required |
| Save succeeds (create or update) | "The record has been saved." | record_saved |
| Save fails | "Sorry, an error occurred during processing the action! Please try again later." | error_occurred |
| Delete succeeds | "The record has been deleted." | record_deleted |
| Delete blocked (in use) | "The record is in use, you can't delete the record!" | record_cannot_be_deleted |
| Delete confirmation | "Are you sure? In some cases, you won't be able to undo this action!" | delete_confirmation_message |
| No permission on save / delete | Returns a no_permission response; opening the modal / page without permission redirects. | — |
Server-side validation: title is required; id
must be numeric on save (or required|numeric on delete).
Where work centers are used
Work centers are pure reference data — this screen doesn't read or write Inventory tables. Instead, other parts of Production point at the work centers you define here:
Their Cost / hour and Capacity / hour then feed the downstream
costing and scheduling logic wherever those operations are used. The
Created by column is resolved by a read-only join to the users table.
Good-to-know
production/Work_centers, permission production_work_center) is separate from the advanced Work Centers (Mfg) screen (menu Manufacturing, production/WorkCenters, permission manufacturing_work_center). Different features, different data, different permissions.deleted=1; records are never physically removed and stay filtered out by deleted=0 in every query.NOT NULL default 0, so a blank saves as 0.00. Enter the real values if you rely on costing.- in the list.title ascending) at the model level, in addition to the DataTable's own default sort on the name column.to_currency() in the list, so it appears in the tenant's configured currency format even though it is stored as a plain decimal.