# Process Inventory — projection of WMS stock of the process warehouses by LOT × size

> Fine Chemical (FC) · Module MES · v0.2 · 13/10/2026 · Flow chuẩn — dùng để triển khai, kiểm thử và phát triển
>
> 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/process-inventory

## 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 / Warehouse Staff
- System
- Output

### Steps

| Code | Role | Type | Content | Platform · Screen | Goes to |
| --- | --- | --- | --- | --- | --- |
| B01 | Input | Data | Confirmed curing lot (Curing Confirmation) |  | B11 |
| B02 | Input | Data | Stock Out slip Curing → WH-TRM-01 (APPROVED / CANCELLED) |  | B11 |
| B03 | Input | Data | Output recorded at Trimming Result (POP of the Trimming plan) |  | B12 |
| B04 | Input | Data | Spray LOT already Trimmed (A + A-) — Trimming Result |  | B14 |
| B05 | Input | Data | Stock Out slip WH-TRM-01 → spray vendor (Spray Out Plan) |  | B14 |
| B06 | Input | Data | Logo LOT already Trimmed (A + A-) — Trimming Result |  | B16 |
| B07 | Input | Data | Goods repaired in Repair / Rework (Pending repair now Repaired) |  | B18 |
| B08 | Input | Data | Open plans holding goods (Trimming · Spray Out · Packing) |  | B20 |
| B09 | Planner / Warehouse Staff | Start | Need to view stock |  | B10 |
| B10 | Planner / Warehouse Staff | Task | Open Process Inventory | Web · Process Inventory | B11 |
| B11 | System | Task | Project Curing Room stock (WH-CUR-01) | System (auto) · Process Inventory | B12; B13 |
| B12 | System | Task | Project Waiting Trimming (WH-TRM-01) | System (auto) · Process Inventory | B14; B15 |
| B13 | Output | Data | Curing Room — WH-CUR-01 stock after deducting APPROVED slips |  | (end) |
| B14 | System | Task | Project Waiting SPRAY-OUT ZONE | System (auto) · Process Inventory | B16; B17 |
| B15 | Output | Data | Waiting Trimming — stock waiting for trimming (WH-TRM-01) |  | (end) |
| B16 | System | Task | Project Waiting Packing | System (auto) · Process Inventory | B18; B19 |
| B17 | Output | Data | Waiting SPRAY-OUT ZONE — A + A- Spray waiting for the spray vendor |  | (end) |
| B18 | System | Task | Project Repair Inv List | System (auto) · Process Inventory | B20; B21 |
| B19 | Output | Data | Waiting Packing — A + A- Logo waiting for packing |  | (end) |
| B20 | System | Task | Calculate Available per row | System (auto) · Process Inventory | B22; B23 |
| B21 | Output | Data | Repair Inv List — goods repaired, waiting for the next process |  | (end) |
| B22 | System | Decision | On-hand = 0? |  | B24 [Yes]; B25 [No] |
| B23 | Output | Data | Available per row and the total on the pool card |  | (end) |
| B24 | System | Task | Hide the row from the table | System (auto) · Process Inventory | B26; B27 |
| B25 | Output | Data | Rows still on hand — shown in the table |  | (end) |
| B26 | System | End | End |  |  |
| B27 | Output | Data | Rows with On-hand = 0 — hidden from the table |  | (end) |
| B28 | Planner / Warehouse Staff | Start | Need to filter or search |  | B29 |
| B29 | Planner / Warehouse Staff | Task | Filter by pool or search the table | Web · Process Inventory | B30; B31 |
| B30 | Output | Data | Table filtered by pool or keyword |  | (end) |
| B31 | Planner / Warehouse Staff | End | End |  |  |

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

#### B10 · Open Process Inventory

- Planner / Warehouse Staff · Web · Process Inventory
- Comes from: B09
- Goes to: B11 · Project Curing Room stock (WH-CUR-01)

> The Planner or Warehouse Staff opens the screen to view process-warehouse stock by LOT × size; the screen is read-only.  
> Action: Process Inventory › five pool cards "Curing Room" · "Waiting Trimming" · "Waiting SPRAY-OUT ZONE" · "Waiting Packing" · "Repair Inv List" (each card shows the warehouse code, pairs and "<n> LOT(s)"); table "Process Inventory by LOT": "Warehouse" · "Location" · "Plan No." · "LOT No." · "WO No." · "Model" · "Base Color" · "Logo / Spray" · "Grade" · "IN Date" · size columns · "On-hand" · "Available".  
> System: the screen has no write button — no stocktake, no stock moves; stocktakes and stock transactions are done in WMS. A size column appears only if some displayed row has On-hand > 0 for it.  
> Result: the system builds the five pools in the next steps.  
> Test:  
> - No row has On-hand left → the table shows "No stock matches the filter."  
> Source: Q-20260917-19 (q2) · Q-20261012-02 (q3) · prototype v0.88  

