How to understand the underlying Works Ordering process in Confirm

Products affected: Confirm®
Product feature: Non-routine Maintenance
For Non-routine Works, the Order Job is copied from the Job and the Order Items are copied from the Job Items when a Job is included on an Order. If a Non-routine Order is being created manually then the Order Job is copied to Job and the Order Items are copied to Job Items. The corresponding fields on the Job and Order Job and the Job Item and Order Item tables are kept in sync whenever a save takes place on any of the entities.

There are historical reasons for the replication of the information and were to do with Confirm using the same tables to cater for Routine and Non-routine Work.

The Order Items are linked to an Order Job because there can be multiple Order Jobs on an Order. The unique identifier for an Order Item is always:

Contract Code, Order Number, Order Job Number and Item Number

because Order Numbers are repeated across Contracts and Order Job Numbers are repeated across Routine Works.
UPDATED:  May 14, 2018