# Trimming Planning — the Planner creates plans by type and P.O Month from Curing LOTs and confirms them; the system creates a Curing Stock Out slip per LOT; editing an APPROVED plan keeps its status

> Fine Chemical (FC) · MES module · v0.3 · 09/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-planning

## 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
- Planner
- Output

### Steps

| Code | Role | Type | Content | Platform · Screen | Goes to |
| --- | --- | --- | --- | --- | --- |
| B01 | Input | Data | Master data: Model Attribute of the WO (Logo / Spray / OOMG) | Master data | B08 |
| B02 | Input | Data | Curing Room INV List (LOT ca AB / CD · Available) |  | B09 |
| B03 | Input | Data | Master data: Standard curing days | Master data | B19 |
| B04 | Input | Data | Plan Output Entry — Trimming Result |  | B25 |
| B05 | Input | Data | Plan Output Entry — Trimming Result |  | B38 |
| B06 | Planner | Start | Start |  | B07 |
| B07 | Planner | Task | Create Trimming plan | Web · Trimming Planning | B08 |
| B08 | Planner | Task | Choose Plan Type · P.O Month | Web · Trimming Planning | B09 |
| B09 | Planner | Task | Tick LOTs in Curing Room INV List | Web · Trimming Planning | B10 |
| B10 | Planner | Decision | LOT tickable? |  | B11 [No]; B12 [Allowed] |
| B11 | Planner | Task | Lock LOT tick | System (auto) · Trimming Planning | B09 [pick another LOT] |
| B12 | Planner | Task | Adjust Plan Qty by size | Web · Trimming Planning | B13 |
| B13 | Planner | Decision | Plan valid? |  | B14 [No]; B15 [Yes] |
| B14 | Planner | Task | Disable Save Draft · Confirm | System (auto) · Trimming Planning | B12 [fix qty / drop LOT] |
| B15 | Planner | Decision | Confirm now? |  | B16 [Not yet]; B17 [Yes] |
| B16 | Planner | Task | Save Trimming plan as draft | Web · Trimming Planning | B17 [Confirm from plan page] |
| B17 | Planner | Task | Confirm Trimming plan | Web · Trimming Planning | B18; B19 [APPROVED] |
| B18 | Output | Data | Trimming plan APPROVED → Trimming Result, waiting for output |  | (end) |
| B19 | Planner | Decision | LOT fully curing? |  | B20 [Not yet]; B21 [Sufficient] |
| B20 | Output | Data | LOT not fully cured — slip created in Curing Confirmation |  | (end) |
| B21 | Planner | Task | Create Stock Out slip Curing slip per LOT | System (auto) · Trimming Planning | B22; B23 |
| B22 | Output | Data | Stock Out slip Curing → WH-TRM-01, APPROVED, one slip per LOT |  | (end) |
| B23 | Planner | End | End |  |  |
| B24 | Planner | Start | Edit plan |  | B25 |
| B25 | Planner | Decision | Plan has output? |  | B26 [Yes]; B27 [Not yet] |
| B26 | Output | Data | Cannot edit — plan already has output |  | (end) |
| B27 | Planner | Decision | Plan APPROVED? |  | B28 [Not yet — DRAFT]; B29 [Yes] |
| B28 | Planner | Task | Edit draft plan | Web · Trimming Planning | B09 [edit LOT / qty] |
| B29 | Planner | Task | Edit APPROVED plan | Web · Trimming Planning | B30 |
| B30 | Planner | Decision | LOT quantity changed or dropped? |  | B31 [No]; B32 [Yes] |
| B31 | Output | Data | Plan stays APPROVED — slips unchanged |  | (end) |
| B32 | Planner | Task | Cancel the Stock Out slip of that LOT | System (auto) · Trimming Planning | B33; B34 |
| B33 | Output | Data | Old slip CANCELLED — stock back to Curing |  | (end) |
| B34 | Planner | Task | Create a new slip for the new Plan Qty | System (auto) · Trimming Planning | B35; B36 |
| B35 | Output | Data | Plan keeps APPROVED and Plan No. — Trimming Result shows the new quantities |  | (end) |
| B36 | Planner | End | End |  |  |
| B37 | Planner | Start | Cancel plan |  | B38 |
| B38 | Planner | Decision | Plan has output? |  | B39 [Yes]; B40 [Not yet] |
| B39 | Output | Data | Cannot cancel — plan already has output |  | (end) |
| B40 | Planner | Task | Cancel Trimming plan | Web · Trimming Planning | B41 |
| B41 | Planner | Task | Cancel every slip · release held stock | System (auto) · Trimming Planning | B42; B43 |
| B42 | Output | Data | Plan CANCELLED · stock back to Curing · removed from Trimming Result |  | (end) |
| B43 | Planner | End | End |  |  |

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

