Inspect the quality of items
A Quality Inspection records the result of checks on an item: readings for each parameter, and a status of Accepted or Rejected. You can inspect items that you receive, items that you deliver, and items in production. ERPNext can block a receipt or a delivery until a Quality Inspection for the item is submitted.
Prerequisites
- The Item exists.
- To require an inspection, select one or both checkboxes in the Item:
- Inspection Required before Purchase: you must inspect the item before you submit a Purchase Receipt, Purchase Invoice, or Subcontracting Receipt for it.
- Inspection Required before Delivery: you must inspect the item before you submit a Delivery Note or Sales Invoice for it.
- Optional: a Quality Inspection Template for the item (see the next section).

Set up a Quality Inspection Template
A Quality Inspection Template holds the parameters to check and their acceptance criteria. ERPNext copies them into each Quality Inspection for the item, so you set them up once.
- Open the Quality Inspection Template list and create a template.
- Enter a Quality Inspection Template Name.
- In the parameters table, add one row for each check. Select a Parameter, and set its acceptance criteria. See Types of quality checks.
- Save the template.
- Open the Item and select the template in Quality Inspection Template.

Create a Quality Inspection from a transaction
- Save the Purchase Receipt, Delivery Note, or other transaction as a draft.
- Select Create > Quality Inspection(s). Select the items to inspect. ERPNext creates a Quality Inspection for each item, with the Inspection Type, the reference, and the template filled in.
- Open a Quality Inspection. Enter the Sample Size: the quantity that you inspect.
- In the Readings table, enter the readings for each parameter.
- Optional: change Inspected By, and enter Verified By and Remarks.
- Save. ERPNext sets the status of each reading and of the whole inspection from the acceptance criteria.
- Select Submit. ERPNext links the Quality Inspection to the item row of the transaction.
You can also set Quality Inspection in an item row directly, and create the inspection from that field.
Create a Quality Inspection manually
- Open the Quality Inspection list and create a new one.
- Select the Inspection Type:
- Incoming: items that you receive.
- Outgoing: items that you deliver.
- In Process: items in production.
- Select the Reference Type and the Reference Name. The reference types are Purchase Receipt, Purchase Invoice, Subcontracting Receipt, Delivery Note, Sales Invoice, Stock Entry, and Job Card.
- Select the Item Code. For a serialized or batched item, select the Item Serial No or the Batch No.
- Enter the Sample Size and the readings, then save and submit.
For in-process inspection of a production item, create the Quality Inspection from the Job Card.

Types of quality checks
Each row in the Readings table is one check. A check is numeric, value-based, or formula-based.
Numeric checks
A numeric check compares number readings with a range. Use it for measurements, such as a diameter or a weight.
- Keep Numeric selected in the row. It is selected by default.
- Set Minimum Value and Maximum Value.
- Enter up to ten readings in Reading 1 to Reading 10.
When you save, ERPNext sets the row to Rejected if any reading is outside the range.

Value-based checks
A value-based check compares one text reading with an expected value. Use it for checks such as a color, or a Yes/No answer.
- Clear Numeric in the row.
- Set Acceptance Criteria Value, for example
White. - Enter the result in Reading Value.
When you save, ERPNext sets the row to Rejected if Reading Value does not match Acceptance Criteria Value.
Formula-based checks
A formula-based check uses a condition when a range or a single value is not enough. Use it for checks such as "the mean of the readings is below 15" or "the grade is A, B, or C". It works for numeric and value-based checks.
- Select Formula Based Criteria in the row.
- In Acceptance Criteria Formula, enter a condition. ERPNext accepts the row when the condition is true.
You can use these names in a formula:
reading_1toreading_10: the numeric readings.mean: the mean of the numeric readings that are not empty.reading_value: the reading of a value-based check.
# Numeric checks
(reading_1 + reading_2) < 10 # the sum of two readings is less than 10
(reading_1 + reading_2) <= 10 # the sum is 10 or less
mean < 15 # the mean of the readings is less than 15
(reading_1 * 2) < 20 # Reading 1 multiplied by 2 is less than 20
# Value-based checks
reading_value in ("A", "B", "C") # the reading is A, B, or C
reading_value != "Red" # the reading is not Red
Set the status manually
Sometimes a reading is outside the range but is within a tolerance that you accept. To decide the status yourself:
- Select Manual Inspection in a reading row, then set the Status of that row. ERPNext does not change it when you save.
- Select Manual Inspection on the Quality Inspection itself, then set its Status. ERPNext does not set the overall status from the rows.
Otherwise, ERPNext sets the Quality Inspection to Rejected when any row is Rejected.
Control what happens when an inspection is missing or rejected
In Stock Settings, on the Quality tab:
| Setting | Effect |
|---|---|
| Action if Quality Inspection is not submitted | Stop (the default) blocks the transaction until the Quality Inspection is submitted. Warn shows a message and lets you continue. |
| Action if Quality Inspection is rejected | Stop (the default) blocks a transaction that links a rejected Quality Inspection. Warn shows a message and lets you continue. |
| Allow to make Quality Inspection after Purchase / Delivery | Lets you create a Quality Inspection from a transaction after you submit it. |