Orders, Cutting Order, batches and StagedBatches Status Definitions

Orders, Cutting Order, batches and StagedBatches Status Definitions

We have three layers of statuses to focus on:

image-1659000128050.png

  • Production order
    • A factory creates an order. Each order should have the same style. Moreover, the factory should state the quantity, sizes, and colors for each style piece inside the order.
  • Cutting orders:
    • A factory creates a cutting order that is the number of pieces/batches cut together. So, it is a collection of batches.  
  • Batches
    • A factory starts bundling and assigning tags. Each bundle is a batch that needs to be produced. All items inside the batch should follow the same size, cutting order and color. 
  • StagedBatch
    • Stagedbatch is mainly used in batches new history page where the users wants to track batches on stages and sections (more detailed tracking)

Example:

Let's take an example, an order named "TEST". This order has 30 suits (15 black Medium, 10 black Large, 5 grey Medium) to be produced. However, they are all cut at once.  if each batch should contain 5 items only, then we have:
  • 3 batches of black medium
  • 2 batches of black large
  • 1 batch of grey medium
  • 1 cutting order for all batches. 

Thus, in total we have 6 batches to be produce.  This order has one style, named "Style 1". Style 1 has in total 4 different stages and inside each stage, there are different processes.

image-1659005523294.png

  • Stage 1:
    • process 1
    • process 2 (dependent on process 1)
  • Stage 2:
    • Process 3 (dependent on process 2)
    • Process 4 (dependent on process 3)
  • Stage 3:
    • Process 5 (dependent on process 2)
    • Process 6 (dependent on process 5)
    • Process 7 (Optional and dependent on process 6)
  • Stage 4:
    • Process 8 (Optional). [However we do not recommend having a stage with only one process that is optional]

NOTES:

  1. If all processes inside a stage are MANDATORY -> stage is mandatory. 
  2. If all processes inside a stage are OPTIONAL -> the stage is optional. 
  3. If there is a mix of MANDATORY and OPTIONAL processes -> stage is mandatory as the mandatory processes have to be finished. 

Each batch should go into the 4 different stages. Therefore, we would like to monitor the progress for each batch at each stage. Hence, we have a collection named StagedBatches where we can have a document for each batch and stage. Batch 1 should have 4 different stagedBatches. If we wanted to know the total StagedBatches for this order then it is 6 batches x 4 stages = 24 StagedBatches for this order.

StagedBatch Status

  • All Staged batches statuses are built on production scans that was done by the employee in the production floor. 

There are 4 different status for each batch status:

Status Number Name Quick Description
0 New When a new stagedbatch is created. All 4 stages have status of 0 when they are created. 
1 In-feeding

When a stagedbatch is created with no dependencies before it so it is assumed to start right away after assigning a section to the stage.

  1. Once we start assigning a section to all 4 stages, Stage 1 and 4 should be in-feeding because there are no dependencies before them. So, they can work right away. 
  1. Moreover, when a dependent process in another stage is finished. For example, if processes 1 and 2 in stage 1 are finished. Stage 2 and 3 should change status to in-feeding because process 2 has finished and it's their turn to start producing. 

2 In-progress When at least one process is done inside the stagedbatch and there are still other missing processes. 
3 Done When all MANDATORY processes are done inside the stagedbatch .

Batches Status

Batches status are built on staged batches statuses or quality station inspections or audit inspections. 

  • 0, 1, and 2 from stagedbatches statuses
  • 3 from quality station inspection and staged batches statuses, when batch is inspected on final station and finished all mandatory processes 
  • 4 and 5 from audits done on the batches. 

There are 6 different status for each batch status:

Status Number Name Quick Description
0 New When a new batch is created and no beats are performed on it. Moreover, if all stagedBatches inside the batch have status 0 or 1. 
1 In-progress

When at least one process is done inside the batch. Moreover, if at least one stagedBatch has a status of 2. 

2 Done When all MANDATORY processes are done inside the stagedbatch. Moreover, if all MANDATORY stagedbatches have status 3. 
3 Inspected When the batch is inspected through the final inspection quality and has finished all mandatory processes inside of it. 
4 Rejected If after AUDIT inspection, the batch is rejected due to defects found. 
5 Approved If after AUDIT inspection, the batch is approved. 
6 Stopped/scrap When a batch is marked as scrap in any station quality inspection. 

Cutting Orders Status

All Cutting orders statuses are built on batches statuses inside that cutting order. 

  • 0, 1, and 2 from stagedbatches statuses
  • 3 from quality station inspection and staged batches statuses, when batch is inspected on final station and finished all mandatory processes 
  • 6 from quality station inspection when marked as scrap
  • 4 and 5 from audits done. 

There are 8 different status for each batch status:

Status Number Name Quick Description
0 New When the cutting order is created but no batches created inside that cutting order. Thus, no batches documents inside that cutting order. 
1 Bundled

Batches created inside that order but no beats has recorded. All batches inside that order has status 0. 

2 In-progress When at least one batch inside that cutting order is still in progress (status 1) even if there were other batches with status more than 2. 
3 Done When all batches are done inside that cutting order. Thus, when all batches have status 2 or more. However, there have to be some batches with status 2. 
4 Inspected When all batches are inspected inside that cutting order. Thus, when all batches have status 3 or more. However, there have to be some batches with status 3. 
5 Passed AQL when batches are a mix of accepted or rejected after audit inspection. When batches statuses have a mix of 4 and 5. 
6 Rejected When all batches inside that cutting order are rejected from the audit inspected. Thus, when all batches status is 4
7 Accepted When all batches inside that cutting order are accepted from the audit inspected. Thus, when all batches status is 5


Orders Status

Orders are built on batches statuses inside that order. 

  • 0, 1, 2 ,4 and 5 are built on batches statuses. 
  • 3 from CRON job that sends orders to stopped when they surpass the threshold set by the admin in the factories collection. 

There are 6 different status for each batch status:

Status Number Name Quick Description
0 New When a new order is created and no beats are performed on it and no batches are created inside of it. 
1 In-progress

When at least one process is done inside the order. Moreover, if one batch has a status of 1 or at least one stagedBatch has a status of 2 inside that order. 

2 Done When all MANDATORY processes are done inside the order. Moreover, if all batches have a status of 2 or at all MANDATORY stagedBatch has a status of 3 inside that order. 
3 Stopped

Trigger:

  • The order had no updates (production beats or inspections) for a long period of time that is specified by the factory in the factory settings. 
4 Bundled When the batches are created inside the order and still no process has been done. 
5 Inspected When the order is fully inspected. Moreover, when all batches inside that order have status 3.