#### B11 · Project Curing Room stock (WH-CUR-01)

- System · System (auto) · Process Inventory
- Comes from: B10, B01, B02
- Goes to: B12 · Project Waiting Trimming (WH-TRM-01)
- Goes to: B13 · Curing Room — WH-CUR-01 stock after deducting APPROVED slips

> The system projects Curing-room stock, the process warehouse "WH-CUR-01 / Curing", by LOT × size, net of the quantity issued to the Trimming warehouse.  
> System: the LOT's "On-hand" per size = LOT stock at WH-CUR-01 − total of the LOT's APPROVED Stock Out Curing → WH-TRM-01 slips, never below zero; "Available" = the smaller of the LOT's Available at Curing Checking and On-hand; "IN Date" = the LOT's curing date; "Location" = "Curing Room".  
> Result: CANCELLED slips (quantity edited, LOT removed or Trimming plan cancelled) no longer count, so that quantity returns to Curing Room by itself.  
> Test:  
> - LOT stock 1,600 pairs, APPROVED slip 510 → Curing Room On-hand 1,090  
> - Cancel that plan → slip CANCELLED → Curing Room On-hand 1,600  
> Source: Q-20261012-02 (q2, 3) · Q-20261009-09 (q2) · Q-20260930-05 · prototype v0.88  

#### B12 · Project Waiting Trimming (WH-TRM-01)

- System · System (auto) · Process Inventory
- Comes from: B03, B11
- Goes to: B14 · Project Waiting SPRAY-OUT ZONE
- Goes to: B15 · Waiting Trimming — stock waiting for trimming (WH-TRM-01)

> The system projects the stock waiting for trimming at "WH-TRM-01 / Trimming": goods already issued from Curing Room for a Trimming plan and not yet recorded as output.  
> System: each APPROVED Stock Out Curing slip is one row; "On-hand" per size = slip quantity − output (POP) already recorded at Trimming Result for that LOT × plan, never below zero; "Plan No." = the slip's Trimming plan; "WO No." is taken from the slip's Notes field; "Available" = 0 because the whole quantity is already held for the open Trimming plan.  
> Result: a row with no On-hand left is hidden; a CANCELLED slip makes the row disappear and the quantity returns to Curing Room.  
> Test:  
> - Slip 510 pairs APPROVED, 300 output recorded at Trimming Result → Waiting Trimming On-hand 210  
> - Record the full 510 → On-hand 0, row hidden  
> Source: Q-20261012-02 (q2) · Q-20260930-04 (round 2) · prototype v0.88  

#### B14 · Project Waiting SPRAY-OUT ZONE

- System · System (auto) · Process Inventory
- Comes from: B04, B05, B12
- Goes to: B16 · Project Waiting Packing
- Goes to: B17 · Waiting SPRAY-OUT ZONE — A + A- Spray waiting for the spray vendor

> The system projects the A + A- of Spray-type Trimming plans, already trimmed and not yet sent to the spray vendor, at "WH-TRM-01 / Trimming".  
> System: A + A- that were "Confirm Output"-ed at Trimming Result for a Spray-type plan are added to the pool by LOT × size, column "Logo / Spray" = Spray, no Customer P.O yet; "Available" = "On-hand" − the quantity held by open Spray Out Plans.  
> Result: goods leave the pool when the Spray Out Plan's Stock Out WH-TRM-01 → spray vendor slip is approved by the warehouse in WMS (APPROVED), deducted by size.  
> Test:  
> - LOT 1,826 pairs, open Spray Out Plan holds 640 → Available 1,186, On-hand still 1,826  
> - Stock Out slip for 640 pairs approved → On-hand 1,186  
> Open: prototype v0.88 currently deducts only "Available" per plan, not "On-hand" when the Stock Out slip is approved.  
> Source: Q-20261012-02 (q3) · Q-20260930-04 · Q-20261005-03 · prototype v0.88  

#### B16 · Project Waiting Packing

- System · System (auto) · Process Inventory
- Comes from: B06, B14
- Goes to: B18 · Project Repair Inv List
- Goes to: B19 · Waiting Packing — A + A- Logo waiting for packing

