Quantities field on Advanced Quality orders
Updated
by Peter Kure Bek-Thorngreen
On an Advanced Quality order there is a quantity field indication the amount of material to be tested.
Several articles cover the different places where this field is affected.
They are also linked in this article.

The purpose of this is to gather the two options of getting a value into this field: The manual and the automatic way.
The automatic filling of the quantities field.
Advanced Quality Orders can be created in D365 or by integration with external systems like a MES system.
When created in D365 the Advanced Quality Associations are used.
Here the creation of and Advanced Quality Order will point to a certain test group.
Read more about it here:
https://docs.cepheo.com/article/50n5o8wi2o-setup#advanced_quality_associations
When creating an Advanced Quality Order the quantities field are taking its value from the test group which you can read more about here:
https://docs.cepheo.com/article/50n5o8wi2o-setup#test_groups
On the test group under item sampling there is a reference to a specific table - items samplings - which is where the quantities are defined.
You can read more about this table here:
https://docs.cepheo.com/article/5xmr41wj5j-item-sampling
Please note that the settings in item sampling have a huge impact on the quantity field.
If the Advanced Quality Order is automatically created from a sample, the quantities are calculated and carried from the sample to the Advanced Quality Order.
Quantities on a sample is dependent on either a fixed number taken from the item samplings as mentioned above, or from the item sample type setup.
If you use the item sample type setup, you need this checkmark on the Advanced Quality Association where the "Create sample" is toggled to "yes".

You can read more about Item sample type setup here:
https://docs.cepheo.com/article/50n5o8wi2o-setup#sample_types
And here
https://docs.cepheo.com/article/50n5o8wi2o-setup#item_sample_type_setup
The manual creation of Advanced Quality order
It is possible to create an Advanced Quality Order manually by pressing "new".

Here you can define which type of order it is and define both batch and license plate e.t.c.
One of the mandatory fields is test group.

By filling in the test group, the quantity is taken from the test group as mentioned above, but it is possible to overwrite the quantity

If the quantity is not filled out you cannot create the Advanced Quality Order.
The reason for a missing value is a wrong setup on the test group - typically there is no value in the items sampling field on that test group.
The manual creation of a sample.
In the manual creation of a sample, the quantity is controlled by item sample type setup.
It is very important to ensure, that if no item sample type setup exists, the setting "Create line from sample type" is toggled to "no".
Below are two examples.
With item sample type setup
PBT FP 01 has a sample type setup.


When creating a sample manually and choosing this product, the quantity is default 2.

Unless the "create lines from sample types" is toggled to "no" in which case the sample quantity field is defaulted to 1 and editable.

Without item sample type setup
Product PBT BP 01 has no item sample type setup and creating a manual sample will default the quantity to 0, unless you toggle the "Create lines from sample type" to "no".

You can read more about sample management here:
https://docs.cepheo.com/article/bsjlz8xfp0-sample-management