#### B07 · Create Trimming plan

- Planner · Web · Trimming Planning
- Comes from: B06
- Goes to: B08 · Choose Plan Type · P.O Month

> The Planner creates a new Trimming plan to trim goods taken from Curing stock.  
> When: any time a LOT in the Curing Room needs planning; no WO or pre-generated plan is needed.  
> Action: Trimming Planning › "Create Plan" button → "Create Trimming Plan" page.  
> System: the plan number is generated from the plan date: "TRM-PLAN-<YYYYMMDD>-NN" (NN increases within the day).  
> Result: the planning page opens; nothing is saved yet.  
> Test:  
> - Create 2 plans on 12/08 → TRM-PLAN-20260812-01 and -02  
> Source: Q-20260925-04 (1) · prototype v0.51  

#### B08 · Choose Plan Type · P.O Month

- Planner · Web · Trimming Planning
- Comes from: B01, B07
- Goes to: B09 · Tick LOTs in Curing Room INV List

> The Planner picks the finishing type and the P.O month of the plan; a Trimming plan carries no Customer P.O.  
> Action: "PLAN TYPE *" field (Logo / Spray / OOMG), "P.O (MONTH) *" field (e.g. "2026.Aug"), "PLAN DATE" field; the "SHIFT" field ("All" / "Day (AB)" / "Night (CD)") filters LOTs by curing shift.  
> System: the title becomes "Making <Logo|Spray|OOMG> Trimming Plan"; "Curing Room INV List" shows only LOTs whose WO Model Attribute matches the plan type and that belong to the chosen P.O Month.  
> Blocked when: no type chosen → "Select the Plan Type (Logo, Spray or OOMG) to view Curing stock."; no month chosen → "Select the P.O Month to view its LOTs."  
> Test:  
> - Pick Spray + 2026.Aug → only Spray LOTs of August are shown  
> - Pick "Night (CD)" → only LOTs ending in -CD remain  
> Source: Q-20260928-03 (Q11) · prototype v0.51  

#### B09 · Tick LOTs in Curing Room INV List

- Planner · Web · Trimming Planning
- Comes from: B02, B08, B11, B28
- Goes to: B10 · LOT tickable?

> The Planner picks LOTs with remaining Curing stock to put into the plan.  
> Action: "Curing Room INV List" table › tick the "Select" box of the row; search box "Search lot, WO, model or color".  
> System: ticking a LOT takes its whole "Available" by size into "Plan Qty"; "Available" = LOT stock − the part held by other plans; "Days" = "PLAN DATE" − curing date.  
> System: a LOT still curing can be ticked; its Status column reads "Curing not completed — can be planned".  
> Result: the footer counts "<n> LOT(s) · <qty> pairs to reserve".  
> Test:  
> - LOT with 2,490 pairs Available → tick → footer "1 LOT(s) · 2,490 pairs to reserve"  
> - Untick → the LOT leaves the plan, footer back to 0  
> Source: Q-20260928-03 (Q1) · prototype v0.51  

#### B10 · LOT tickable?

- Planner
- Comes from: B09
- Goes to [No]: B11 · Lock LOT tick
- Goes to [Allowed]: B12 · Adjust Plan Qty by size

> The system checks whether the LOT can be put into the plan.  
> Allowed: the LOT matches the plan type, "Available" > 0, the WO Model Attribute is resolved and Model · Base Color · AL / INT are complete; a LOT not yet issued from the Curing warehouse can still be ticked — the Stock Out document is created after the plan is APPROVED.  
> No: any of the conditions above fails → the tick box is locked.  
> Test:  
> - LOT fully held by another plan → cannot be ticked  
> Source: prototype v0.51 · Q-20260930-05  

