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

Process Flow (swimlane)

MES · Trimming Planning — plan from Curing LOTs, self-confirm, create a Curing Stock Out slip per LOTPhaseInputPlannerOutputExceptions — edit plan (DRAFT / APPROVED) · cancel planNopick another LOTAllowedNofix qty / drop LOTYesNot yetConfirm from plan pageYesAPPROVEDNot yetSufficientYesNot yetNot yet — DRAFTedit LOT / qtyYesNoYesYesNot yetMaster data: Model Attributeof the WO (Logo / Spray / OOMG)Master dataCuring Room INV List(LOT ca AB / CD · Available)Master data: Standardcuring daysMaster dataPlan Output Entry —Trimming ResultPlan Output Entry —Trimming ResultStart▣ Trimming PlanningCreate Trimming planWeb▣ Trimming PlanningChoose Plan Type · P.O MonthWeb▣ Trimming PlanningTick LOTs in CuringRoom INV ListWebLOT tickable?▣ Trimming PlanningLock LOT tickSystem (auto)▣ Trimming PlanningAdjust Plan Qty by sizeWebPlan valid?▣ Trimming PlanningDisable Save Draft· ConfirmSystem (auto)Confirm now?▣ Trimming PlanningSave Trimming plan as draftWeb▣ Trimming PlanningConfirm Trimming planWebLOT fullycuring?▣ Trimming PlanningCreate Stock Out slipCuring slip per LOTSystem (auto)EndEdit planPlan hasoutput?Plan APPROVED?▣ Trimming PlanningEdit draft planWeb▣ Trimming PlanningEdit APPROVED planWebLOT quantity changedor dropped?▣ Trimming PlanningCancel the Stock Outslip of that LOTSystem (auto)▣ Trimming PlanningCreate a new slip forthe new Plan QtySystem (auto)EndCancel planPlan hasoutput?▣ Trimming PlanningCancel Trimming planWeb▣ Trimming PlanningCancel every slip ·release held stockSystem (auto)EndTrimming plan APPROVED →Trimming Result, waiting foroutputLOT not fully cured — slipcreated in Curing ConfirmationStock Out slip Curing →WH-TRM-01, APPROVED, oneslip per LOTCannot edit — planalready has outputPlan stays APPROVED —slips unchangedOld slip CANCELLED —stock back to CuringPlan keeps APPROVED and PlanNo. — Trimming Resultshows the new quantitiesCannot cancel — planalready has outputPlan CANCELLED · stock back toCuring · removed from TrimmingResultThe 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.51The 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.51The 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.51The 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-05The 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-05The 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.51The 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.51The 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.51The 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.51The 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.51The 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.76Has 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.76The 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.87Can 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.76Which 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.76The 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.76The 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.76Does 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.76The 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.76The 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.76Can 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.76The 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.76The 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
Startwhere the flow begins
Endevery Start reaches at least one End
Process steptop strip = screen used, colored tag = platform
Decisionevery outgoing branch carries its condition
Data / documentinputs in the Input lane, results in the Output lane
Main flowthe required order of steps
Tags on a boxMaster dataWebSystem (auto)

Status lifecycle

Plan TrimmingDRAFTAPPROVEDCOMPLETEDConfirm & ReleaseEvery LOT Remaining = 0CANCELLEDCancel Plan — release stockCuring Stock Out slip (one per LOT × plan)APPROVEDCANCELLEDQuantity changed / LOT dropped · Cancel PlanEdit Plan · Save changes — stays APPROVEDCancel Plan — no output yet
◻ DRAFT ◻ APPROVED / COMPLETED ◻ CANCELLED

Input

#InputTypeUsed in step
I-1Model Attribute of the source WO — Logo / Spray / OOMG, decides which LOTs show in which plan typeMaster dataChoose Plan Type · P.O Month
I-2Curing 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 curingProcess inventory pool — Curing Confirmation flowTick LOTs in Curing Room INV List
I-3Standard curing days — the standard number of curing daysMaster dataLOT fully cured?
I-4Plan Output Entry — Trimming Result (exists or not)Production result — Trimming Result flowPlan already has output?

Step ↔ screen

StepRoleScreen · UI button
Create Trimming plan · Choose Plan Type · P.O Month · Tick LOTs in Curing Room INV List · Adjust Plan Qty by sizePlannerTrimming 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 planPlannerTrimming Planning · Save Draft, Confirm Trimming Plan → Confirm & Release
Edit draft plan · Edit APPROVED planPlannerTrimming Planning · plan detail page · Edit Plan → Confirm Trimming Plan → Save changes (an APPROVED plan has no Save Draft)
Cancel Trimming planPlannerTrimming 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 stockSystem (auto)Trimming Planning · khung Stock Out Curing → WH-TRM-01 on the plan detail page

Output

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

Glossary

GlossaryMeaning in this flow
Plan TypeFinishing type of the plan: Logo, Spray or OOMG — one type per plan
OOMGThird product type besides Logo and Spray (e.g. model "OMG Clog"); after Trimming it follows the Logo flow
Model AttributeLogo / 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 ListStock list of Curing LOTs waiting for Trimming, filtered by Plan Type, P.O Month and Shift
AvailableQuantity of the LOT still plannable by size = LOT stock − the part held by other plans (DRAFT and APPROVED plans both hold)
DaysPlan Date − curing date of the LOT
Plan QtyPlanned quantity of the LOT by size — defaults to the whole Available when ticked, can be lowered
Stock Out CuringWMS 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 changesSave button when editing an APPROVED plan: the plan keeps APPROVED and its Plan No.