# Trimming Result — the Operator records output per plan LOT entry by entry (one Enter Output button per LOT); a LOT needs a Curing Stock Out slip; A + A- go to the next waiting pool automatically

> Fine Chemical (FC) · Module MES · v0.3 · 13/10/2026 · Standard flow — for implementation, testing and development
>
> Generated from the diagram by `sync.js` — do not edit by hand. The diagram is authoritative: report any mismatch with the diagram page.
>
> Diagram page: /en/mes/trimming-result

## How to read

- Every box on the diagram has a code `Bxx`, numbered in flow order (from the start event, following the arrows).
- "Goes to" lists every arrow leaving the box; text in square brackets is that arrow's condition label.
- "Optional branch" = a dashed arrow on the diagram: may be done or skipped.
- "Data" boxes in the Input lane are incoming data; in the Output lane they are results / end points of the flow.

## Process Flow (swimlane)

### Roles (lanes)

- Input
- Operator
- Output

### Steps

| Code | Role | Type | Content | Platform · Screen | Goes to |
| --- | --- | --- | --- | --- | --- |
| B01 | Input | Data | Plan Trimming APPROVED — Trimming Planning |  | B05 |
| B02 | Input | Data | Plan edited / cancelled before any output — Trimming Planning |  | B05 |
| B03 | Input | Data | Stock Out slip Curing → WH-TRM-01 (by LOT) |  | B07 |
| B04 | Operator | Start | Start |  | B05 |
| B05 | Operator | Task | Put the plan on Trimming Result | System (auto) · Trimming Result | B06 |
| B06 | Operator | Task | Open the plan, pick the LOT to record output | Web · Trimming Result | B07 |
| B07 | Operator | Decision | LOT has a Stock Out? |  | B08 [Not yet]; B09 [Yes] |
| B08 | Output | Data | LOT cannot be recorded — "Curing stock not issued" |  | (end) |
| B09 | Operator | Task | Enter Output Matrix by size | Web · Trimming Result | B10 |
| B10 | Operator | Decision | Any grade C? |  | B11 [Yes]; B12 [No] |
| B11 | Operator | Task | Split grade C by defect reason | Web · Trimming Result | B12 |
| B12 | Operator | Task | Confirm output | Web · Trimming Result | B13 |
| B13 | Operator | Decision | Entry valid? |  | B09 [No — fix entry]; B14 [Yes] |
| B14 | Operator | Task | Add up Output · write C Defect Records · PR → RW | System (auto) · Trimming Result | B15; B16; B17 |
| B15 | Output | Data | C → Defect Records (by reason) PR → Repair / Rework per size |  | (end) |
| B16 | Output | Data | Plan has an Output Entry → locks edit / cancel in Trimming Planning |  | (end) |
| B17 | Operator | Task | Trimming stock receipt WH-TRM-01 (A + A-) | System (auto) · Trimming Result | B18; B19 |
| B18 | Operator | Decision | Plan type? |  | B20 [Spray]; B21 [Logo · OOMG] |
| B19 | Operator | Decision | LOT has Remaining? |  | B09 [Yes — next shift]; B22 [No] |
| B20 | Output | Data | Spray LOT (A + A-) → WH-TRM-01 · Waiting SPRAY-OUT ZONE |  | (end) |
| B21 | Output | Data | Logo · OOMG LOT (A + A-) → WH-TRM-01 · Waiting Packing |  | (end) |
| B22 | Operator | Decision | Every LOT of the plan at Remaining 0? |  | B23 [Not yet]; B24 [Sufficient] |
| B23 | Output | Data | Plan stays APPROVED — waiting for remaining LOTs |  | (end) |
| B24 | Operator | Task | Complete Trimming plan | System (auto) · Trimming Planning | B25; B26 |
| B25 | Output | Data | Plan COMPLETED |  | (end) |
| B26 | Operator | End | End |  |  |

### Step details (hover content on the diagram)

#### B05 · Put the plan on Trimming Result

- Operator · System (auto) · Trimming Result
- Comes from: B01, B02, B04
- Goes to: B06 · Open the plan, pick the LOT to record output