#### B11 · Lock LOT tick

- Planner · System (auto) · Trimming Planning
- Comes from: B10
- Goes to [pick another LOT]: B09 · Tick LOTs in Curing Room INV List

> The system locks the tick box and shows the reason on the LOT row.  
> System: reason in the Status column: "Source WO model attribute unresolved" · "Compatibility data incomplete"; a LOT with no stock left reads "Fully reserved". "Curing stock not issued" no longer blocks here — it moves to Trimming Result.  
> Result: the Planner picks another LOT.  
> Source: prototype v0.51 · Q-20260930-05  

#### B12 · Adjust Plan Qty by size

- Planner · Web · Trimming Planning
- Comes from: B10, B14
- Goes to: B13 · Plan valid?

> The Planner lowers the planned quantity per size when the LOT will not be trimmed in full.  
> Action: the size cells on the ticked LOT row (they become inputs once ticked); "Cancel editing" leaves without saving.  
> System: the LOT "Plan Qty" = sum of sizes; each size is a whole number from 0 up to that size's "Available".  
> Blocked when: above "Available" → "<LOT No.> / <size>: quantity exceeds Available <n>." (e.g. "LOT-20260806-AB / M3/W5: quantity exceeds Available 200.")  
> Test:  
> - Available M3/W5 = 200: enter 200 → valid; enter 201 → error, "Save Draft" / "Confirm Trimming Plan" locked  
> - Change M3/W5 from 200 to 100 → footer drops by 100 pairs  
> Source: Q-20260928-03 (Q1) · prototype v0.51  

#### B13 · Plan valid?

- Planner
- Comes from: B12
- Goes to [No]: B14 · Disable Save Draft · Confirm
- Goes to [Yes]: B15 · Confirm now?

> The system checks the plan before it can be saved or confirmed.  
> Yes: Plan Type · P.O Month · Plan Date chosen, at least one LOT, total "Plan Qty" > 0 and no size above "Available" → "Save Draft" / "Confirm Trimming Plan" enabled.  
> No: a condition is not met → both buttons are locked and the error shows on the page.  
> Test:  
> - No LOT ticked → "Confirm Trimming Plan" is locked  
> - Every size set to 0 → cannot be saved  
> Source: prototype v0.51  

#### B14 · Disable Save Draft · Confirm

- Planner · System (auto) · Trimming Planning
- Comes from: B13
- Goes to [fix qty / drop LOT]: B12 · Adjust Plan Qty by size

> The system locks the save buttons and shows the error for the Planner to fix.  
> Result: the Planner corrects the size quantities or unticks the wrong LOT.  
> Source: prototype v0.51  

#### B15 · Confirm now?

- Planner
- Comes from: B13
- Goes to [Not yet]: B16 · Save Trimming plan as draft
- Goes to [Yes]: B17 · Confirm Trimming plan

> The Planner chooses to confirm the plan now or save a draft to keep editing.  
> Yes: click "Confirm Trimming Plan" directly on the planning page.  
> Not yet: click "Save Draft"; confirm later from the plan detail page.  
> Source: Q-20260925-04 (2) · prototype v0.51  

#### B16 · Save Trimming plan as draft

- Planner · Web · Trimming Planning
- Comes from: B15
- Goes to [Confirm from plan page]: B17 · Confirm Trimming plan

> The Planner saves the plan to keep editing; the planned quantities are held from the moment the draft is saved.  
> Action: "Save Draft" button.  
> Result: plan → DRAFT; message "<plan no> saved · <n> pairs reserved"; other plans see the LOT "Available" drop by that amount.  
> Test:  
> - Draft plan A holds 200 pairs of LOT X → plan B sees LOT X Available drop by 200  
> Source: prototype v0.51  

#### B17 · Confirm Trimming plan

- Planner · Web · Trimming Planning
- Comes from: B16, B15
- Goes to: B18 · Trimming plan APPROVED → Trimming Result, waiting for output
- Goes to [APPROVED]: B19 · LOT fully curing?

