---
title: "How to Prevent Receiving a Purchase Order Until a Quality Inspection Test is Completed"
app: "Quality Inspector"
section: "Set up"
last_updated: "2026-08-12"
url: "https://insight-works.com/kb/quality-inspector/how-to-prevent-receiving-a-purchase-order-until-a-quality-inspection-test-is-completed/"
---

# How to Prevent Receiving a Purchase Order Until a Quality Inspection Test is Completed

This article discusses two different approaches to prevent purchase receipts until a quality test is complete.  Quality Inspector provides two ways to control purchase receiving when an inspection is required:

- **Require a finished test for the purchase document or line.**
- **Use the test grade to block receiving a specific lot, serial number, or package.**

## Using Grades with Lots, or Serials, or Packages: Block purchase receiving by test grade

Use this approach when receiving should be controlled separately for each lot, serial number, or package and the test grade should determine whether the transaction is permitted.

### Configure grade-based blocking

1. Open **Quality Inspection Grades**.
2. Configure **Lot Allow Purchase** for the relevant grades. A typical setup is: | Grade | Lot Allow Purchase | | --- | --- | | INPROGRESS | Block | | FAIL | Block | | PASS | Allow Finished Only |
3. Open **Quality Inspector Setup**.
4. Set **Conditional Lot Find Behavior** to **Any test that matches** when open tests must hold the lot until inspection is complete.
5. Ensure a test is created before posting and contains the same item tracking details as the receipt. Tests can be created when the purchase order is released, when the warehouse receipt is created, or manually.
6. Complete and finish the test. A finished passing test permits the purchase transaction; an in-progress or failed test remains blocked.

### Advantages

- Controls each lot, serial number, or package independently.
- Supports different transaction permissions for different grades.
- Can continue blocking a finished failed test while allowing a finished passing test.

### Considerations

- Requires matching item tracking information on the test and receipt.
- Does not protect a transaction when no matching test exists; use the finished-test requirement when missing tests must also stop posting.
- **Conditional Lot Find Behavior** requires careful selection when multiple tests or retests exist.

## Alternate Approach: Require a finished test before receiving

Use this approach when every applicable purchase line must have a completed test, including items that are not lot- or serial-tracked.

### Configure the requirement

1. Open **Quality Inspector Setup**.
2. In the **Receiving** section, find **Check That Tests Exist When**.
3. Set **Receiving** to one of the following:

   - **Before Post Purchase Order** for receiving directly from a purchase order.
   - **Before Post Whse Receipt** when using warehouse receipts.
4. Set **Validation Behavior** to **Error** to prevent posting. The other choices can allow an interactive user to continue or display a message without stopping posting.
5. Create the required test before receiving. For example, configure a receiving Test Generation Rule with **Purchase Trigger** set to **When Purchase Order is Released**, or create the test manually.
6. Complete and finish the test before posting the receipt.

Quality Inspector checks for matching tests and verifies that the required number are finished. If tests are missing or still open, posting is stopped.

### Advantages

- Detects both missing and unfinished tests.
- Works with tracked and non-tracked items.
- Directly enforces completion without relying on a particular grade.

### Considerations

- The setting checks for tests but does not create them.
- It applies broadly at the selected receiving event rather than providing different receiving rules for each grade.
- **Validation Behavior** must be **Error** when posting must always be prevented.

##

## Which approach should you use?

Use **Check That Tests Exist When** when the main requirement is: “Do not receive this purchase line until its required test exists and is finished.”

Use **Lot Allow Purchase** when the requirement is: “Allow or block this particular lot, serial number, or package according to its current quality grade.”

The approaches can also be combined when you need both a mandatory completed test and grade-specific control over tracked material.

## Related documentation

- [Quality Inspector Setup](/kb/quality-inspector/iwxqisetup-page-al/)
- [Automate Block and Unblock Lot Transactions in Quality Inspector](/kb/quality-inspector/automate-block-and-unblock-lot-transactions-in-quality-inspector/)
- [Select Which Tests Are Considered When Evaluating Lot Grade Restrictions](/kb/quality-inspector/select-which-tests-are-considered-when-evaluating-lot-grade-restrictions-in-quality-inspector/)
- [Create Quality Inspections for Receipts](/kb/quality-inspector/create-quality-inspections-for-receipts/)
