# Packing Result Logo — the Packing Operator records A / A- / C / Pending repair by size for RELEASED plans, Record Output many times; A + A- automatically create a WMS Product Income receipt request per Customer P.O; C goes to Defect Records, Pending repair opens a Repair / Rework record, unrecorded Remaining returns to the P.O balance in Packing Planning Logo

> Fine Chemical (FC) · MES module · v0.5 · 14/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/packing-result-logo

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

### Steps

| Code | Role | Type | Content | Platform · Screen | Goes to |
| --- | --- | --- | --- | --- | --- |
| B01 | Input | Data | Plan RELEASED · Waiting — Packing Planning Logo |  | B04 |
| B02 | Input | Data | Plan RELEASED cho P.O P.O — Exchange Customer PO |  | B04 |
| B03 | Packing Operator | Start | Start |  | B04 |
| B04 | Packing Operator | Task | Open plan in Packing Result | Web · Packing Result Logo | B05 |
| B05 | Packing Operator | Task | Enter A / A- / C / Pending repair by size | Web · Packing Result Logo | B06 |
| B06 | Packing Operator | Decision | Entry valid? |  | B05 [No — fix]; B07 [Yes] |
| B07 | Packing Operator | Task | Confirm Record Output | Web · Packing Result Logo | B08 |
| B08 | Packing Operator | Task | Accumulate Output · reduce Remaining | System (auto) · Packing Result Logo | B09; B10 |
| B09 | Packing Operator | Task | Create receipt request by Customer P.O | System (auto) · Packing Result Logo | B11; B12 |
| B10 | Packing Operator | Decision | Remaining left? |  | B05 [Yes — next time]; B13 [No] |
| B11 | Output | Data | A + A- by Customer P.O → WMS Product Income |  | (end) |
| B12 | Packing Operator | Task | Open Repair / Rework record per size with PR > 0 | System (auto) · Packing Result Logo | B14; B15 |
| B13 | Packing Operator | Task | Close plan — Packed | System (auto) · Packing Result Logo | B16 |
| B14 | Output | Data | Repair / Rework record per size PR (Source Packing Logo · Pending repair) |  | (end) |
| B15 | Packing Operator | Task | Write C to Defect Records by reason | System (auto) · Packing Result Logo | B17; B18 |
| B16 | Packing Operator | End | End |  |  |
| B17 | Output | Data | Defect Records — C Packing Logo by reason (scrap) |  | (end) |
| B18 | Packing Operator | Task | Return the unrecorded Remaining to the P.O balance | System (auto) · Packing Result Logo | B19 |
| B19 | Output | Data | Unrecorded Remaining → Packing Planning Logo |  | (end) |

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

#### B04 · Open plan in Packing Result

- Packing Operator · Web · Packing Result Logo
- Comes from: B01, B02, B03
- Goes to: B05 · Enter A / A- / C / Pending repair by size

> The Packing Operator opens an approved plan to record the packing result.  
> Action: Packing Result Logo › "Packing List" table › click the plan row.  
> System: the "Packing List" filters All / Waiting / Packing / Packed; columns Plan Qty, Recorded, Packed, Remaining, Status.  
> System: only plans RELEASED in Packing Planning Logo are listed, including target-P.O plans created by Exchange Customer PO; the page shows the "Work Order" card (Plan, P.O, WO No., Model, Color, Destination, Plan Qty, Recorded, Remaining) and a read-only "Packing Material by Size (Packing BOM)" with the plan MOR chip.  
> Result: the "Output Matrix (Item / Size)" opens for entry.  
> Test:  
> - A plan with MOR-PK-2601 → the material card shows the chip "MOR-PK-2601 · Requested"  
> Source: Q-20261001-06 · Q-20261001-08 · Q-20261002-04 · Q-20261005-02 · prototype v0.70  

#### B05 · Enter A / A- / C / Pending repair by size