> The Planner confirms the plan directly; there is no separate approval step.  
> When: a plan being created or a DRAFT plan.  
> Action: "Confirm Trimming Plan" button → popup "Release Trimming Plan <plan no>?" (Plan No., Plan Type, P.O (Month), Plan Date, LOTs, Planned Qty, LOT × size table) → "Confirm & Release"; "Cancel" to go back.  
> System: stock is re-checked on confirmation; size quantities cannot exceed the current "Available".  
> Result: plan → APPROVED and appears in Trimming Result waiting for output; message "<plan no> confirmed · <n> pairs reserved · Stock Out Curing: <n> issued".  
> Test:  
> - Click "Cancel" on the popup → the plan keeps its status  
> - Confirm a plan with 2 fully cured LOTs → plan APPROVED, 2 Curing Stock Out slips  
> Source: Q-20260925-04 (2) · Q-20261006-02 · prototype v0.76  

#### B19 · LOT fully curing?

- Planner
- Comes from: B03, B17
- Goes to [Not yet]: B20 · LOT not fully cured — slip created in Curing Confirmation
- Goes to [Sufficient]: B21 · Create Stock Out slip Curing slip per LOT

> Has the plan LOT reached the standard curing days?  
> Yes: the LOT "Days" ≥ "Standard curing days" → the Stock Out slip is created at once.  
> Not yet: the LOT stays in the plan; its slip is created in the Curing Confirmation flow on the day the LOT is fully cured, without confirming the plan again.  
> Test:  
> - Standard curing days = 2, LOT cured 1 day → no slip yet; the plan page shows "Waiting curing"  
> Source: Q-20260930-05 (Q5) · Q-20261006-02 · prototype v0.76  

#### B21 · Create Stock Out slip Curing slip per LOT

- Planner · System (auto) · Trimming Planning
- Comes from: B19
- Goes to: B22 · Stock Out slip Curing → WH-TRM-01, APPROVED, one slip per LOT
- Goes to: B23 · End

> The system creates a Stock Out slip that moves the plan LOT from the process warehouse "WH-CUR-01 / Curing" to "WH-TRM-01 / Trimming"; the Planner presses nothing.  
> System: one slip per LOT × plan, size quantities = the LOT "Plan Qty" in the plan; the slip is APPROVED at once and the stock moves at once — nobody approves it.  
> Result: the LOT awaiting-trimming stock in WH-TRM-01 rises; the LOT "RECEIVED" in Trimming Result equals the slip quantity; the plan page shows the "Stock Out Curing → WH-TRM-01" card (Slip No., LOT No., From → To, Notes, Pairs, Status, Date).  
> System: the slip number follows the WMS Stock Out slip pattern "REQ-<warehouse code>-YYMM-<5 digits>" (prototype: REQ-CUR01-2608-00001); the "Notes" field of the slip holds the WO of the LOT.  
> Test:  
> - The plan holds 2,000 of 2,490 pairs of a LOT → slip of 2,000 pairs, 490 pairs stay in the Curing warehouse  
> - Release TRM-PLAN-20260812-06 (LOT-20260805-AB, 510 pairs) → slip REQ-CUR01-2608-00001, Notes WO-20260803  
> Open: the slip is not yet shown on the WMS Outbound screen.  
> Source: Q-20261006-02 (Q1) · Q-20261006-03 (Q2) · Q-20260930-05 · Q-20261009-09 (Q3) · prototype v0.87  

#### B25 · Plan has output?

- Planner
- Comes from: B04, B24
- Goes to [Yes]: B26 · Cannot edit — plan already has output
- Goes to [Not yet]: B27 · Plan APPROVED?

> Can the plan still be edited?  
> Has output: at least one plan LOT has an Output Entry in Trimming Result → "Edit Plan" is locked for the whole plan, including LOTs not yet recorded.  
> Not yet: DRAFT or APPROVED plan without Output Entry → editing allowed.  
> System: message "This plan has production results and cannot be edited."  
> Test:  
> - APPROVED plan with 3 LOTs, 1 LOT already has output → "Edit Plan" is locked  
> Source: Q-20260925-04 · Q-20261006-02 (Q4) · prototype v0.76  

#### B27 · Plan APPROVED?

- Planner
- Comes from: B25
- Goes to [Not yet — DRAFT]: B28 · Edit draft plan
- Goes to [Yes]: B29 · Edit APPROVED plan

