# Outsourcing Planning (Spray Out) — build the spray plan in 3 steps, approve, create the Stock Out slip to the vendor; the plan becomes SENT when the warehouse approves the slip

> Fine Chemical (FC) · Module MES · v0.8 · 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/outsourcing

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

### Steps

| Code | Role | Type | Content | Platform · Screen | Goes to |
| --- | --- | --- | --- | --- | --- |
| B01 | Input | Data | Master data: Vendor (spray supplier) | Master data | B06 |
| B02 | Input | Data | Waiting SPRAY-OUT ZONE — LOT Spray A + A- (Trimming Result · WH-TRM-01) |  | B07 |
| B03 | Input | Data | Repair Inventory — Spray goods (Trimming · Pending repair repaired — Repaired) |  | B08 |
| B04 | Input | Data | Customer P.O SPRAY · ETD · P.O Month (Sales Order) |  | B09 |
| B05 | Planner | Start | Start |  | B06 |
| B06 | Planner | Task | Create Spray Out Plan | Web · Outsourcing Planning | B07 |
| B07 | Planner | Task | Step 1 · Select Waiting SPRAY-OUT ZONE | Web · Outsourcing Planning | B08 |
| B08 | Planner | Task | Step 2 · Pick Repair Inventory | Web · Outsourcing Planning | B09 |
| B09 | Planner | Task | Step 3 · Allocate to Detail P.O | Web · Outsourcing Planning | B10 |
| B10 | Planner | Decision | Allocation valid? |  | B11 [No]; B12 [Yes] |
| B11 | Output | Data | Release blocked — over Available / Remaining P.O, no Vendor |  | (end) |
| B12 | Planner | Decision | Release now? |  | B13 [Not yet]; B14 [Yes] |
| B13 | Planner | Task | Save Spray Out Plan draft | Web · Outsourcing Planning | B15 |
| B14 | Planner | Task | Release Spray Out Plan | Web · Outsourcing Planning | B16 [NEW] |
| B15 | Output | Data | Plan DRAFT — reopen Step 3, release later |  | (end) |
| B16 | Planner | Decision | Approve plan? |  | B17 [No]; B18 [Pass] |
| B17 | Planner | Task | Reject Spray Out Plan | Web · Outsourcing Planning | B19 |
| B18 | Planner | Task | Approve Spray Out Plan | Web · Outsourcing Planning | B20 [APPROVED] |
| B19 | Output | Data | Plan REJECTED — source released, make a new plan |  | (end) |
| B20 | Planner | Task | Create Stock Out slip WH-TRM-01 → Vendor | System (auto) · Outsourcing Planning | B21; B22 |
| B21 | Output | Data | Stock Out slip → WMS (waiting for warehouse approval) |  | (end) |
| B22 | Warehouse Staff | Task | Approve Stock Out slip | Web · Outbound | B23 [Stock Out APPROVED] |
| B23 | Warehouse Staff | Task | Move plan to SENT (OUT DATE = approval date) | System (auto) · Outsourcing Planning | B24; B25 |
| B24 | Output | Data | Plan SENT — LOTs at vendor (WH-TRM-01 deducted), waiting for Outsourcing Result |  | (end) |
| B25 | Warehouse Staff | End | End |  |  |
| B26 | Planner | Start | Plan needs editing |  | B27 |
| B27 | Planner | Decision | Stock Out slip APPROVED? |  | B28 [Yes]; B29 [Not yet] |
| B28 | Output | Data | No edit — goods already issued to the vendor |  | (end) |
| B29 | Planner | Task | Edit Spray Out Plan (Edit / Revise plan) | Web · Outsourcing Planning | B30; B31 |
| B30 | Output | Data | Plan edited at Step 3 — the Stock Out slip follows |  | (end) |
| B31 | Planner | End | End |  |  |
| B32 | Planner | Start | Drop the plan |  | B33 |
| B33 | Planner | Decision | Plan DRAFT? |  | B34 [Yes]; B35 [No] |
| B34 | Planner | Task | Delete draft plan | Web · Outsourcing Planning | B36 |
| B35 | Planner | Decision | Stock Out slip not yet APPROVED? |  | B37 [No]; B38 [Yes] |
| B36 | Output | Data | Draft plan deleted · source released |  | (end) |
| B37 | Output | Data | Cannot cancel — the Stock Out slip is APPROVED |  | (end) |
| B38 | Planner | Task | Cancel Spray Out Plan | Web · Outsourcing Planning | B39; B40 |
| B39 | Output | Data | Plan CANCELLED — source released, Stock Out slip cancelled |  | (end) |
| B40 | Planner | End | End |  |  |

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