> The system puts the APPROVED plan on the Trimming Result list, one row per plan, with every LOT the plan selected.  
> System: columns "PLAN NO." · "LOTS" (LOT count) · "P.O (MONTH)" · "ITEM GROUP" · "ITEM" · size quantities · "RECEIVED" · "OUTPUT" · "REMAINING" · "STATUS" (Waiting / Partial / Completed for the whole plan).  
> System: a plan edited in Trimming Planning (no output yet) keeps the same row with quantities from the new slips; a cancelled plan disappears from the list.  
> Test:  
> - Plan with 3 LOTs → the list gains 1 row, "LOTS" = "3 LOT(s)"  
> - Edit the plan to lower LOT X by 10 pairs → the plan "RECEIVED" drops by 10, same Plan No.  
> Source: Q-20261005-06 · Q-20261006-02 (Q3) · prototype v0.76  

#### B06 · Open the plan, pick the LOT to record output

- Operator · Web · Trimming Result
- Comes from: B05
- Goes to: B07 · LOT has a Stock Out?

> The Operator opens the plan and picks the LOT to record; each LOT has its own button.  
> Action: Trimming Result › "Open Plan" button (or scan in "Scan Plan / LOT / WO barcode, then Enter") → page "Trimming — <Plan No.>" › card "LOTs in plan <Plan No.> (n)" › "Enter Output" (first time) / "Add Output" (later) on the LOT row.  
> System: the "Trimming Plan" card shows Plan No., P.O (Month), LOTs, Item Group, Item, Next Process, Status, Received · Recorded · Remaining of the plan; the LOT table shows Lot No., WO No., Item Group, Item, Curing Shift, Curing Date, WI No., size quantities, Received · Recorded · Remaining · Entries · Status; "Output Entries" collects the history of every LOT.  
> Result: each entry is for one LOT; a "Completed" LOT has no button, the other LOTs of the plan can still be recorded.  
> Test:  
> - Plan with 3 LOTs, LOT 2 recorded up to Received → LOT 2 "Completed" (button hidden), LOTs 1 and 3 still "Enter Output"; plan Status "Partial"  
> Source: Q-20261005-06 · Q-20261006-03 (Q1) · prototype v0.76  

#### B07 · LOT has a Stock Out?

- Operator
- Comes from: B03, B06
- Goes to [Not yet]: B08 · LOT cannot be recorded — "Curing stock not issued"
- Goes to [Yes]: B09 · Enter Output Matrix by size

> Does the LOT have an APPROVED Curing Stock Out slip to WH-TRM-01?  
> Yes: the LOT "RECEIVED" = the slip quantity → the "Enter Output" / "Add Output" button is shown.  
> Not yet: the LOT is not fully cured so it has no slip → "RECEIVED" = 0 and the button is replaced by "Curing stock not issued".  
> Test:  
> - Plan with 2 LOTs, LOT-20260809-AB-02 cured 1 of 2 days → that LOT row shows Received 0 · "Curing stock not issued"; the other LOT shows "Enter Output"  
> Source: Q-20260930-05 · Q-20261006-02 · prototype v0.76  

#### B09 · Enter Output Matrix by size

- Operator · Web · Trimming Result
- Comes from: B07, B13, B19
- Goes to: B10 · Any grade C?

> The Operator records the trimming output of one entry (usually per shift) by size and grade.  
> Action: "Trimming Output Entry" › "Output Matrix (Item / Size)" table rows "A" (First grade) · "A-" (First grade, minor) · "C" (Reject) · "PR" (Pending repair); "Fill A = Open Qty" quick fill, "Clear" to reset; the "Production Record" block holds working time, "Operator / Team Leader", "Remark".  
> System: "This Entry" = A + A- + C + PR; "Remaining" = "Received" − "Already Recorded" − "This Entry", per size.  
> System: the entry screen records no material / MRO lot and does not check material QC HOLD.  
> Test:  
> - Received W7 = 50, 30 already recorded → "Fill A = Open Qty" fills A W7 = 20  
> Source: Q-20260928-03 (Q9) · Q-20260930-02 (Q3) · prototype v0.51  

#### B10 · Any grade C?

- Operator
- Comes from: B09
- Goes to [Yes]: B11 · Split grade C by defect reason
- Goes to [No]: B12 · Confirm output