- Packing Operator · Web · Packing Result Logo
- Comes from: B04, B06, B10
- Goes to: B06 · Entry valid?

> The Packing Operator enters this round of packing results by size.  
> Action: "Output Matrix (Item / Size)" › rows "A" (First grade), "A-" (First grade, minor), "C" (Reject), "PR" (Pending repair); "Fill A = Open Qty" fills A with Remaining, "Clear" clears.  
> System: "This Entry = A + A- + C + Pending repair"; "Remaining = Plan Qty − Already Recorded − This Entry"; a C cell above 0 shows the block "Defect Reason Breakdown (grade C)" with one row per reason "Defect Reason" · "Qty" · "Defect Detail" and the button "Add Defect Line".  
> Test:  
> - Plan W5 60 pairs, enter A 50 · C 2 · PR 6 → This Entry 58, Remaining 2  
> - C 2 split into the reason "Color mismatch" 2 → the reason block balances  
> Open: the Defect Reason list is shared with Outsourcing Result (OQ-128).  
> Source: Q-20261001-06 · Q-20261013-01 · prototype v0.91  

#### B06 · Entry valid?

- Packing Operator
- Comes from: B05
- Goes to [No — fix]: B05 · Enter A / A- / C / Pending repair by size
- Goes to [Yes]: B07 · Confirm Record Output

> The system checks the entry before recording it.  
> Yes: total This Entry > 0, This Entry ≤ Remaining for every size and grade C fully split across reasons → popup "Record packing output for …?" opens.  
> No: an error shows and the entry must be fixed — total 0 → "Enter A / A- / C / Pending repair before recording output."; over → "This Entry is more than Remaining at <size>."; C not fully split across reasons → "Grade C quantity recorded — map the defect quantity to a defect reason."  
> Test:  
> - A size with Remaining 2, enter A 3 → "This Entry is more than Remaining at …", nothing is recorded  
> - C 6 with no reason row → reason error, nothing is recorded  
> Source: Q-20261013-01 · prototype v0.91  

#### B07 · Confirm Record Output

- Packing Operator · Web · Packing Result Logo
- Comes from: B06
- Goes to: B08 · Accumulate Output · reduce Remaining