#### B06 · Create Spray Out Plan

- Planner · Web · Outsourcing Planning
- Comes from: B01, B05
- Goes to: B07 · Step 1 · Select Waiting SPRAY-OUT ZONE

> The Planner creates a new Spray Out Plan to send trimmed SPRAY goods to the spray vendor.  
> Action: Outsourcing Planning › "SPRAY OUT List" › "Create Plan" button → "Add Spray Out Plan" page; the "Plan Details" card has "Plan No." (Auto-generated) · "P.O (Month) *" · "Plan Date" · "Vendor *".  
> System: Plan No. is SPO-YYYYMMDD-NN; P.O (Month) defaults to the first month that still has SPRAY P.O with Remaining; the Vendor list comes from the spray-vendor master data (COVA, MINH HUY).  
> Blocked when: "Next" is pressed in Step 1 without a P.O (Month) — "Select P.O (Month) first."  
> Test:  
> - Leave P.O (Month) empty and press Next → the message above, no move to Step 2  
> Source: Q-20261001-10 (OQ-93) · Q-20260929-02 · prototype v0.69  

#### B07 · Step 1 · Select Waiting SPRAY-OUT ZONE

- Planner · Web · Outsourcing Planning
- Comes from: B02, B06
- Goes to: B08 · Step 2 · Pick Repair Inventory

> The Planner picks the SPRAY LOTs waiting to be sprayed — this step only selects, it does not allocate to a P.O.  
> Action: "Step 1 · Select Waiting SPRAY-OUT ZONE" › tick the "Select" column; columns LOT No. · Trimming Plan · P.O (Month) · WO No. · Model · Base Color · AL / INT · Grade · IN Date · Curing Days · quantity by size · Available.  
> System: "IN Date" = the date the LOT entered Curing; "Curing Days" = Plan Date − Curing Date. Step 1 has no Status column (Step 2 Repair still has one).  
> System: the source is the A + A- recorded at Trimming Result for Spray LOTs, held in WH-TRM-01; "Available" = recorded quantity − quantity held by other live Spray Out plans (DRAFT, NEW, APPROVED, SENT, RECEIVED).  
> Blocked when: the LOT is not SPRAY goods — "Logo output — unavailable for Spray Out"; the LOT is fully held — "Fully reserved" (the reason shows when hovering the locked tick box).  
> Test:  
> - A Logo LOT → its tick box is locked; hovering shows the reason above  
> - LOT of 100 pairs, another plan holds 60 → Available 40  
> Source: Q-20261001-10 (OQ-93) · Q-20260929-01 · Q-20261006-06 (3) · prototype v0.80  

#### B08 · Step 2 · Pick Repair Inventory

- Planner · Web · Outsourcing Planning
- Comes from: B03, B07
- Goes to: B09 · Step 3 · Allocate to Detail P.O

> The Planner also picks repaired Spray goods from the Repair warehouse to spray in the same plan — this step only selects.  
> Action: "Step 2 · Select Repair Inventory" › tick rows; columns Repair No. (with "from RW-…") · WO No. · Model · Base Color · AL / INT · quantity by size · Available.  
> System: only Repair / Rework slips already "Repaired" for SPRAY goods with Source "Trimming · Pending repair" are shown; "Available" = good repaired quantity − quantity held by other Spray Out plans − quantity used by Packing Plans on the same Repair row.  
> Result: SPRAY goods that went Pending repair at Trimming are ticked here once repaired and sent for painting with the plan; "Spray Out · Pending repair" goods do not come back here once repaired, they go to Step 2 of Packing Planning Spray.  
> Test:  
> - RW slip "Trimming · Pending repair" for SPRAY goods set to Repaired with 3 pairs → Step 2 shows a 3-pair row that can be ticked  
> - RW slip "Spray Out · Pending repair" set to Repaired → no row in this Step 2 (it shows in Packing Planning Spray)  
> Source: Q-20261013-01 · Q-20261001-11 (OQ-96) · prototype v0.91  