> The system projects the A + A- of Logo-type Trimming plans, already trimmed and waiting for packing, at "WH-TRM-01 / Trimming".  
> System: A + A- that were "Confirm Output"-ed at Trimming Result for a Logo-type plan are added to the pool by LOT × size, column "Logo / Spray" = Logo, no Customer P.O yet; "Available" = "On-hand" − the quantity held by open Packing Plan Logo plans.  
> Result: when the Planner selects goods at Packing Planning Logo, "Available" drops accordingly.  
> Test:  
> - LOT 220 pairs, open Packing Plan Logo holds 90 → Available 130, On-hand 220  
> Open: when this pool's "On-hand" drops (when a plan holds the goods or when the goods really leave the warehouse) — prototype v0.88 deducts only "Available".  
> Source: Q-20261012-02 (q3) · Q-20260930-04 · prototype v0.88  

#### B18 · Project Repair Inv List

- System · System (auto) · Process Inventory
- Comes from: B07, B16
- Goes to: B20 · Calculate Available per row
- Goes to: B21 · Repair Inv List — goods repaired, waiting for the next process

> The system projects goods repaired at Repair / Rework and waiting for the next process.  
> System: Repair / Rework slips with status Repaired and good repaired quantity > 0 (slips the system creates from Pending repair of the screens after Injection, Source "<Process> · Pending repair") are added to the pool by LOT × size; the "Warehouse" column shows "—" because this pool has no warehouse code yet; "Available" = "On-hand" − quantity held by open Spray Out Plans and Packing Plans in Step 2. Grade C goods do not enter the pool because they go to Defect Records.  
> Result: when the Planner selects a Repair row at Step 2 of a plan, "Available" drops accordingly.  
> Test:  
> - A Repair / Rework slip becomes Repaired, 12 pairs repaired → Repair Inv List +12  
> - A Spray Out Plan selects 8 pairs of that Repair row → Available 4  
> Open: the warehouse code of the "Repair Inv List" pool and when "On-hand" drops — prototype v0.88 shows "—" and deducts only "Available".  
> Open: where Repaired goods go depends on Source ("Spray Out · Pending repair" and "Packing Spray · Pending repair" go to Packing Planning Spray; "Trimming · Pending repair" goes to Outsourcing Planning or Packing Planning Logo) but "Repair Inv List" is one shared pool — unclear whether it is split by next process (OQ-122, OQ-126).  
> Source: Q-20261013-01 · Q-20260930-04 · prototype v0.91 (warehouse code "—")  

#### B20 · Calculate Available per row

- System · System (auto) · Process Inventory
- Comes from: B08, B18
- Goes to: B22 · On-hand = 0?
- Goes to: B23 · Available per row and the total on the pool card

> The system calculates "Available" for every pool row and totals "On-hand" for the pool cards.  
> System: Available = On-hand − the quantity held by open plans (Trimming, Spray Out, Packing), by size, never below zero; a plan that is Rejected or Cancelled releases what it held. Pool card = total On-hand (pairs) of the pool's rows and the number of LOTs.  
> Result: the table's "On-hand" and "Available" columns, and the two figures on each pool card.  
> Test:  
> - On-hand 220, an open plan holds 90 → Available 130  
> - That plan is Cancelled → Available 220  
> Source: Q-20261012-02 (q3) · prototype v0.88  

#### B22 · On-hand = 0?

- System
- Comes from: B20
- Goes to [Yes]: B24 · Hide the row from the table
- Goes to [No]: B25 · Rows still on hand — shown in the table

> Does the pool row still have stock?  
> Yes: the row's "On-hand" = 0 for every size → the row is not shown in the table and not counted in the pool card.  
> No: "On-hand" > 0 for at least one size → the row is shown.  
> Test:  
> - Slip 510, output recorded in full 510 → the LOT's Waiting Trimming row is hidden  
> - 1 pair left in one size → the row is shown  
> Source: prototype v0.88  

#### B24 · Hide the row from the table

- System · System (auto) · Process Inventory
- Comes from: B22
- Goes to: B26 · End
- Goes to: B27 · Rows with On-hand = 0 — hidden from the table

> The system removes the row with no stock left from the table.  
> Result: the row leaves the table "Process Inventory by LOT"; when the pool receives more goods for that LOT the row appears again.  
> Source: prototype v0.88  

#### B29 · Filter by pool or search the table

- Planner / Warehouse Staff · Web · Process Inventory
- Comes from: B28
- Goes to: B30 · Table filtered by pool or keyword
- Goes to: B31 · End

> The Planner or Warehouse Staff narrows the table by pool or by keyword.  
> Action: click a pool card (click the selected card again to clear the filter), or the select "All locations", or the search box "Search warehouse, plan, LOT, WO or model".  
> System: filters by pool and searches the keyword in the warehouse code, "Location", "Plan No.", "LOT No.", slip number, "WO No.", "Model", "Base Color"; the pool cards always show the whole pool's total and do not change with the keyword.  
> Result: the counter "<n> row(s)"; when no row matches the table shows "No stock matches the filter."  
> Test:  
> - Select the "Waiting Packing" pool, type a LOT code that exists only in Curing Room → "0 row(s)"  
> Source: prototype v0.88  

