---
title: "Create Quality Inspections for Receipts"
app: "Quality Inspector"
section: "Set up"
last_updated: "2023-05-04"
url: "https://insight-works.com/kb/quality-inspector/create-quality-inspections-for-receipts/"
---

# Create Quality Inspections for Receipts

### Create quality inspections for receipts: short version

Note: This section presumes that you have already:

- Configured grades
- Configured basic source table mappings
- Created a test template to use

If you do not have these configured or if you want a complete walkthrough, see the _Create quality inspections for receipts: long version_ section below.

1. Navigate to _Quality Inspection Test Generation Rules_ in Business Central.
2. Create a line referring to your test template.
3. Add in a filter that specifies a specific item pattern in the _Assignment Filter_

If you test template was called _RECEIPTEXAMPLE_ and you wanted to apply the template to any purchase line receipt for the item 1000, your filter would look like this:

| **Sort Order** | **Template Code** | **Description** | **Table** | **Filter** |
| --- | --- | --- | --- | --- |
| 60 | RECEIPTEXAMPLE | Simple Receipt Example | Purchase Line | WHERE(Type=FILTER(Item),No.=FILTER(1000)) |

### Create quality inspections for receipts: long version

This page guides you through the required configuration for you to create a test for any given item. Much of this configuration already exists, and you can create the core configuration by using the Quality Inspector Setup Wizard.

#### Prerequisites

##### Grade Prerequisite

Ensure you have at least one grade. Navigate to _Quality Inspection Grades_in Business Central. If you don’t see any grades, rerun the Quality Inspector Setup Wizard.

Possible default grades are:

| **Code** | **Description** | **Grade Visibility** |
| --- | --- | --- |
| INPROGRESS | In Progress | Configuration Only |
| FAIL | Fail | Configuration Only |
| PASS | Pass | Promoted |

##### Source Configuration Prerequisite

Ensure that you can tell Business Central what information to pull from a purchase line. You can also make tests for Warehouse Receipts; however, this example uses a purchase order line.

1. Use a source configuration for a purchase line (From Table No. 39) to test.
2. Use the Quality Inspector Setup wizard  to create a default setup.
3. Map the:

   - Document No.
   - Document Line No.
   - Item No.
   - Variant Code
   - Description.
4. Obtain a source configuration (available when you use the Quality Inspector Setup Wizard) for a tracking specification to collect the lot or serial tracking information.

| **Code** | **Description** | **State** | **From Table No.** | **From Table** | **From Table Filter** | **To Type** | **To Table No.** | **To Table** |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| PURCHTOTEST | Purchase Line to Test | Enabled | 39 | Purchase Line | WHERE(Type=FILTER(Item)) | Test | 23067640 | Quality Inspection Test |
| TRACKINGTOPURCH | Tracking Specification to Purchase Line | Enabled | 336 | Tracking Specification | WHERE(Source Type=CONST(39)) | Tracking Only | 39 | Purchase Line |
| WJNLTOPURCH | Whse. Journal to Purchase Line | Enabled | 7311 | Warehouse Journal Line | WHERE(Source Type=CONST(39)) | Chained Table | 39 | Purchase Line |
| WRTOPURCH | Whse. Receipt to Purchase Line | Enabled | 7317 | Warehouse Receipt Line |  | Chained Table | 39 | Purchase Line |

![](/wp-content/uploads/kb-legacy/PURCHOTEST.png)

![](/wp-content/uploads/kb-legacy/PURCHOTEST2.png)

##### Quality Inspector Setup Prerequisite

1. Navigate to _Quality Inspector Setup_ in Business Central.
2. Set _Create Test Behavior_ to **Always Create a New Test** (a test is created even if a matching test for the same purchase line already exists).
3. Set _Create New Test_ to **When a Purchase Order Is Posted** in the _Receiving_ section.

#### Configure questions to collect for the Receipt Test

1. Navigate to _Quality Inspector Fields_ in Business Central.
2. Configure the following fields to ask the questions you want:

| **Code** | **Description** | **Field Type** | **Allowable Values** | **Pass** |
| --- | --- | --- | --- | --- |
| WEIGHT | Weight | Decimal | 1..1000 | 20..60 |
| VISUAL STATE | Visual State | Table Look… | NO MARKS,SOME MARKS,HEAVY MARKS | NO MARKS |

1. Set the following in the _Configure a Number Field_ for Weight:

   - Is this a range of numbers?: A range of numbers
   - Minimum: 1.00
   - Maximum: 1000.00
   - Pass Min.: 20.00
   - Pass Max.: 60.00
   - Pass Desc.: 20 to 60
2. Set the following in the _Manage_ section for Visual State:

   - A simple list of values: Enable

-

   -

| **Pass** | **Code** | **Description** |
| --- | --- | --- |
| – | HEAVY MARKS | Heavy Marks |
| Check | NO MARKS | No Marks |
| – | SOME MARKS | Some Marks |

#### Configure a Quality Inspection Template

1. Create a template to use the questions you created in _Configure questions to collect for the Receipt Test_.

![](/wp-content/uploads/kb-legacy/Configure-a-Quality-Inspection-Template.png)

#### Configure a Test Generation Rule

Now that you have a _Quality Inspection Test_ template, we can create a rule that uses this template.

1. Navigate to _Quality Inspection Test Generation Rules_ in Business Central.
2. Create a line referring to that template.
3. Input the _Assignment Filter_ that specifies a specific item pattern in the _Filter_section_._

| **Sort Order** | **Template Code** | **Description** | **Table** | **Assignment Filter** |
| --- | --- | --- | --- | --- |
| 60 | RECEIPTEXAMPLE | Simple Receipt Example | Purchase Line | WHERE(Type=FILTER(Item),No.=FILTER(1000)) |

#### Configuration Summary

You have completed the following:

1. Promoted a Pass grade
2. Configured a source table
3. Created two fields
4. Created a test template using the two fields
5. Defined configuration to automatically create a test when posting an order
6. Created a test generation rule telling the system when to use the test template

#### Validate the configuration

1. Create a simple purchase order for the item identified in the previous step.
2. Set the _Quantity To_ receive to be a positive value, release the order, and post-receive the order.

Once complete, you have a quality inspection test for that receipt.

![](/wp-content/uploads/kb-legacy/Validate-the-configuration1.png)

![](/wp-content/uploads/kb-legacy/Validate-the-configuration2.png)
