Quality Control
Define what to check, record the checks, and manage failures — the full quality chain from a reusable QC Plan, through inspections and per-parameter measurements, to Non-Conformance Reports and Corrective & Preventive Actions.
production/QualityControl. Access requires the Manufacturing module enabled
and the manufacturing_quality permission — otherwise you are redirected.
Inspections and NCRs link to Work Orders; see the
FAQ for the most common quality questions.
The quality chain at a glance
Quality Control has five connected parts. You build the template first (Plan + Parameters), then
execute (Inspection + Measurements), then handle problems (NCR → CAPA). Every record is numbered
automatically (QCP- / INS- / NCR- / CAPA- prefixes)
and everything is soft-deleted.
A reusable inspection template tied to an inspection type/stage. Parameters hang off it.
A single characteristic checked under a plan, with target / min / max spec and a unit.
An actual inspection event against a plan, with quantities, a status, and an overall result.
A recorded value for one parameter; pass/fail is auto-computed from the parameter's min/max.
A Non-Conformance Report for a defect, with severity, disposition, and status.
A Corrective and/or Preventive Action, usually tied to an NCR.
QC Plans
A QC Plan is a reusable inspection template. It says where in the flow the plan is used (Incoming, In-Process, Final, Periodic), how samples are chosen, and — through its parameters — exactly what gets measured. You build a plan once and run many inspections against it.
The QC Plans list (production/QualityControl) is the landing page. Use
Add QC Plan to open the plan modal; each row's cog menu offers View, Parameters,
and (below a divider) Edit and Delete. Columns 0–6 export to Excel.
QC Plan fields
| Field | Meaning | Required | Notes |
|---|---|---|---|
plan_code — Plan Code | Unique code identifying the QC plan. | Required | Auto-suggested next code on add (prefix qc_plan_prefix, default QCP, e.g. QCP-000001). Unique per plan. |
plan_name — Plan Name | Human name of the plan. | Required | Free text. |
product_id — Product ID | Optional product this plan applies to; blank = general / all products. | Optional | Plain number input — not a product picker. Stored as null when blank; the list shows the raw ID or -. |
inspection_type — Inspection Type | Where in the flow this plan is used. | Optional | Dropdown: Incoming, In-Process, Final, Periodic. Defaults to In-Process. |
inspection_stage — Inspection Stage | Free-text label for the stage / step inspected. | Optional | Free text. |
sampling_method — Sampling | How samples are chosen. | Optional | Dropdown: Random, 100%, Statistical. Defaults to Random. |
sample_size — Sample Size | Number of units to sample. | Optional | Numeric; null when blank. |
is_active — Status | Whether the plan is available for use. | Optional | Dropdown Active / Inactive; defaults Active. Only Active plans appear in the inspection plan dropdown. |
QC Plan view & legends
Opening View shows a read-only summary — Plan Code, Type, Stage, Status badge, Sampling Method, Sample Size — plus the parameters table (Parameter, Type, Target, Min, Max, UOM, Critical) and a Manage Parameters button. If the plan has none, it shows "No parameters defined".
Inspection Type colours on the plan list:
QC Parameters
A QC Parameter is a single characteristic checked under a plan — a dimension, a visual check,
an attribute, or a functional test. Open a plan's Parameters screen
(production/QualityControl/parameters/{qc_plan_id}) and use the inline add-parameter row to
add each one. The list is ordered by sort order then name.
QC Parameter fields
| Field | Meaning | Required | Notes |
|---|---|---|---|
parameter_name — Parameter | Name of the characteristic being measured. | Required | Free text, entered on the inline form. |
parameter_type — Type | Kind of check. | Required | Dropdown: Measurement, Visual, Attribute, Functional. |
target_value — Target | The ideal / nominal value for the parameter. | Optional | Decimal (step 0.0001); shown to 4 decimals. Not used in the pass/fail check. |
specification_min — Min | Lower acceptable spec limit. | Optional | Drives auto pass/fail: a value below Min = FAIL. |
specification_max — Max | Upper acceptable spec limit. | Optional | Drives auto pass/fail: a value above Max = FAIL. |
uom_id — UOM | Unit of measure for the parameter. | Optional | Dropdown of active Manufacturing UOMs, shown as name (symbol). |
is_critical — Critical | Marks the parameter as a critical characteristic. | Optional | Checkbox; defaults off. Shows a red Critical badge vs. a grey Standard badge. |
measurement_method — Measurement Method | How the parameter is measured. | Optional | Accepted by the save action but has no input field in the current form (blank in practice). |
tolerance_percentage — Tolerance % | Percent tolerance for the parameter. | Optional | Accepted by the save action but has no input field; not used in pass/fail. |
sort_order — Sort Order | Display order of parameters. | Optional | No input field; defaults 0. The list orders by sort order then name. |
Parameter type & criticality legends
specification_min
and specification_max. If a parameter has neither, every measured value is recorded as
PASS. Set Min/Max on any parameter you actually want the system to judge.
Inspections
An Inspection is an actual inspection event executed against a QC plan. It carries the material
identifiers (lot / batch), the quantities inspected / passed / failed, a workflow Status, and a
final Overall Result. Open the Inspections list
(production/QualityControl/inspections) and click New Inspection; the list has a
Status filter and exports columns 0–8 to Excel. Each row's cog menu offers View,
Measurements, and (below a divider) Edit and Delete.
Inspection fields
| Field | Meaning | Required | Notes |
|---|---|---|---|
inspection_number — Inspection # | Unique code for the inspection event. | Required | Auto-suggested (prefix inspection_prefix, default INS, e.g. INS-000001). |
qc_plan_id — QC Plan | Plan this inspection is performed against. | Required | Dropdown of ACTIVE plans only, shown code - name. Determines which parameters can be measured. |
order_id — Work Order | The manufacturing work order being inspected. | Optional | Dropdown of work orders shown order_number - product_name. Nullable. See Work Orders. |
operation_id — Operation | Specific operation within the order. | Optional | Accepted by the save action but no input field in the form; stored null. |
inspection_date — Date | Date the inspection was performed. | Required | Date input; defaults to today on new. |
lot_number — Lot Number | Lot identifier of inspected material. | Optional | Free text. |
batch_number — Batch Number | Batch identifier of inspected material. | Optional | Free text. |
quantity_inspected — Inspected | Quantity of units inspected. | Optional | Numeric (step 0.01); defaults 0. Drives Pass Rate = passed ÷ inspected × 100. |
quantity_passed — Passed | Quantity that passed. | Optional | Numeric; defaults 0. Manually entered — not auto-summed from measurements. |
quantity_failed — Failed | Quantity that failed. | Optional | Numeric; defaults 0. Manually entered. |
status — Status | Workflow state of the inspection. | Optional | Dropdown Pending / In Progress / Passed / Failed / Conditional; defaults Pending. Free-set — no enforced transitions. |
overall_result — Overall Result | Final verdict of the inspection. | Optional | Dropdown Select / Pass / Fail / Conditional. Drives the Result Summary badge and pass-rate panel. Manually chosen. |
notes — Notes | Free-text inspection notes. | Optional | Textarea; shown with line breaks on the view. |
Inspection view
Opening View (inspection_view/{id}) shows the Inspection Details panel (number, QC Plan,
Work Order, Type, Date, Lot, Inspector, Status badge), three count cards
(Inspected / Passed / Failed), the Result Summary badge (the overall result) and
the Pass Rate %, then the Measurements section with an Add Measurement button and the
measurements table (Parameter, Target Value, Actual Value, UOM, Result, Measured By, Date).
Pass Rate = quantity_passed ÷ quantity_inspected × 100, shown only when Inspected > 0.
Inspection status lifecycle
Overall Result (Result Summary badge)
The Overall Result is the manually chosen final verdict, shown as a large Result Summary badge on the inspection view. It is independent of Status and set by hand.
Recording Measurements
A Measurement is the recorded value for one parameter during an inspection. There are two ways to enter them:
From the inspection row cog menu choose Measurements to open the bulk-entry grid
(record_measurements/{inspection_id}). It lists every parameter of the inspection's
plan with its Target / Min / Max / UOM and an inline row form (Measured Value + Notes + Save). Critical
parameters carry a Critical badge. A Back button returns to the inspection view.
From the inspection view, Add Measurement opens a single-measurement modal
(measurement_modal_form/{inspection_id}): pick the Parameter (dropdown of the plan's
parameters, label includes the UOM symbol), type the Measured Value, add optional Notes, then
Save.
Measurement fields
| Field | Meaning | Required | Notes |
|---|---|---|---|
parameter_id — Parameter | Which parameter this measurement is for. | Required | Dropdown of the plan's parameters (label includes UOM symbol). Stored as qc_parameter_id. |
measured_value — Measured Value | The observed value for the parameter. | Required | Numeric (step 0.0001). Pass/fail is auto-computed against Min / Max. |
text_value — Text Value | Non-numeric measurement value. | Optional | DB column exists and displays as a fallback when Measured Value is null, but there is no input to enter it. |
result — Result | Pass / Fail / N/A outcome. | Auto | System-set: Fail if value < Min or > Max, else Pass. Not user-editable. |
measured_by — Measured By | User who recorded the measurement. | Auto | Set to the logged-in user. |
measured_at — Date | When it was recorded. | Auto | Set to the current UTC time. |
How pass/fail is decided
When you save a measurement, the system compares the Measured Value to the parameter's spec limits:
On a successful save you see a dynamic toast: "Measurement recorded - PASS" or "Measurement recorded - FAIL", depending on the auto-computed result.
quantity_passed / quantity_failed, Status, and Overall Result are
all entered manually. There is no automatic roll-up from measurement results to the inspection verdict, so
edit the inspection afterwards to set the final counts and verdict yourself.
measured_value (numeric) can be entered — there is no input for a text
value. Visual / Attribute / Functional parameters must still be given a numeric value to save a measurement.
NCR — Non-Conformance Report
A Non-Conformance Report (NCR) records a defect / non-conformance — usually from a failing
inspection. It captures the severity, a description, the disposition of the affected material, and a
workflow status. Open the NCR list (production/QualityControl/ncr) and click
New NCR; the list has Severity and Status filters. Each row's cog menu offers Edit,
CAPA, and (below a divider) Delete.
NCR fields
| Field | Meaning | Required | Notes |
|---|---|---|---|
ncr_number — NCR # | Unique NCR code. | Required | Auto-suggested (prefix ncr_prefix, default NCR, e.g. NCR-000001). |
inspection_id — Inspection | Inspection the defect came from. | Optional | Dropdown of inspection numbers. Nullable. |
order_id — Work Order | Related work order. | Optional | Dropdown of work orders. Nullable. See Work Orders. |
defect_type — Defect Type | Short label of the defect category. | Required | Free text. Form-required; defaults to general server-side if posted empty. |
defect_description — Description | Detailed description of the defect. | Required | Textarea. Server-validated required. |
severity — Severity | How serious the defect is. | Required | Dropdown Critical / Major / Minor. Defaults to Major if posted empty. |
quantity_affected — Qty Affected | Quantity of units affected by the defect. | Optional | Numeric (step 0.01). |
root_cause — Root Cause | Identified root cause of the defect. | Optional | Textarea. |
disposition — Disposition | Decision on what to do with the affected material. | Optional | Dropdown Select / Use As Is / Rework / Scrap / Return to Supplier. |
estimated_cost — Estimated Cost | Estimated cost impact of the NCR. | Optional | Numeric (step 0.01); defaults 0. |
status — Status | Workflow state of the NCR. | Optional | Dropdown Open / Investigating / Action Taken / Closed / Rejected; defaults Open. Free-set. |
NCR severity legend
NCR status lifecycle
Disposition legend
CAPA — Corrective & Preventive Action
A CAPA is an action to fix a problem (Corrective) and/or prevent it recurring
(Preventive), usually tied to an NCR. Open the CAPA list
(production/QualityControl/capa) and click New CAPA; the list has Type and Status
filters. Each row's cog menu offers Edit and (below a divider) Delete. You can also reach an
NCR's CAPAs contextually via CAPA for NCR (from the NCR row's CAPA action), which shows the
NCR's details plus every CAPA raised against it with a New CAPA button.
CAPA fields
| Field | Meaning | Required | Notes |
|---|---|---|---|
capa_number — CAPA # | Unique CAPA code. | Required | Auto-suggested (prefix capa_prefix, default CAPA, e.g. CAPA-000001). |
ncr_id — Related NCR | NCR this action addresses. | Optional | Dropdown of NCRs shown number - first 50 chars of description. Not prefilled — even from CAPA for NCR you must pick it manually. |
capa_type — Type | Corrective (fix the current problem) or Preventive (prevent recurrence). | Required | Dropdown Corrective / Preventive; defaults Corrective. |
priority — Priority | Urgency of the action. | Optional | Dropdown Low / Medium / High / Critical; defaults Medium. |
title — Title | Short title of the CAPA. | Required | Free text. Server-validated required. |
description — Description | What the action is. | Required | Textarea. Server-validated required. |
root_cause — Root Cause | Root cause being addressed. | Optional | Textarea. |
action_plan — Action Plan | Steps to be taken. | Optional | Textarea. |
assigned_to — Assigned To | Staff user responsible for the action. | Optional | Dropdown of active staff users (first + last name). |
due_date — Due Date | Deadline for completing the action. | Optional | Date input. |
status — Status | Workflow state of the CAPA. | Optional | Dropdown Open / Assigned / In Progress / Verification / Completed / Cancelled; defaults Open. Free-set. |
verification_method — Verification Method | How effectiveness will be verified. | Optional | Textarea. |
CAPA type & priority legends
CAPA status lifecycle
SOP — Run an inspection and handle a failure
This is the core end-to-end procedure: run an inspection, record measurements, and — when something fails — raise an NCR and open a CAPA against it.
manufacturing_quality permission, and an Active QC plan with
parameters (build one first via QC Plans and Parameters).
-
Create the inspection
Go to Quality Control → Inspections and click New Inspection. Accept the suggested Inspection #, choose the QC Plan (only Active plans are listed), optionally choose the Work Order, set the Date and Lot / Batch, enter Quantity Inspected, set Status to In Progress, then Save.
-
Record measurements
From the inspection row cog menu choose Measurements (or open View then Add Measurement). For each parameter type the Measured Value and optional Notes and Save the row. Watch the toast — "Measurement recorded - PASS" or "- FAIL" — based on the parameter's Min / Max.
-
Finalise the inspection
Edit the inspection to record the final Quantity Passed / Failed, then set the inspection Status (Passed / Failed / Conditional) and Overall Result manually. These do not roll up from the measurements, so set them to match what you observed.
-
Raise an NCR on failure
Go to Quality Control → NCR and click New NCR. Accept the NCR #, link the failing Inspection and/or Work Order, enter Defect Type, Severity, and Description; optionally set Root Cause, Qty Affected, Disposition, and Estimated Cost. Leave Status Open and Save.
-
Investigate and dispose
As you investigate, edit the NCR to fill Root Cause and set the Disposition (Use As Is / Rework / Scrap / Return to Supplier), moving the Status to Investigating then Action Taken. Remember to adjust Inventory separately — QC does not move stock.
-
Open a CAPA against the NCR
From the NCR row cog menu click CAPA to open CAPA for NCR, then New CAPA. Accept the CAPA #, manually select the Related NCR, choose Corrective (and/or add a Preventive CAPA), fill Title, Description, Action Plan, Assigned To, Due Date, and Verification Method, then Save.
-
Close the loop
Progress the CAPA status Assigned → In Progress → Verification → Completed. When the actions are effective, set the NCR Status to Closed.
Actions, confirmations & messages
Every list row's cog menu drives the same handful of actions. Delete is a soft delete and always asks for confirmation; other actions save directly.
| Action | What it does | Confirmation |
|---|---|---|
| Save plan / inspection / NCR / CAPA | Creates or updates the record; on new it stamps the creator and timestamps and returns the row into the list. | None |
| Add parameter | Inserts a new parameter under the plan (always an insert — never an edit). The page reloads on success. | None |
| Add / save measurement | Inserts a measurement and auto-computes Pass/Fail; stamps Measured By and time. Does not update the inspection. | None |
| Delete (any record type) | Soft-deletes the record (deleted = 1). | Standard delete-confirmation dialog |
Validation & result messages
- QC Plan: Plan Code and Plan Name required.
- Parameter: QC Plan, Parameter, and Type required.
- Inspection: Inspection #, QC Plan, and Date required.
- Measurement: Inspection, Parameter, and Measured Value (numeric) required.
- NCR: NCR # and Description required.
- CAPA: CAPA #, Title, and Description required.
Permissions & access
The whole Quality Control controller is gated by a single module-level permission, plus the Manufacturing module switch.
| Permission | What it gates | Notes |
|---|---|---|
manufacturing_quality | Access to the entire Quality Control controller — plans, parameters, inspections, measurements, NCR, and CAPA. | Category "Manufacturing: Quality Control", action "Manage Quality Control". Also requires the manufacturing module enabled. |
manufacturing_quality_create | Declared as "Create QC Records". | Not separately enforced — create runs under manufacturing_quality. |
manufacturing_quality_update | Declared as "Update QC Records". | Not separately enforced. |
manufacturing_quality_delete | Declared as "Delete QC Records". | Not separately enforced — delete runs under manufacturing_quality. |
manufacturing_quality can create, edit, and
delete all QC records — the create/update/delete keys are declared but not checked. Access also
requires both the Manufacturing module enabled and the manufacturing_quality permission,
or the user is redirected. Grant the permission only to your quality team.
Integrations & how records connect
Quality Control reads a few Manufacturing masters and links its own records into a chain.
- Manufacturing UOM
- Parameters and measurements reference a unit via
uom_id, shown asname (symbol)from active UOMs. - Work Orders
- Inspections and NCRs can link to a work order via
order_id; dropdowns showorder_number - product_name. See Work Orders. - Users
- Inspector, Measured By, Reported By, Assigned To, Closer, Verifier, and Creator all resolve to user names. CAPA "Assigned To" lists active staff users.
- Manufacturing Settings
- Numbering prefixes come from settings keys
qc_plan_prefix,inspection_prefix,ncr_prefix, andcapa_prefix. - Product linkage
- Loose:
product_idon plans/NCRs is a plain integer with no product picker — easy to mistype.
The internal chain runs QC Plan → QC Parameters → Inspection → Measurements → NCR → CAPA:
| From | Links via | To |
|---|---|---|
| QC Plan | parameters hang off the plan | QC Parameters |
| Inspection | qc_plan_id | QC Plan (and its parameters) |
| Measurement | qc_parameter_id + inspection_id | Parameter & Inspection |
| NCR | inspection_id / order_id | Inspection / Work Order |
| CAPA | ncr_id | NCR (reachable via CAPA for NCR) |