#### B09 · Step 3 · Allocate to Detail P.O

- Planner · Web · Outsourcing Planning
- Comes from: B04, B08
- Goes to: B10 · Allocation valid?

> The Planner allocates the stock picked in Step 1 and Step 2 to each Customer P.O — this is the only allocation step.  
> Action: "Step 3 · Allocate to Detail P.O" › block "Selected Stock (by size)" (Selected · "Allocated to P.O" · "Not Allocated"); each P.O has two rows "Remaining" / "Allocated" (input by size), "Action" column "Allocate" / "Remove", buttons "Auto Allocate", "Clear".  
> System: only SPRAY P.O of the same P.O (Month) that match Model · Base Color · AL / INT and the accepted Grade are listed; "Remaining" = P.O ORDER − quantity already allocated by other live Spray Out plans.  
> System: "Auto Allocate" uses repair stock first, then the P.O with the earliest ETD; one plan can hold several P.O; an empty Vendor takes the vendor of the first P.O.  
> Test:  
> - Pick 1,802 pairs, Auto Allocate → Repair rows are used first and the earliest-ETD P.O is filled first  
> - No matching P.O → "No Customer P.O in P.O Month … matches the selected stock."  
> Source: Q-20260929-06 · Q-20261001-10 (OQ-93) · prototype v0.69  

#### B10 · Allocation valid?

- Planner
- Comes from: B09
- Goes to [No]: B11 · Release blocked — over Available / Remaining P.O, no Vendor
- Goes to [Yes]: B12 · Release now?

> The system checks the allocation before saving or releasing the plan.  
> Yes: Vendor and Plan Date are set, all P.O share one P.O (Month), each LOT / size total ≤ "Available", each P.O / size total ≤ "Remaining", and at least one pair is allocated.  
> No: errors on the page — "Select the Vendor." · "LOT … / … exceeds Available (n)." · "P.O … / … exceeds the P.O Remaining (n)." · "All P.O of one plan must be in the same P.O Month." · "Allocate at least one pair to a Detail P.O."  
> Test:  
> - Available 136, enter 137 → blocked "exceeds Available (136)"  
> - P.O Remaining 80, enter 80 → allowed  
> Source: prototype v0.69  

#### B12 · Release now?

- Planner
- Comes from: B10
- Goes to [Not yet]: B13 · Save Spray Out Plan draft
- Goes to [Yes]: B14 · Release Spray Out Plan

> Does the Planner release the plan now or save a draft to keep editing?  
> Yes: press "Release Plan" in Step 3.  
> Not yet: press "Save Draft".  
> Source: prototype v0.69  

#### B13 · Save Spray Out Plan draft

- Planner · Web · Outsourcing Planning
- Comes from: B12
- Goes to: B15 · Plan DRAFT — reopen Step 3, release later

> The Planner saves the plan as a draft to reopen and edit later.  
> Action: Step 3 › "Save Draft" button.  
> Result: plan → DRAFT; the allocated quantities are held at once (deducted from LOT / Repair Available and P.O Remaining) until the draft is deleted; reopening the plan goes straight to Step 3.  
> Test:  
> - A draft holding 40 pairs of LOT A → another plan sees LOT A Available reduced by 40  
> Open: whether a DRAFT plan should hold the source — prototype v0.69 holds it from the moment the draft is saved.  
> Source: prototype v0.69  

#### B14 · Release Spray Out Plan

- Planner · Web · Outsourcing Planning
- Comes from: B12
- Goes to [NEW]: B16 · Approve plan?