> Which status is the plan in?  
> Not yet — DRAFT: edit as when creating the plan, save with "Save Draft" or "Confirm Trimming Plan".  
> Yes — APPROVED: edit while the plan keeps APPROVED and its Plan No.; there is no "Save Draft".  
> Source: Q-20261006-02 (Q3) · prototype v0.76  

#### B28 · Edit draft plan

- Planner · Web · Trimming Planning
- Comes from: B27
- Goes to [edit LOT / qty]: B09 · Tick LOTs in Curing Room INV List

> The Planner reopens a draft plan to change LOTs or size quantities.  
> Action: plan detail page › "Edit Plan" button → the plan page with the saved LOTs and quantities; "Cancel editing" leaves without saving.  
> System: "Available" is recalculated from current stock, the part this plan holds still counts for this plan; a DRAFT plan has no Stock Out slip yet.  
> Result: save with "Save Draft" → stays DRAFT, or "Confirm Trimming Plan" → APPROVED.  
> Source: Q-20260925-04 · Q-20260930-02 (Q1) · prototype v0.76  

#### B29 · Edit APPROVED plan

- Planner · Web · Trimming Planning
- Comes from: B27
- Goes to: B30 · LOT quantity changed or dropped?

> The Planner changes size quantities or drops LOTs of an APPROVED plan that has no output yet.  
> Action: plan detail page › "Edit Plan" → change quantities / untick a LOT → "Confirm Trimming Plan" → popup "Save changes to Trimming Plan <plan no>?" (lists "Changed LOTs") → "Save changes". The edit page has no "Save Draft".  
> System: "Available" is recalculated from current stock as when creating the plan; size quantities cannot exceed "Available".  
> Result: the plan keeps APPROVED and its Plan No.; message "<plan no> updated · <n> pairs reserved · Stock Out Curing: <n> cancelled, <n> issued".  
> Blocked when: the plan already has an Output Entry or was edited by someone else first → nothing is saved.  
> Test:  
> - APPROVED plan, lower W5 of LOT X by 10 pairs → "Save changes" → the plan stays APPROVED with the same Plan No.  
> Source: Q-20261006-02 (Q3) · prototype v0.76  

#### B30 · LOT quantity changed or dropped?

- Planner
- Comes from: B29
- Goes to [No]: B31 · Plan stays APPROVED — slips unchanged
- Goes to [Yes]: B32 · Cancel the Stock Out slip of that LOT

> Does the edit change the quantity of a LOT that already has a Stock Out slip?  
> Yes: the LOT size quantities changed or the LOT was dropped → that LOT slip must change.  
> No: every LOT keeps its quantities → the slips stay as they are.  
> System: a LOT not yet fully cured has no slip — only its Plan Qty changes, and the slip is created later with the new quantity.  
> Source: Q-20261006-02 (Q2) · prototype v0.76  

#### B32 · Cancel the Stock Out slip of that LOT

- Planner · System (auto) · Trimming Planning
- Comes from: B30
- Goes to: B33 · Old slip CANCELLED — stock back to Curing
- Goes to: B34 · Create a new slip for the new Plan Qty

> The system cancels the old Stock Out slip of a LOT whose quantity changed or that was dropped; no negative slip is used.  
> System: slip → CANCELLED, the awaiting-trimming stock in WH-TRM-01 goes back to the Curing warehouse (WMS Cancel Slip rule §1.7); the CANCELLED slip stays visible in the "Stock Out Curing → WH-TRM-01" card.  
> Result: a LOT dropped from the plan only has its slip cancelled; a LOT with a new quantity goes on to the new slip.  
> Test:  
> - LOT X has a slip of 2,500 pairs, edited down to 2,490 → the 2,500-pair slip is CANCELLED and LOT X Curing stock rises by 2,500 before the new slip issues 2,490  
> Open: whether a slip in a closed stock period (§1.8) blocks the plan edit.  
> Source: Q-20261006-02 (Q2) · WMS_BUSINESS_RULE §1.7 · prototype v0.76  

#### B34 · Create a new slip for the new Plan Qty