> The Packing Operator confirms recording this entry.  
> Action: "Record Output" button → popup (Packing Plan · P.O · Model · This Entry · C → Defect Records · Pending repair · Pending repair → Repair / Rework · Remaining after entry) → "Record Output" button.  
> Result: a row is added to "Output Entries" (#, A, A-, C, Pending repair, Total, Recorded At, By); entries can be repeated until Remaining = 0.  
> Test:  
> - First recording → message "<plan> · output entry #1 recorded" with "C … pairs → Defect Records" and "Pending repair → n Repair / Rework record(s)"  
> Source: Q-20261001-06 · Q-20261013-01 · prototype v0.91  

#### B08 · Accumulate Output · reduce Remaining

- Packing Operator · System (auto) · Packing Result Logo
- Comes from: B07
- Goes to: B09 · Create receipt request by Customer P.O
- Goes to: B10 · Remaining left?

> The system accumulates the results and updates the plan Remaining.  
> System: Recorded = Σ (A + A- + C + Pending repair) of all entries; Remaining = Plan Qty − Recorded; a first entry that leaves Remaining sets Status "Packing".  
> Result: a plan with any Record Output no longer offers "Revision" in Packing Planning Logo.  
> Test:  
> - First entry records 58 / 60 pairs → Status "Packing", Remaining 2, the plan loses its "Revision" button  
> Open: whether Pending repair is deducted from the plan Remaining or the plan is only Packed once A + A- + C are complete (OQ-127).  
> Source: Q-20261001-06 · prototype v0.91  

#### B09 · Create receipt request by Customer P.O

- Packing Operator · System (auto) · Packing Result Logo
- Comes from: B08
- Goes to: B11 · A + A- by Customer P.O → WMS Product Income
- Goes to: B12 · Open Repair / Rework record per size with PR > 0

> The system creates a finished-goods receipt request for the A + A- part of the entry.  
> System: quantity by size = A + A- of the Record Output, carrying the plan Customer P.O, WO, Model and Destination.  
> Result: the receipt request goes to WMS Product Income so the warehouse receives FG by Customer P.O; MES has no separate FG receipt step.  
> Test:  
> - Entry A 50 · A- 4 · C 2 · PR 6 → receipt request for 54 pairs  
> Open: one request per Record Output or one per P.O, and how it relates to the Product Income Request created from the Sales Order; prototype v0.70 does not have this step yet.  
> Source: Q-20261002-02 (2) · Q-20260929-04 (OQ-02)  

#### B10 · Remaining left?

- Packing Operator
- Comes from: B08
- Goes to [Yes — next time]: B05 · Enter A / A- / C / Pending repair by size
- Goes to [No]: B13 · Close plan — Packed

> The system checks whether the plan still has unrecorded quantity.  
> Yes: Remaining > 0 → the plan stays "Packing" and the Packing Operator records again later.  
> No: Remaining = 0 → the plan is "Packed" and the button turns into "All quantity recorded".  
> Source: Q-20261001-06 · prototype v0.70  

#### B12 · Open Repair / Rework record per size with PR > 0

- Packing Operator · System (auto) · Packing Result Logo
- Comes from: B09
- Goes to: B14 · Repair / Rework record per size PR (Source Packing Logo · Pending repair)
- Goes to: B15 · Write C to Defect Records by reason

> The system automatically opens Repair / Rework records for the Pending repair goods of the entry; PR does not return to the P.O balance and is not written to Defect Records.  
> When: the Record Output entry has "Pending repair" > 0 in at least one size.  
> System: each size with PR > 0 creates one RW-… record, status Pending, Source "Packing Logo · Pending repair", carrying the LOT No., WO and SO of the plan; the popup shows "Pending repair → Repair / Rework" with "n record(s) · Source Packing Logo · Pending repair".  
> Result: message "… · Pending repair → n Repair / Rework record(s)"; QC continues on the Repair / Rework screen.  
> Test:  
> - PR W5 10 + W7 20 → 2 records "Packing Logo · Pending repair" (qty 10 and 20)  
> Open: repaired goods of "Packing Logo · Pending repair" have no destination Repair Inv List yet (OQ-126).  
> Source: Q-20261013-01 · prototype v0.91  

#### B13 · Close plan — Packed

- Packing Operator · System (auto) · Packing Result Logo
- Comes from: B10
- Goes to: B16 · End

> The system closes the plan once every quantity has a result.  
> Result: Status "Packed"; the "Output Matrix" is locked; the "Packed" column of the "Packing List" = Σ (A + A-).  
> Test:  
> - Next entry with "Fill A = Open Qty" then "Record Output" → Status "Packed", Remaining 0  
> Source: Q-20261001-06 · CHANGELOG v0.58 · prototype v0.70  

#### B15 · Write C to Defect Records by reason

- Packing Operator · System (auto) · Packing Result Logo
- Comes from: B12
- Goes to: B17 · Defect Records — C Packing Logo by reason (scrap)
- Goes to: B18 · Return the unrecorded Remaining to the P.O balance

> The system writes the grade C goods of the entry to Defect Records by defect reason; C is scrap, so it creates no Repair / Rework record.  
> When: the Record Output entry has C > 0.  
> System: one Defect Records line per reason, Process "Packing Logo", carrying WO, SO, quantity and reason; an error shows at the check step when the reasons differ from the C total.  
> Test:  
> - C 10, reason "Color mismatch" 10 → Defect Records gains 1 line with Process "Packing Logo" qty 10, and Repair / Rework gets no record from C  
> Source: Q-20261013-01 · prototype v0.91  

#### B18 · Return the unrecorded Remaining to the P.O balance

- Packing Operator · System (auto) · Packing Result Logo
- Comes from: B15
- Goes to: B19 · Unrecorded Remaining → Packing Planning Logo

> The system returns the unrecorded Remaining to the P.O balance so the Planner can create another plan for the WO in Packing Planning Logo; Pending repair is not part of the returned quantity.  
> System: the result page shows "Remaining goes back to Packing Planning Logo for another plan of this WO"; the P.O balance adds the Remaining back by size.  
> Test:  
> - Plan 690, record 85 (A 40 + A- 5 + C 10 + PR 30) → Remaining 605 is shown as returned to Packing Planning Logo  
> Open: when the unrecorded Remaining is returned — the prototype only shows a reminder strip and does not add it back to the balance yet.  
> Source: Q-20261001-06 · Q-20261013-01 · prototype v0.91  

## Status lifecycle

#### Packing Result

`WAITING` → `PACKING` → `PACKED`

Transitions:

- `WAITING` -- Record Output — Remaining left --> `PACKING`
- `PACKING` -- Record Output — Remaining 0 --> `PACKED`
- `WAITING` -- One Record Output clears Remaining --> `PACKED` (back)

## Input

| # | Input | Type | Used in step |
| --- | --- | --- | --- |
| I-1 | Packing Plan `RELEASED` in Packing Planning Logo, status Waiting — one Customer P.O per plan, with the packing material MOR | Document — flow Packing Planning Logo | Open the plan in Packing Result |
| I-2 | Packing Plan `RELEASED` for the target P.O, created when the Exchange Customer PO ticket is `CONFIRMED` — carries the MOR number of the source plan; deleted when the ticket is cancelled with Cancel Exchange (only while the plan has no Record Output) | Document — Exchange Customer PO flow | Open the plan in Packing Result |

## Step ↔ screen

| Step | Role | Screen · UI button |
| --- | --- | --- |
| Open the plan in Packing Result · Enter A / A- / C / Pending repair by size · Confirm Record Output | Packing Operator | Packing Result Logo · `Packing List` · `Output Matrix (Item / Size)` (`Fill A = Open Qty`, `Clear`, `Record Output`) |
| Add up Output · reduce Remaining · Create the stock request by Customer P.O · Open a Repair / Rework record for each size with PR > 0 · Write C to Defect Records by reason · Return the unrecorded Remaining to the P.O balance · Close the plan — Packed | System (auto) | Packing Result Logo |

## Output

| # | Output | Produced when |
| --- | --- | --- |
| O-1 | Finished-goods receipt request for A + A- by Customer P.O and size → WMS Product Income | Each Record Output with A + A- > 0 |
| O-2 | Repair / Rework record for each size with PR > 0 (Source `Packing Logo · Pending repair`) | Record Output has Pending repair > 0 |
| O-3 | Defect Records — C of Packing Result by reason (Process `Packing Logo`), creates no repair record | Record Output with C > 0 |
| O-4 | Unrecorded Remaining → P.O balance in Packing Planning Logo so the Planner can create another plan for the WO | The plan still has Remaining after Record Output |

## Glossary

| Glossary | Meaning in this flow |
| --- | --- |
| `P.O` | Customer P.O — the customer order; each Packing Plan belongs to exactly one P.O |
| `Plan Qty` | Total Allocated of the plan by size (Daily Packing Q'ty) — basis for Remaining in Packing Result and for the MOR material |
| `Output Matrix · A / A- / C / PR` | Packing result entry table by size: A first grade · A- first grade, minor defect · C reject · PR (Pending repair) waiting for repair |
| `This Entry · Remaining` | This Entry = A + A- + C + Pending repair of the entry; Remaining = Plan Qty − Already Recorded − This Entry |
| `Waiting · Packing · Packed` | Plan status in Packing Result: nothing recorded · recorded with Remaining left · Remaining = 0 |
| `Exchange Customer PO (EXC)` | Separate function to move goods between Customer P.Os — see the Exchange Customer PO flow |