> The Planner releases the plan for approval.  
> Action: Step 3 › "Release Plan" button → dialog "Release Spray Out Plan …?" (P.O (Month) · P.O in plan · Vendor · Plan Date · Send Qty, size table by "P.O · LOT / Repair") › "Release Plan".  
> System: re-checks as in "Allocation valid?"; quantities by size are held for each Customer P.O, repair stock first.  
> Result: plan → NEW (waiting for approval); message "… released · New (waiting for approval) · n P.O · n pairs reserved · Vendor …".  
> Test:  
> - Release a plan with 2 P.O → SPRAY OUT List shows two rows (one per P.O) with the same plan number  
> Source: Q-20261001-10 (OQ-93) · prototype v0.69  

#### B16 · Approve plan?

- Planner
- Comes from: B14
- Goes to [No]: B17 · Reject Spray Out Plan
- Goes to [Pass]: B18 · Approve Spray Out Plan

> The Planner decides whether the NEW plan may be sent to the spray vendor.  
> Pass: press "Approve" on the plan detail page.  
> No: press "Reject".  
> Open: the Planner approving differs from BRD §7 (Production Supervisor approves) — awaiting customer confirmation.  
> Source: Q-20261005-01 (2) · Q-20260928-04 · prototype v0.69  

#### B17 · Reject Spray Out Plan

- Planner · Web · Outsourcing Planning
- Comes from: B16
- Goes to: B19 · Plan REJECTED — source released, make a new plan

> The Planner rejects the plan with a reason; the held source is released.  
> When: plan NEW.  
> Action: plan detail page › "Reject" button → dialog "Reject Spray Out Plan …?" › enter the reason › "Reject".  
> Result: plan → REJECTED, a final status — it cannot be reopened; LOTs, Repair rows and P.O Remaining are released ("LOT reservation released"); the Planner makes a new plan if needed.  
> Blocked when: the reason is empty.  
> Test:  
> - Reject a plan holding 40 pairs of LOT A → a new plan sees LOT A Available back up by 40  
> - Reject without a reason → cannot be saved  
> Open: prototype v0.69 has no reason field in the Reject dialog yet.  
> Source: Q-20260923-19 (C) · Q-20261005-01 (2) · prototype v0.69  

#### B18 · Approve Spray Out Plan

- Planner · Web · Outsourcing Planning
- Comes from: B16
- Goes to [APPROVED]: B20 · Create Stock Out slip WH-TRM-01 → Vendor

> The Planner approves the plan so the goods can be shipped to the spray vendor.  
> When: plan NEW.  
> Action: plan detail page › "Approve" button → dialog "Approve Spray Out Plan …?" › "Approve".  
> System: re-checks the allocation as at Release (Vendor, Available, P.O Remaining).  
> Result: plan → APPROVED; the system then creates the Stock Out slip (next step).  
> Test:  
> - Approve a NEW plan → plan APPROVED with one Stock Out slip carrying the plan number  
> Source: Q-20261005-01 (2) · Q-20261005-04 · prototype v0.69  

#### B20 · Create Stock Out slip WH-TRM-01 → Vendor

- Planner · System (auto) · Outsourcing Planning
- Comes from: B18
- Goes to: B21 · Stock Out slip → WMS (waiting for warehouse approval)
- Goes to: B22 · Approve Stock Out slip

> The system creates one Stock Out slip to issue the plan goods from WH-TRM-01 to the Vendor.  
> When: the plan becomes APPROVED.  
> System: one slip per plan, issuing warehouse WH-TRM-01, receiver = plan Vendor; one slip line per plan line (LOT or Repair row × Customer P.O) by size; LOT / Repair goods only, no other material.  
> Result: the Stock Out slip waits for warehouse approval on the WMS Outbound screen; WH-TRM-01 stock does not change until the slip is APPROVED.  
> Test:  
> - Approve a plan of 4 lines, 2,050 pairs → Stock Out slip with 4 lines, 2,050 pairs, Vendor COVA  
> Open: the slip status at creation (SAVED or SUBMITTED) and its number; prototype v0.69 still creates an MOR-SO instead of a Stock Out.  
> Source: Q-20261005-04 · Q-20260930-05 (Curing Stock Out precedent)  