- Planner · System (auto) · Trimming Planning
- Comes from: B32
- Goes to: B35 · Plan keeps APPROVED and Plan No. — Trimming Result shows the new quantities
- Goes to: B36 · End

> The system creates a new Stock Out slip for the LOT whose quantity changed.  
> System: the new slip follows the LOT new "Plan Qty" and is APPROVED at once; a LOT not yet fully cured gets no slip yet.  
> Result: the plan keeps APPROVED and its Plan No.; the LOT "RECEIVED" in Trimming Result equals the new slip quantity.  
> Test:  
> - LOT X edited down to 2,490 → new slip of 2,490 pairs APPROVED; Trimming Result: Received 2,490  
> Source: Q-20261006-02 (Q2, Q3) · prototype v0.76  

#### B38 · Plan has output?

- Planner
- Comes from: B05, B37
- Goes to [Yes]: B39 · Cannot cancel — plan already has output
- Goes to [Not yet]: B40 · Cancel Trimming plan

> Can the plan still be cancelled?  
> Has output: at least one LOT has an Output Entry → "Cancel Plan" is locked.  
> Not yet: DRAFT or APPROVED plan without Output Entry → cancellation allowed.  
> System: message "This plan has production results and cannot be changed."  
> Source: Q-20260925-04 · Q-20261006-02 (Q4) · prototype v0.76  

#### B40 · Cancel Trimming plan

- Planner · Web · Trimming Planning
- Comes from: B38
- Goes to: B41 · Cancel every slip · release held stock

> The Planner cancels a plan no longer needed; a CANCELLED plan is closed for good and cannot be edited or confirmed again.  
> Action: plan detail page › "Cancel Plan" button → red popup "Cancel Trimming Plan <plan no>?" ("The reservation on the LOTs is released. Its Stock Out Curing slips are cancelled and the stock returns to Curing. This cannot be undone.") → "Cancel Plan".  
> Result: plan → CANCELLED; message "<plan no> · Cancelled · reservation released · Stock Out Curing: <n> cancelled".  
> Source: Q-20260930-02 (Q1) · Q-20261006-02 (Q2) · prototype v0.76  

#### B41 · Cancel every slip · release held stock

- Planner · System (auto) · Trimming Planning
- Comes from: B40
- Goes to: B42 · Plan CANCELLED · stock back to Curing · removed from Trimming Result
- Goes to: B43 · End

> The system cancels every still-APPROVED Stock Out slip of the plan and releases the held quantity.  
> System: slip → CANCELLED, the awaiting-trimming stock in WH-TRM-01 goes back to the Curing warehouse (§1.7); each LOT "Available" rises by the plan share; the plan leaves the Trimming Result list.  
> Test:  
> - Cancel an APPROVED plan holding 300 pairs of LOT X with a slip → slip CANCELLED, LOT X Available rises by 300, Trimming Result no longer lists the plan  
> - Cancel a DRAFT plan → no slip to cancel, only the held quantity is released  
> Source: Q-20261006-02 (Q2) · WMS_BUSINESS_RULE §1.7 · prototype v0.76  

## Status lifecycle

#### Plan Trimming

`DRAFT` → `CANCELLED` → `APPROVED` → `COMPLETED`

Transitions:

- `DRAFT` -- Confirm & Release --> `APPROVED`
- `APPROVED` -- Every LOT Remaining = 0 --> `COMPLETED`
- `DRAFT` -- Cancel Plan — release stock --> `CANCELLED`
- `APPROVED` -- Edit Plan · Save changes — stays APPROVED --> `APPROVED` (back)
- `APPROVED` -- Cancel Plan — no output yet --> `CANCELLED`

#### Curing Stock Out slip (one per LOT × plan)

`APPROVED` → `CANCELLED`

Transitions:

- `APPROVED` -- Quantity changed / LOT dropped · Cancel Plan --> `CANCELLED`

## Input

| # | Input | Type | Used in step |
| --- | --- | --- | --- |
| I-1 | Model Attribute of the source WO — Logo / Spray / OOMG, decides which LOTs show in which plan type | Master data | Choose Plan Type · P.O Month |
| I-2 | Curing Room INV List — Curing LOTs by shift (suffix AB = day shift, CD = night shift), P.O Month, Days, size quantities and Available; includes LOTs still curing | Process inventory pool — Curing Confirmation flow | Tick LOTs in Curing Room INV List |
| I-3 | Standard curing days — the standard number of curing days | Master data | LOT fully cured? |
| I-4 | Plan Output Entry — Trimming Result (exists or not) | Production result — Trimming Result flow | Plan already has output? |