> Does the entry contain grade C goods?  
> Yes: row "C" > 0 in any size → the C quantity must be split by defect reason.  
> No: confirm the output directly.  
> Source: Q-20260929-11 · prototype v0.51  

#### B11 · Split grade C by defect reason

- Operator · Web · Trimming Result
- Comes from: B10
- Goes to: B12 · Confirm output

> The Operator splits the whole grade C quantity by defect reason.  
> Action: "Defect Reason Breakdown (grade C)" block › one row per reason "Defect Reason" · "Qty" · "Defect Detail"; "Add Defect Line" button.  
> System: the block header shows "Grade C" · "Mapped" · "Unmapped"; the row "Qty" total must equal the C total.  
> Blocked when: no row → "Grade C quantity recorded — map the defect quantity to a defect reason."; totals differ → "Defect reason breakdown (4) must equal the grade C quantity (5)."  
> Test:  
> - C = 5, rows Shrink mark 3 + Air bubble / porosity 1 → mismatch 4 ≠ 5; change row 2 to 2 → "Balanced"  
> Source: Q-20260929-11 · prototype v0.51  

#### B12 · Confirm output

- Operator · Web · Trimming Result
- Comes from: B11, B10
- Goes to: B13 · Entry valid?

> The Operator confirms the output of the entry.  
> Action: "Confirm Output" button → popup "Confirm Trimming output?" (Plan No., LOT No., Process, Next Process, This Entry, Remaining, defect reasons, A · A- · C · PR table by size) → "Confirm & Save"; "Cancel" to keep editing.  
> System: the popup opens only when the entry passes the next check.  
> Source: Q-20260929-11 · prototype v0.51  

#### B13 · Entry valid?

- Operator
- Comes from: B12
- Goes to [No — fix entry]: B09 · Enter Output Matrix by size
- Goes to [Yes]: B14 · Add up Output · write C Defect Records · PR → RW

> The system checks the entry before opening the confirmation popup.  
> Yes: "This Entry" total > 0, no size makes "Remaining" < 0 and grade C is fully split by reason → the popup opens.  
> No: error on the entry screen, no popup: "Enter a quantity in at least one grade row." · "Recorded output exceeds the received quantity." · Defect Reason Breakdown errors.  
> Test:  
> - Remaining W7 = 50, enter A 45 + C 6 → "Recorded output exceeds the received quantity."  
> - Every cell = 0 → "Enter a quantity in at least one grade row."  
> Source: prototype v0.51  

#### B14 · Add up Output · write C Defect Records · PR → RW

- Operator · System (auto) · Trimming Result
- Comes from: B13
- Goes to: B15 · C → Defect Records (by reason) PR → Repair / Rework per size
- Goes to: B16 · Plan has an Output Entry → locks edit / cancel in Trimming Planning
- Goes to: B17 · Trimming stock receipt WH-TRM-01 (A + A-)

> The system posts the entry to the LOT, accumulates output and records defects.  
> System: "Recorded" += "This Entry"; "Remaining" = "Received" − "Recorded"; the entry adds a row to the "Output Entries" table.  
> Result: LOT "Waiting" → "Partial" (Remaining left) or "Completed" (Remaining = 0); C goes to Defect Records one row per reason and creates no Repair / Rework record; each size with PR > 0 creates one Repair / Rework record carrying the "LOT No." and Source "Trimming · Pending repair", while PR is not written to Defect Records.  
> Result: message like "… entry #1: 105 pairs recorded at Trimming · 1,495 pairs remaining".  
> Result: from the first entry, the plan has "Edit Plan" and "Cancel Plan" locked in Trimming Planning.  
> Test:  
> - Received 500, shift 1 records 300, shift 2 records 200 → Remaining 0, "Completed"  
> - One entry records all 500 → straight from "Waiting" to "Completed"  
> Source: Q-20260929-04 (OQ-05) · Q-20260929-11 · Q-20261013-01 · prototype v0.91  

#### B17 · Trimming stock receipt WH-TRM-01 (A + A-)

- Operator · System (auto) · Trimming Result
- Comes from: B14
- Goes to: B18 · Plan type?
- Goes to: B19 · LOT has Remaining?