#### B22 · Approve Stock Out slip

- Warehouse Staff · Web · Outbound
- Comes from: B20
- Goes to [Stock Out APPROVED]: B23 · Move plan to SENT (OUT DATE = approval date)

> The Warehouse Staff approves the Stock Out slip when the goods actually leave the factory for the spray vendor.  
> When: the Stock Out slip of an APPROVED plan is not yet APPROVED.  
> Action: WMS › "Outbound" screen (Stock Out) › open the slip carrying the Spray Out Plan number › Approve.  
> System: deducts the slip LOTs / Repair rows from WH-TRM-01 by size under the WMS Slip rules.  
> Result: Stock Out slip → APPROVED; the plan moves to SENT in the next step.  
> Test:  
> - LOT of 1,826 pairs, slip issues 640 of it → after the slip is APPROVED the LOT stock in WH-TRM-01 is 1,186  
> Open: who submits the slip before approval, and whether the warehouse may change quantities on the generated slip.  
> Source: Q-20261005-05 (2)  

#### B23 · Move plan to SENT (OUT DATE = approval date)

- Warehouse Staff · System (auto) · Outsourcing Planning
- Comes from: B22
- Goes to: B24 · Plan SENT — LOTs at vendor (WH-TRM-01 deducted), waiting for Outsourcing Result
- Goes to: B25 · End

> The system moves the plan to SENT when its Stock Out slip is approved.  
> When: the plan Stock Out slip becomes APPROVED.  
> System: plan OUT DATE = the slip approval date; "At vendor" = Send Qty.  
> Result: plan → SENT; the plan appears in "Waiting to Return" of Outsourcing Result. Outsourcing Planning no longer has the "Send to vendor" block or the "Confirm Spray Out" button.  
> Test:  
> - Slip APPROVED on 2026-08-11 → plan SENT, OUT DATE 2026-08-11  
> Open: prototype v0.69 still shows the "Send to vendor" block with "OUT DATE" and the "Confirm Spray Out" button.  
> Source: Q-20261005-05 (2)  

#### B27 · Stock Out slip APPROVED?

- Planner
- Comes from: B26
- Goes to [Yes]: B28 · No edit — goods already issued to the vendor
- Goes to [Not yet]: B29 · Edit Spray Out Plan (Edit / Revise plan)

> Can the plan still be edited?  
> Not yet: plan DRAFT, NEW, or APPROVED with the Stock Out slip not yet APPROVED → editing allowed.  
> Yes: the Stock Out slip is APPROVED (goods issued, plan SENT / RECEIVED) → no edit; REJECTED / CANCELLED cannot be reopened either.  
> Source: Q-20261005-05 (1)  

#### B29 · Edit Spray Out Plan (Edit / Revise plan)

- Planner · Web · Outsourcing Planning
- Comes from: B27
- Goes to: B30 · Plan edited at Step 3 — the Stock Out slip follows
- Goes to: B31 · End

> The Planner reopens a plan whose goods have not been issued to change the allocation.  
> When: plan DRAFT / NEW ("Edit plan" button) or APPROVED with the Stock Out slip not yet APPROVED ("Revise plan" button).  
> Action: detail page › "Edit plan" / "Revise plan" → the "Edit Spray Out Plan" page opens at Step 3 › "Save Draft", "Release Plan" or "Save revision".  
> Result: DRAFT / NEW save per the button; APPROVED with "Save revision" → the plan stays APPROVED and the system updates the Stock Out slip lines to the new quantities.  
> Blocked when: the plan was changed by someone else or the slip is APPROVED — "The plan changed or has already shipped. Reopen the current plan before editing."  
> Test:  
> - Revise an APPROVED plan down by 40 pairs while the slip is not APPROVED → the Stock Out slip drops by 40 pairs  
> Open: revising an APPROVED plan skips re-approval — differs from the rule that a Revision goes back to DRAFT and is approved again.  
> Source: Q-20261005-05 (1) · prototype v0.69  

#### B33 · Plan DRAFT?