## Step ↔ screen

| Step | Role | Screen · UI button |
| --- | --- | --- |
| Create Trimming plan · Choose Plan Type · P.O Month · Tick LOTs in Curing Room INV List · Adjust Plan Qty by size | Planner | Trimming Planning · `Create Plan` → `Create Trimming Plan` / `Making … Trimming Plan` (`PLAN TYPE *`, `P.O (MONTH) *`, `PLAN DATE`, `SHIFT`, `Curing Room INV List`) |
| Save Trimming plan draft · Confirm Trimming plan | Planner | Trimming Planning · `Save Draft`, `Confirm Trimming Plan` → `Confirm & Release` |
| Edit draft plan · Edit APPROVED plan | Planner | Trimming Planning · plan detail page · `Edit Plan` → `Confirm Trimming Plan` → `Save changes` (an APPROVED plan has no `Save Draft`) |
| Cancel Trimming plan | Planner | Trimming Planning · plan detail page · `Cancel Plan` |
| Lock LOT tick · Lock Save Draft · Confirm · Create Curing Stock Out slip per LOT · Cancel the Stock Out slip of that LOT · Create a new slip for the new Plan Qty · Cancel every slip · release held stock | System (auto) | Trimming Planning · khung `Stock Out Curing → WH-TRM-01` on the plan detail page |

## Output

| # | Output | Produced when |
| --- | --- | --- |
| O-1 | Plan Trimming `APPROVED` → Trimming Result, waiting for output | The Planner clicks Confirm & Release |
| O-2 | LOT not fully cured — the slip is created in Curing Confirmation when the LOT is cured | APPROVED plan with a LOT whose "Days" < Standard curing days |
| O-3 | Curing Stock Out slip → WH-TRM-01, `APPROVED`, one slip per LOT | APPROVED plan, LOT fully cured |
| O-4 | Cannot edit — the plan already has output | Edit Plan when the plan has an Output Entry ("This plan has production results and cannot be edited.") |
| O-5 | Plan stays `APPROVED` — slips unchanged | An APPROVED plan edited without changing any LOT quantity |
| O-6 | Old slip `CANCELLED` — stock back to the Curing warehouse | An APPROVED plan edited to change or drop a LOT that has a slip |
| O-7 | Plan stays `APPROVED` and its Plan No. — Trimming Result shows the new quantities | Save changes with a changed LOT quantity |
| O-8 | Cannot cancel — the plan already has output | Cancel Plan when the plan has an Output Entry |
| O-9 | Plan `CANCELLED` · stock back to Curing · removed from Trimming Result | Planner clicks Cancel Plan when the plan is `DRAFT` / `APPROVED` without output |

## Glossary

| Glossary | Meaning in this flow |
| --- | --- |
| `Plan Type` | Finishing type of the plan: Logo, Spray or OOMG — one type per plan |
| `OOMG` | Third product type besides Logo and Spray (e.g. model "OMG Clog"); after Trimming it follows the Logo flow |
| `Model Attribute` | Logo / Spray / OOMG attribute of the model on the source WO — decides which plan type a Curing LOT belongs to |
| `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 |
| `Curing Room INV List` | Stock list of Curing LOTs waiting for Trimming, filtered by Plan Type, P.O Month and Shift |
| `Available` | Quantity of the LOT still plannable by size = LOT stock − the part held by other plans (DRAFT and APPROVED plans both hold) |
| `Days` | Plan Date − curing date of the LOT |
| `Plan Qty` | Planned quantity of the LOT by size — defaults to the whole Available when ticked, can be lowered |
| `Stock Out Curing` | WMS Stock Out slip issuing a LOT from the process warehouse "WH-CUR-01 / Curing" 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; number pattern REQ-<warehouse code>-YYMM-<5 digits>, the Notes field holds the WO |
| `Save changes` | Save button when editing an APPROVED plan: the plan keeps APPROVED and its Plan No. |