> The system posts the Trimming stock receipt as soon as the entry is saved; the Operator presses no move button.  
> System: the process warehouse "WH-TRM-01 / Trimming" holds two kinds of stock per LOT / size — awaiting trimming (received from the Curing Stock Out document) and trimmed.  
> System: deducts the LOT's awaiting-trimming stock by A + A- + C + PR of the entry; adds A + A- trimmed stock carrying the plan "LOT No." and "P.O (Month)", with no Customer P.O yet.  
> Result: C leaves WH-TRM-01 for Defect Records and PR leaves WH-TRM-01 for Repair / Rework; the Process Inventory screen shows warehouse code WH-TRM-01.  
> Test:  
> - LOT awaiting trimming 500; Spray plan records A 80 · A- 20 · C 5 → 395 left awaiting trimming; Waiting SPRAY-OUT ZONE (WH-TRM-01) gains 100 pairs  
> Source: Q-20260930-04 · Q-20260928-03 (Q6) · Q-20260929-11  

#### B18 · Plan type?

- Operator
- Comes from: B17
- Goes to [Spray]: B20 · Spray LOT (A + A-) → WH-TRM-01 · Waiting SPRAY-OUT ZONE
- Goes to [Logo · OOMG]: B21 · Logo · OOMG LOT (A + A-) → WH-TRM-01 · Waiting Packing

> Which location of WH-TRM-01 holds the trimmed A + A- stock depends on the plan type.  
> Spray: location "Waiting SPRAY-OUT ZONE", the source of Outsourcing Planning.  
> Logo · OOMG: location "Waiting Packing", the "1 · Waiting Packing (Trimming Result)" source of Packing Planning Logo.  
> Source: Q-20260929-04 · Q-20260929-12 · Q-20260930-04  

#### B19 · LOT has Remaining?

- Operator
- Comes from: B17
- Goes to [Yes — next shift]: B09 · Enter Output Matrix by size
- Goes to [No]: B22 · Every LOT of the plan at Remaining 0?

> Is there still something to trim on the LOT?  
> Left: "Remaining" > 0 → record again next shift with "Add Output".  
> Done: "Remaining" = 0 → LOT "Completed", "Add Output" hidden.  
> Test:  
> - 1 pair left in one size → "Add Output" still shown  
> Source: Q-20260929-11 · prototype v0.51  

#### B22 · Every LOT of the plan at Remaining 0?

- Operator
- Comes from: B19
- Goes to [Not yet]: B23 · Plan stays APPROVED — waiting for remaining LOTs
- Goes to [Sufficient]: B24 · Complete Trimming plan

> The system checks whether the plan is finished after each entry.  
> Not yet: a LOT still has "Remaining" > 0 → the plan stays APPROVED.  
> All: every LOT of the plan has "Remaining" = 0 → the plan is completed.  
> Test:  
> - Plan with 3 LOTs, 2 "Completed" → APPROVED; 3rd LOT "Completed" → COMPLETED  
> Source: Q-20260930-02 (Q2)  

#### B24 · Complete Trimming plan

- Operator · System (auto) · Trimming Planning
- Comes from: B22
- Goes to: B25 · Plan COMPLETED
- Goes to: B26 · End

> The system closes the plan automatically once every LOT is trimmed; the Planner presses no close button.  
> Result: plan APPROVED → COMPLETED; the plan is locked for edit and cancel like any plan with output.  
> Test:  
> - COMPLETED plan, click "Edit Plan" → "This plan has production results and cannot be edited."  
> Source: Q-20260930-02 (Q2) · Q-20260925-04  

## Status lifecycle

#### LOTs in plan (Trimming Result)

`WAITING` → `PARTIAL` → `COMPLETED`

Transitions:

- `WAITING` -- Confirm Output — Remaining left --> `PARTIAL`
- `PARTIAL` -- Remaining = 0 --> `COMPLETED`
- `WAITING` -- Confirm Output — all recorded in one entry --> `COMPLETED` (back)

#### Plan Trimming

`APPROVED` → `COMPLETED`

Transitions:

- `APPROVED` -- Every LOT Remaining = 0 --> `COMPLETED`