- Planner
- Comes from: B32
- Goes to [Yes]: B34 · Delete draft plan
- Goes to [No]: B35 · Stock Out slip not yet APPROVED?

> Is the plan to drop still a draft?  
> Yes: plan DRAFT → can be deleted.  
> No: check whether it can be cancelled.  
> Source: prototype v0.69  

#### B34 · Delete draft plan

- Planner · Web · Outsourcing Planning
- Comes from: B33
- Goes to: B36 · Draft plan deleted · source released

> The Planner deletes a draft plan that is no longer needed.  
> Action: DRAFT plan detail page › "Delete Draft" button.  
> Result: the plan is deleted; the held source and P.O Remaining are released; message "… deleted · reservation released".  
> Test:  
> - A NEW plan → no "Delete Draft" button  
> Source: prototype v0.69  

#### B35 · Stock Out slip not yet APPROVED?

- Planner
- Comes from: B33
- Goes to [No]: B37 · Cannot cancel — the Stock Out slip is APPROVED
- Goes to [Yes]: B38 · Cancel Spray Out Plan

> Can the plan still be cancelled?  
> Yes: plan NEW, or APPROVED with the Stock Out slip not yet APPROVED → cancellation allowed.  
> No: the Stock Out slip is APPROVED (goods issued) → no cancellation; message "Status cannot change after shipment or receipt."  
> Source: Q-20261005-05 (1)  

#### B38 · Cancel Spray Out Plan

- Planner · Web · Outsourcing Planning
- Comes from: B35
- Goes to: B39 · Plan CANCELLED — source released, Stock Out slip cancelled
- Goes to: B40 · End

> The Planner cancels a plan whose goods have not been issued.  
> Action: plan detail page › "Cancel Plan" button → dialog "Cancel Spray Out Plan …?" › "Cancel Plan".  
> Result: plan → CANCELLED; the source and P.O Remaining are released ("LOT reservation released"); for an APPROVED plan whose Stock Out slip is not APPROVED, the system cancels that slip.  
> Test:  
> - Cancel an APPROVED plan holding 100 pairs with the slip not APPROVED → the LOT has 100 pairs Available again, the Stock Out slip is CANCELLED, WH-TRM-01 stock unchanged  
> Source: Q-20261005-05 (1) · prototype v0.69  

## Status lifecycle

#### Spray Out Plan

`DRAFT` → `NEW` → `REJECTED` → `APPROVED` → `CANCELLED` → `SENT` → `RECEIVED`

Transitions:

- `DRAFT` -- Release Plan --> `NEW`
- `NEW` -- Approve · sinh Stock Out --> `APPROVED`
- `APPROVED` -- Stock Out APPROVED (WMS) --> `SENT`
- `SENT` -- Record Result — Remaining used up --> `RECEIVED`
- `DRAFT` -- Delete Draft --> `Deleted`
- `NEW` -- Reject --> `REJECTED`
- `APPROVED` -- Cancel Plan --> `CANCELLED`
- `NEW` -- Edit plan · Save Draft --> `DRAFT` (back)
- `NEW` -- Cancel Plan --> `CANCELLED`

## Input

| # | Input | Type | Used in step |
| --- | --- | --- | --- |
| I-1 | Vendor master data (spray vendors, e.g. COVA · MINH HUY) | Master data | Create Spray Out Plan |
| I-2 | Waiting SPRAY-OUT ZONE — Spray LOTs with A + A- recorded at Trimming Result, held in warehouse WH-TRM-01 | Process inventory — Trimming flow | Step 1 · Select Waiting SPRAY-OUT ZONE LOTs |
| I-3 | Repair Inventory — Spray goods repaired (Repaired) at Repair / Rework, including Pending repair received from the vendor | Stock pool — Repair / Rework flow | Step 2 · Pick Repair Inventory |
| I-4 | Customer P.O SPRAY · ETD · P.O Month (from the Sales Order) | Document — Sales Order | Step 3 · Allocate to Detail P.O |

## Step ↔ screen

