Product "StatusID" programming 

The "StatusID" of a product can take a number of values such as "Active Sales Item" or "NPD Stage". These are used to control what users are allowed to do when editing and updating a product. This article lays out the details of this programming, so users can understand what is going on.

How the StatusID values control editing of Products

A basic concept behind the programming is the idea that you can only edit Products with certain Status's. These "Editing status's" are noted in the table below with "General Changes are allowed without serious controls". If a Product has any other status, and you want to edit it you must first switch the Product's Status to one which allows editing. When you switch various tests are done and you are asked to make a note of your reason for changing the status.

In the moment the status changes from a "controlled" status to an uncontrolled status various tests are carried out (as detailed in the table and below). This may result in FMSys refusing to allow the change, or it may result in FMSys asking you to provide other details.

Why does FMSys do this?

A product may be in use in the factory, then a staff member may see a serious quality issue with a product. In this case they might need to mark it "inactive", however this product might be in-use as an ingredient in a number of products, perhaps even in "live production". In such a case FMSys helps to autmoate the process of identifying these risks and helping staff to solve them.

Note that in the database each StatusID is stored as a unique "ID", you will not need to know these ID's for general use of FMSys, but they are listed in the table below for convenience. Unfortunately the IDs do not have a sensible order, and are random numbers such as "77" or "1038065" as the different status's were created at different times and adapted as FMSys has evolved.  Sometimes when Reports are being written it is useful to know these IDs. If you need them please refer to the table below.

1. New Prod/Ing (Stored as ID 3)

General Changes are allowed without serious controls

2. NPD Stage (Stored as ID 4)

General Changes are allowed without serious controls 

3. NPD Peoduction Trial (Stored as ID 1902545)

General Changes are allowed without serious controls 

4. Active Sales Item (Stored as ID 5)

Setting to this status calls "Test into Production" and procedure, which is quite complex and is detailed below. 

When a product has this status, there are several additional controls to its operation.
Once a product has this status it can ONLY change to status 5., 6. or 12. 

The "Create Product Specification" procedure will only run if a Product has this status.

5. Sales Item Under Review (Stored as ID 77)

General Changes are allowed without serious controls

6. Inactive Sales Item (Stored as ID 7)

Setting to this status calls "Terminate Production" procedure, which is detailed below.

Once set, general changes are allowed.

7. Inactive NPD (Stored as ID 79)

Treated as 12. Archived.

Once set, general changes are allowed.

8. Active Purchase Food (Stored as ID 6)

Setting to this status calls "Test Ingredient Can be Purchased" procedure, which is detailed below. 

9. Active Purchase Non-Food (Stored as ID 1038065)

Setting to this status calls "Test Ingredient Can Be Purchased" procedure, which is detailed below.  

10. Inactive Purchase Food (Stored as ID 2)

General Changes are allowed without serious controls 

11. Inactive Purchase Non-Food (Stored as ID 80)

General Changes are allowed without serious controls 

12. ARCHIVED (Stored as ID 1142498)

Setting to this status calls "Terminate Production" procedure, which is detailed below. 

Once set if you try to change the product you will be told not to. The idea is that once archived a product is "frozen."

Test Into Production

The following tests are carried out:

  1. Test Nutritionals Present: Simple checks for the presence of nutrtional data in the NutritionalDetails table, it cannot test for validity of the data.
  2. Test Supply Valid: For every Ingredient of a product, test that the Supplier data is present, and that this supplier has "ValidUntilDate" for their supplier-approval which is in the future. 
  3. Test Allergens Present: Simple checks for the presence of allergen data in the NutritionalDetails table, it cannot test for validity of the data.
  4. Test that various fields contain data: Name, ProdCode, SalePrice, CaseDescription, UnitWeight, CountUnits, Weight, ShelfLife. Note that FMSys cannot validate that the data entered (such as SalePrice) is correct, only that the user has entered something!
  5. Test Organic Product Has Organic Ingredients:  If a Product is Organic, verify that all its Ingredients are also Organic.
  6. Test Ingredients Not New: Verifies that ingredients used by a product are themselves active. 
  7. Test Overheads Present: Tests for additional records in the ProductOverheads table.

 

Terminate Production

Sends an email to Karen listing all the ingredients used only in this particular product. There is a system to allow checking of the stock-levels of these ingredients, so that they can be dealt with.

Test Ingredient Can be Purchased

  1. Tests that the product has a Purchase Price.
  2. Test Allergens Present: Simple checks for the presence of allergen data in the NutritionalDetails table, it cannot test for validity of the data. 

Some other related programming in the Products data-table

  1. When Product Specification PDFs are created there are a number of "completion tests" similar to those done when a product is set to "Active" status, these are actually more thorough than the tests for Activation, and include creation of a "Product Completion Grid" which allows the user to review the different sections of data for a product.
  2. When PurchasePrice is updated, a set of tests is run and costings of products which use this product as an ingredient are updated.
  3. Many fields such as Shelf-life, UnitWieght, Name, Barcode and others include code to control how they respond when updated by a user, in an attempt to ensure that "sensible" data is added.

Where StatusID is used in other parts of FMSys

StatusID is actively used in the Production, SalesInvoice, StockPurchase and StockMovements Business-Objects.

In IngredientsUsed the StatusID of Production and Product (to which the IngredientsUsed record is linked) are checked as part of the process of moving a Production record to "Batch Sheet Printed" status.