AQL Report — Inspection Source Toggle

AQL Report — Inspection Source Toggle

Overview

After enabling the Packing module, AQL inspection is still limited to Bundles only,
which does not support inspection after packing (Carton level).

This enhancement allows the inspector to choose the inspection stage.

What Will Change?

- Inspection Source Selection

The inspector can choose:

  • Finished → Inspect Bundles (before packing)
  • Packed → Inspect Cartons (after packing)

- Data Display Based on Selection

If Finished is selected:

  • Show available bundles
  • Table remains as is

If Packed is selected:

  • Show cartons
  • Display:
    • Unaudited Boxes
    • Accepted Boxes
    • Rejected Boxes

- Default Behavior

  • If no packing data → default = Finished
  • If cartons exist → Packed becomes available

- Instant Refresh

When the inspector changes selection:

  • The list updates immediately
  • Shows only:
    • Bundles OR Cartons

- Inspection Submission

On submit:

  • The system saves:
    • Inspection source (Finished / Packed)
  • Links results to:
    • Bundles or Cartons

- AQL Report

The report will include:

  • Audit Number
  • Inspection Time
  • Inspector Name
  • Production Order Number
  • Style
  • Lot Size:
    • Bundles or Cartons
  • Sample Size
  • Final Result

- Important Notes

  • If no cartons exist:
    • Packed option is still visible
    • But shows empty state
  • Cartons are grouped by Assortment

- Summary

Previously:

  • Inspection = Bundles only

Now:

  • Inspection can be:
    • Before packing (Finished)
    • After packing (Packed)

This makes the system flexible for all production stages ✅