| Step | Role | Screen · UI button |
| --- | --- | --- |
| Create Spray Out Plan | Planner | Outsourcing Planning · `SPRAY OUT List` · `Create Plan` → `Add Spray Out Plan` (card `Plan Details`) |
| Step 1 · Select Waiting SPRAY-OUT ZONE LOTs · Step 2 · Select Repair Inventory · Step 3 · Allocate to Detail P.O | Planner | Outsourcing Planning · `Step 1 · Select Waiting SPRAY-OUT ZONE` · `Step 2 · Select Repair Inventory` · `Step 3 · Allocate to Detail P.O` (`Allocate`, `Remove`, `Auto Allocate`, `Clear`) |
| Save draft · Release Spray Out Plan | Planner | Outsourcing Planning · `Save Draft`, `Release Plan` |
| Approve · Reject Spray Out Plan | Planner | Outsourcing Planning · `Spray Out Plan detail` (`Approve`, `Reject`) |
| Create Stock Out slip WH-TRM-01 → Vendor | System (auto) | Outsourcing Planning · khi Approve |
| Approve Stock Out slip → plan SENT | Warehouse Staff · System (auto) | WMS · `Outbound` (Stock Out); plan SENT, OUT DATE = approval date |
| Edit · Delete draft · Cancel Spray Out Plan | Planner | Outsourcing Planning · `Edit plan`, `Revise plan`, `Delete Draft`, `Cancel Plan` |

## Output

| # | Output | Produced when |
| --- | --- | --- |
| O-1 | Release blocked — over Available / P.O Remaining, no Vendor | The Step 3 allocation fails the checks |
| O-2 | Plan `DRAFT` — reopen at Step 3, release later | The Planner clicks `Save Draft` |
| O-3 | Plan `REJECTED` + reason — source released, make a new plan | The Planner clicks `Reject` plan `NEW` |
| O-5 | Stock Out slip WH-TRM-01 → Vendor sent to WMS (waiting for warehouse approval) | The plan becomes `APPROVED` |
| O-6 | Plan `SENT` — LOTs at vendor (WH-TRM-01 deducted), waiting for Outsourcing Result | The plan Stock Out slip `APPROVED` in WMS |
| O-7 | No edit — goods already at the vendor | Plan `SENT` / `RECEIVED` |
| O-8 | Plan edited at Step 3 — the Stock Out slip follows the new quantities | The Planner edits plan `DRAFT` / `NEW` / `APPROVED` |
| O-9 | Draft plan deleted · source released | The Planner clicks `Delete Draft` |
| O-10 | Cannot cancel — the Stock Out slip is APPROVED | Plan `SENT` / `RECEIVED` |
| O-11 | Plan `CANCELLED` — source released, the unapproved Stock Out slip is cancelled | The Planner clicks `Cancel Plan` plan `NEW` / `APPROVED` |

## Glossary

| Glossary | Meaning in this flow |
| --- | --- |
| `P.O` | Customer PO — the customer order; one Spray Out Plan can hold several P.O of the same P.O (Month) |
| `P.O (Month)` | Month of the P.O; all P.O in one plan must share the month |
| `Waiting SPRAY-OUT ZONE` | Zone waiting for spraying: Spray LOTs with A + A- recorded at Trimming Result, held in WH-TRM-01 |
| `Repair Inventory` | Spray goods repaired (Repaired) at Repair / Rework |
| `Available` | Quantity still selectable on a LOT / Repair row = source quantity − quantity held by other live plans |
| `Remaining` | Quantity of the P.O still to be sprayed = ORDER − quantity allocated by other live Spray Out plans |
| `Vendor` | Spray supplier that receives the goods (e.g. COVA, MINH HUY) |
| `OUT DATE` | Date the goods leave for the vendor = date the plan Stock Out slip is approved |
| `Stock Out` | WMS issue slip (Outbound screen); created by the system on Approve of a Spray Out Plan, issuing the plan LOTs / Repair rows from WH-TRM-01 to the Vendor |
| `SENT` | Goods have left the factory and are at the spray vendor; received back in Outsourcing Result |
| `A / A-` | Good grade (A) and good with minor defects (A-) |
