Quality Management
Quality touches every process: what you receive, what you make, what you ship, and what comes back. In regulated industries it’s the module that keeps the company licensed.
The quality processes
INCOMING IN-PROCESS FINAL CUSTOMER
Goods receipt → During production → Before ship → Complaints
inspection checks inspection returns
│ │ │ │
└─────────────────┴──────────────────┴──────────────┘
│
Non-conformance → Investigation → CAPA
│
Supplier quality / Audits / Certification
Inspection lots
The core transactional object:
inspection_lot(
id, lot_number, inspection_type,
material_id, batch, plant_id, storage_location,
reference_document, -- PO, production order, delivery
quantity_inspected, uom,
inspection_plan_id, sample_size,
status, -- CREATED | IN_INSPECTION | RESULTS_RECORDED | CLOSED
usage_decision, -- ACCEPT | REJECT | ACCEPT_WITH_DEVIATION | REWORK | SCRAP
decision_by, decision_at,
created_at, due_date
)
inspection_characteristic_result(
lot_id, characteristic_id, sample_number,
measured_value, unit, qualitative_result,
lower_spec, upper_spec, target,
evaluation, -- OK | NOK
inspector_id, recorded_at, equipment_id
)
Inspection lots are created automatically by: goods receipt, production confirmation, delivery creation, batch expiry re-inspection, or a periodic stock inspection schedule.
Inspection plans
Inspection plan for Fabric RM-300, incoming inspection
Char Description Type Target LSL USL Method Sample
0010 Visual defects Qualitative — — — Visual AQL 2.5
0020 GSM (weight) Quantitative 180 175 185 Balance 5 pcs
0030 Colour match Qualitative — — — Lightbox 3 pcs
0040 Shrinkage % Quantitative 3.0 — 4.0 Wash test 2 pcs
0050 Tensile strength Quantitative 450 400 — Tensometer 3 pcs
Characteristic types:
- Quantitative — a measured value against a specification range
- Qualitative — pass/fail against a catalogue of defect codes
- Required vs optional — some characteristics are mandatory for the usage decision
- Destructive — the sample is consumed and must be scrapped
Sampling
Testing everything is usually impossible or uneconomic. Statistical sampling decides how much to check.
AQL — Acceptable Quality Level (ISO 2859 / ANSI Z1.4)
Lot size 1,200, General Inspection Level II, AQL 2.5
→ Sample size code letter K → sample 125 units
→ Accept if ≤ 7 defects, reject if ≥ 8
Skip-lot and reduced inspection: a supplier with a consistent record earns reduced sampling; a failure moves them to tightened inspection. This is both a cost saving and a supplier incentive.
Sampling procedures
- 100% inspection — critical characteristics, safety items
- Fixed sample — always N units
- Percentage — 5% of the lot
- AQL-based — statistically derived, the standard for incoming goods
- Skip lot — inspect every Nth lot
- Dynamic modification rules — the level moves automatically based on recent history
Usage decision
The formal outcome that releases or blocks the stock:
| Decision | Stock movement |
|---|---|
| Accept | Inspection stock → unrestricted |
| Accept with deviation | Unrestricted, with a documented concession and approval |
| Rework | To rework order, then re-inspect |
| Reject / return to vendor | Return delivery, vendor claim |
| Scrap | Written off |
| Downgrade | Moved to a lower-grade material or valuation type |
The decision must be traceable: who decided, when, on what evidence, and under what authority. In regulated industries only a qualified person (QP) may release, and the system must enforce that.
Statistical Process Control (SPC)
Monitoring a process to detect drift before it produces defects.
Control chart (X-bar and R):
UCL ─────────────────────────────────────
●
● ●
CL ──────●───────●───────────●──────────
● ●
●
LCL ─────────────────────────────────────
Western Electric / Nelson rules flag out-of-control conditions:
- Any point beyond 3σ
- 9 consecutive points on one side of the centre line
- 6 consecutive increasing or decreasing
- 14 alternating up/down
- 2 of 3 beyond 2σ on the same side
Process capability
Cp = (USL − LSL) / 6σ potential capability
Cpk = min[(USL − μ), (μ − LSL)] / 3σ actual, accounting for centring
Cp = 1.33 → capable (4σ)
Cp = 2.00 → six sigma
Cpk < Cp → the process is capable but off-centre
The Cp vs Cpk gap is diagnostic: if Cp is fine and Cpk is poor, you don’t need a better machine, you need to re-centre the setting. That distinction saves capital expenditure.
Non-conformance and CAPA
Non-conformance detected
▼
NC record: what, where, when, how much, severity
▼
Immediate containment: quarantine stock, stop the line, trace forward and back
▼
Investigation: root cause analysis
▼
Correction: fix this instance
Corrective: fix the cause so it doesn't recur
Preventive: fix similar risks elsewhere
▼
Effectiveness check (after N days/units — did it actually work?)
▼
Close
Root cause techniques: 5 Whys, Ishikawa/fishbone (Man, Machine, Material, Method, Measurement, Environment), 8D (the automotive standard), FMEA, fault tree analysis.
The effectiveness check is the step everyone skips, and it’s the one that distinguishes a real CAPA system from a paperwork exercise. If you build CAPA workflow, make the effectiveness check a mandatory, scheduled, un-skippable task.
Certificates
| Certificate | Content |
|---|---|
| CoA — Certificate of Analysis | Actual measured results for a specific batch |
| CoC — Certificate of Conformance | A statement that it meets specification |
| Mill certificate / EN 10204 3.1 | Material composition, for metals |
| Test report | Full inspection results |
Customers demand CoAs with every shipment in chemicals, pharma, food, and metals. The CoA is generated from inspection results for that specific batch — which means the traceability chain from delivery → batch → inspection lot → characteristic results must be complete and queryable. Build it as a report early; it’s requested constantly.
Supplier quality
supplier_quality_score(
vendor_id, material_group, period,
ppm_defective, -- parts per million
lots_accepted, lots_rejected, acceptance_rate,
on_time_delivery_pct,
complaint_count, complaint_severity_weighted,
corrective_action_response_days,
audit_score, certification_status,
overall_score, classification -- A | B | C | BLOCKED
)
Uses: source list restriction (only A and B suppliers for critical materials), quota arrangements weighted by score, inspection level (A suppliers get skip-lot), and commercial negotiation.
Supplier complaints / 8D — a formal claim to the vendor with a required response, tracked to closure, often with a cost recovery claim attached.
Quality costs
The classic framework — and the argument for investing in prevention:
| Category | Examples |
|---|---|
| Prevention | Training, process design, supplier development, FMEA |
| Appraisal | Inspection, testing, calibration, audits |
| Internal failure | Scrap, rework, downgrading, re-inspection |
| External failure | Warranty, returns, recalls, complaints, lost customers, liability |
The rule of ten: a defect costs ~10× more to fix at each stage it escapes. Caught at incoming inspection: ₹100. On the line: ₹1,000. At final inspection: ₹10,000. At the customer: ₹100,000. In a recall: unbounded.
A quality cost report by category is a genuinely high-impact thing to build, because it converts quality from a compliance conversation into a financial one.
Standards and regulation
| Standard | Domain |
|---|---|
| ISO 9001 | General quality management systems |
| IATF 16949 | Automotive — adds APQP, PPAP, FMEA, MSA, SPC |
| AS9100 | Aerospace |
| ISO 13485 | Medical devices |
| GMP / cGMP | Pharma and food manufacturing |
| HACCP / ISO 22000 / FSSC | Food safety |
| 21 CFR Part 11 | FDA electronic records and signatures |
| ISO 17025 | Testing laboratory competence |
Automotive core tools (IATF 16949)
- APQP — Advanced Product Quality Planning, the phased launch process
- PPAP — Production Part Approval Process; the customer approves your part and process before you may ship
- FMEA — Failure Mode and Effects Analysis, with Risk Priority Numbers
- MSA — Measurement System Analysis (gauge R&R): is your measuring device itself reliable?
- SPC — as above
If you work on an automotive supplier’s ERP, these five acronyms will appear in every requirement document.
Calibration
Measuring equipment that has drifted invalidates every measurement it took since the last good calibration.
equipment(id, code, type, location, manufacturer, serial,
calibration_interval_days, last_calibration, next_calibration,
status, certificate_reference)
Requirements: calibration schedule with alerts, block use of overdue equipment, retain certificates, and — critically — traceability from inspection results back to the equipment used, so that a failed calibration can trigger a review of everything it measured.
Developer notes
- Inspection lots are created automatically by other processes. Get the triggers right, or QC never sees the stock.
- Stock in inspection is a distinct stock type — not available to sell, but on the balance sheet.
- Usage decision drives a stock movement. They are one transaction, not two.
- Results are append-only. A correction is a new recorded result with a reason, never an overwrite.
- CoA generation must be a first-class report from batch + inspection results.
- Specification limits are versioned and dated. A batch is judged against the spec in force at the time.
- In regulated environments: audit trail on everything, electronic signature on decisions, and a validated system. Design for it from the start; retrofitting Part 11 compliance is brutal.