## Input

| # | Input | Type | Used in step |
| --- | --- | --- | --- |
| I-1 | Plan Trimming `APPROVED` — its LOTs and Plan Qty by size | Plan — Trimming Planning flow | Put the plan on Trimming Result |
| I-2 | Plan edited (same Plan No.) or cancelled before any output | Plan — Trimming Planning flow | Put the plan on Trimming Result |
| I-3 | APPROVED Curing Stock Out slip → WH-TRM-01 of each LOT — its size quantities are the LOT "RECEIVED" | Stock slip — Trimming Planning / Curing Confirmation flow | LOT has a Stock Out slip? |

## Step ↔ screen

| Step | Role | Screen · UI button |
| --- | --- | --- |
| Open the plan, pick the LOT to record · Enter the Output Matrix by size · Split grade C by defect reason · Confirm output | Operator | Trimming Result · `Open Plan` → `LOTs in plan …` · `Enter Output` / `Add Output` per LOT · `Defect Reason Breakdown (grade C)` · `Confirm Output` → `Confirm & Save` |
| Put the plan on Trimming Result · Accumulate output · record Defect Records · Trimming receipt WH-TRM-01 · Complete the Trimming plan | System (auto) | Trimming Result |

## Output

| # | Output | Produced when |
| --- | --- | --- |
| O-1 | LOT cannot be recorded — "Curing stock not issued" | The LOT has no Curing Stock Out slip (not fully cured) |
| O-2 | Defect Records — grade C (scrap) by reason, no repair record; each size with PR (Pending repair) > 0 creates a Repair / Rework record carrying the LOT No. (Source `Trimming · Pending repair`) | Confirm Output with C or PR > 0 |
| O-3 | Plan has an Output Entry → Edit Plan / Cancel Plan locked in Trimming Planning | The first entry of the plan is saved |
| O-4 | Spray LOT (A + A-) → WH-TRM-01 · Waiting SPRAY-OUT ZONE, no Customer P.O yet — source of Outsourcing Planning | Every Confirm Output of a Spray-type plan |
| O-5 | Logo · OOMG LOT (A + A-) → WH-TRM-01 · Waiting Packing, no Customer P.O yet — source of Packing Planning Logo | Every Confirm Output of a Logo- or OOMG-type plan |
| O-6 | Plan stays `APPROVED` — waiting for remaining LOTs | After Confirm Output, the plan still has a LOT with Remaining > 0 |
| O-7 | Plan = `COMPLETED` — set by the system, the plan is locked for edit / cancel | Every LOT of the plan has Remaining = 0 |

## Glossary

| Glossary | Meaning in this flow |
| --- | --- |
| `LOT` / `LOT No.` | Lot from injection: 1 shift = 1 LOT, code LOT-YYYYMMDD-AB (day shift) / -CD (night shift), with quantities by size |
| `P.O (Month)` | P.O month of the plan (e.g. 2026.Aug) — required; a Trimming plan carries no Customer P.O |
| `Stock Out Curing` | Slip issuing a LOT from the Curing warehouse to "WH-TRM-01 / Trimming": one slip per LOT × plan, for the LOT Plan Qty, APPROVED as soon as it is created; changing the quantity, dropping the LOT or cancelling the plan makes it CANCELLED and returns the stock to Curing |
| `Output Matrix` | Output entry table by size: A (First grade) · A- (First grade, minor) · C (Reject) · PR (Pending repair) |
| `Grade C` | "Reject" goods are scrap — must be split by reason in the Defect Reason Breakdown, go to Defect Records and create no Repair / Rework record |
| `PR` (Pending repair) | Goods waiting for repair — each size creates a Repair / Rework record, not written to Defect Records and not placed in the next-process pool |
| `Received` / `Recorded` / `Remaining` | Quantity on the LOT Curing Stock Out slip · total recorded · quantity still to trim = Received − Recorded |
| `Waiting SPRAY-OUT ZONE` | Waiting pool of A + A- of Spray plans in WH-TRM-01, source of Outsourcing Planning |
| `Waiting Packing` | Waiting pool of A + A- of Logo and OOMG plans in WH-TRM-01, source of Packing Planning Logo |