## Input

| # | Input | Type | Used in step |
| --- | --- | --- | --- |
| I-1 | Confirmed Curing lots (Curing Confirmation) | Production result — MES | Project Curing Room stock (WH-CUR-01) |
| I-2 | Stock Out Curing slip → WH-TRM-01 (APPROVED / CANCELLED) | Stock slip — MES Trimming Planning / Curing Confirmation | Project Curing Room stock · Project Waiting Trimming stock |
| I-3 | Output recorded at Trimming Result (POP of the Trimming plan) | Production result — MES | Project Waiting Trimming stock |
| I-4 | Spray LOT already Trimmed (A + A-) — Trimming Result | Production result — MES | Project Waiting SPRAY-OUT ZONE stock |
| I-5 | Stock Out slip WH-TRM-01 → spray vendor (Spray Out Plan) | Warehouse slip — WMS | Project Waiting SPRAY-OUT ZONE stock |
| I-6 | Logo LOT already Trimmed (A + A-) — Trimming Result | Production result — MES | Project Waiting Packing stock |
| I-8 | Goods repaired in Repair / Rework (Repaired) | Result — MES Repair / Rework | Project Repair Inv List stock |
| I-9 | Open plans holding goods (Trimming · Spray Out · Packing) | Plan — MES | Calculate Available per row |

## Step ↔ screen

| Step | Role | Screen · UI button |
| --- | --- | --- |
| Open Process Inventory | Planner / Warehouse Staff | Process Inventory · five pool cards; table `Process Inventory by LOT` (the screen has no write button) |
| Filter by pool or search the table | Planner / Warehouse Staff | Process Inventory · click a pool card; select `All locations`; search box `Search warehouse, plan, LOT, WO or model` |
| Project Curing Room stock · Project Waiting Trimming stock · Project Waiting SPRAY-OUT ZONE stock · Project Waiting Packing stock · Project Repair Inv List stock · Calculate Available per row · Hide the row from the table | System (auto) | Process Inventory · columns `On-hand`, `Available`; pool cards |

## Output

| # | Output | Produced when |
| --- | --- | --- |
| O-1 | Curing Room — WH-CUR-01 stock after deducting APPROVED slips | The LOT still has stock in the Curing room |
| O-2 | Waiting Trimming — stock waiting for trimming (WH-TRM-01) | An APPROVED Stock Out Curing slip whose output is not fully recorded |
| O-3 | Waiting SPRAY-OUT ZONE — A + A- Spray waiting for the spray vendor | Spray-type Trimming plan with Confirm Output done |
| O-4 | Waiting Packing — A + A- Logo waiting for packing | Logo-type Trimming plan with Confirm Output done |
| O-5 | Repair Inv List — repaired goods waiting for the next process | Repair / Rework slip Repaired, good-repaired quantity > 0 |
| O-6 | Available per row and the total on the pool card | Always calculated when the screen opens |
| O-7 | Rows still on hand — shown in the table | On-hand > 0 for at least one size |
| O-8 | Rows with On-hand = 0 — hidden from the table | On-hand = 0 for every size |
| O-9 | Table filtered by pool or keyword | Click a pool card, select `All locations` or type in the search box |

## Glossary

| Glossary | Meaning in this flow |
| --- | --- |
| `On-hand` | Actual stock of the row by size in the process warehouse, taken from WMS stock |
| `Available` | On-hand − the quantity held by open plans (Trimming, Spray Out, Packing), never below zero |
| `WH-CUR-01 / Curing` | The process warehouse of the Curing room; stocktakes are done at this warehouse in WMS |
| `WH-TRM-01 / Trimming` | The process warehouse of Trimming — one warehouse holding three pools: Waiting Trimming, Waiting SPRAY-OUT ZONE, Waiting Packing (the Repair Inv List pool has no warehouse code yet) |
| `Stock Out Curing` | The WMS Stock Out slip that issues a LOT from WH-CUR-01 to WH-TRM-01 for a Trimming plan; the Notes field holds the WO |
| `POP` | Output already recorded (Production Output) at Trimming Result |
| `Confirm Output` | The button that confirms output at Trimming Result; A + A- are received into WH-TRM-01 |
| `Repaired` | Status of a Repair / Rework slip that has been repaired |
| `Spray vendor` | The supplier that sprays the goods (Vendor of the Spray Out Plan) |
| `WMS` | The warehouse system: holds process-warehouse stock, approves Stock Out slips, runs stocktakes |
