# FG Receipt — receive finished lots into the FG warehouse, allocate them to Sales Orders by ETD, hand them to WMS

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

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

### Steps

| Code | Role | Type | Content | Platform · Screen | Goes to |
| --- | --- | --- | --- | --- | --- |
| B01 | Input | Data | Packing Output completed + FG Handover Note |  | B07 |
| B02 | Input | Data | Lots that finished the last process (routing without Packing) |  | B07 |
| B03 | Input | Data | Master data: FG Warehouse · Bin | Master data | B13 |
| B04 | Input | Data | QA disposition for Critical defects |  | B16 |
| B05 | Input | Data | SO lines allocated to the WO (Qty · Current ETD) |  | B22 |
| B06 | System | Start | Start |  | B07 |
| B07 | System | Task | Put lots into the FG Queue | System (auto) · FG Receipt | B08 [Waiting FG] |
| B08 | Warehouse Staff | Task | Filter the FG Queue by SO · WO | Web · FG Receipt | B09 |
| B09 | Warehouse Staff | Task | Select SO lines · lots to receive | Web · FG Receipt | B10 |
| B10 | Warehouse Staff | Task | Press Receive to Warehouse | Web · FG Receipt | B11 |
| B11 | Warehouse Staff | Decision | At least one line selected? |  | B12 [No]; B13 [Yes] |
| B12 | Output | Data | Blocked: "Select at least one SO line." |  | (end) |
| B13 | Warehouse Staff | Task | Select receiving warehouse · Bin | Web · FG Receipt | B14 |
| B14 | Warehouse Staff | Decision | Destination warehouse set? |  | B15 [No]; B16 [Yes] |
| B15 | Output | Data | Blocked: "Scan or select the destination FG warehouse first." |  | (end) |
| B16 | Warehouse Staff | Decision | Any Critical lot without QA disposition? |  | B17 [Yes]; B18 [No] |
| B17 | Warehouse Staff | Task | Remove blocked lots from the receipt | System (auto) · FG Receipt | B19; B18 [remaining lots] |
| B18 | Warehouse Staff | Task | Confirm Warehouse-In | Web · FG Receipt | B20 |
| B19 | Output | Data | Blocked lots stay in FG Queue — awaiting QA disposition |  | (end) |
| B20 | System | Task | Create FG Receipt Received | System (auto) · FG Receipt | B21; B22 |
| B21 | Output | Data | FG Receipt FGR-nnnn Received · lot · warehouse · Bin |  | (end) |
| B22 | System | Task | Allocate FG to the WO's SOs by ETD | System (auto) · FG Receipt | B23 |
| B23 | System | Decision | Any quantity without Customer PO? |  | B24 [Yes]; B25 [No] |
| B24 | System | Task | Move the surplus to Common Stock | System (auto) · FG Receipt | B26; B25 |
| B25 | System | Task | Update WO Completed Qty | System (auto) · FG Receipt | B27; B28 |
| B26 | Output | Data | Quantity without Customer PO → Common Stock |  | (end) |
| B27 | Output | Data | WO Completed Qty + received SO allocation |  | (end) |
| B28 | System | Task | Sinh Product Income Request | System (auto) · FG Receipt | B29; B30 |
| B29 | Output | Data | Product Income Request → WMS Product Income |  | (end) |
| B30 | System | End | End |  |  |

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

#### B07 · Put lots into the FG Queue

- System · System (auto) · FG Receipt
- Comes from: B06, B01, B02
- Goes to [Waiting FG]: B08 · Filter the FG Queue by SO · WO

> The system puts lots that finished their last process into the finished-goods receiving queue.  
> System: the default source is handed-over Packing lots (Complete Packing Output + FG Handover Note); if the routing has no Packing, the lot comes straight from the last process without Packing QC.  
> Result: the lot is on the "FG Queue" tab ("SO lines that finished the last routing process — choose a warehouse and receive them."), status "Waiting FG", sorted by ascending ETD; KPIs "LOTS WAITING" · "WAITING QTY".  
> Source: Q-20260918-31 · prototype v0.23  

#### B08 · Filter the FG Queue by SO · WO

- Warehouse Staff · Web · FG Receipt
- Comes from: B07
- Goes to: B09 · Select SO lines · lots to receive

> The Warehouse Staff filters the queue by sales order or work order.  
> Action: the "All sales orders" / per-SO selector; search by WO / SO.  
> System: columns "SO No." · "Customer" · "ETD" · "Lot No." · "WO No." · "Item Group" · "Item" · W5…W11 · "Total" · "Finished" · "Status".  
> Source: prototype v0.23  

#### B09 · Select SO lines · lots to receive

- Warehouse Staff · Web · FG Receipt
- Comes from: B08
- Goes to: B10 · Press Receive to Warehouse

> The Warehouse Staff selects the SO lines / lots to receive into the warehouse.  
> Action: tick each row, or the header box to select all.  
> System: counter "n SO line(s) · n pairs".  
> Source: prototype v0.23  

#### B10 · Press Receive to Warehouse

- Warehouse Staff · Web · FG Receipt
- Comes from: B09
- Goes to: B11 · At least one line selected?

> The Warehouse Staff opens a finished-goods receipt for the selected lines.  
> Action: "Receive to Warehouse" button next to "DEFAULT WAREHOUSE" (e.g. "WH-FG-01 / Finished Goods A").  
> Result: the receipt request opens with the default warehouse pre-filled; another warehouse can be picked or scanned ("The receipt request opens with this warehouse pre-filled — you can change or scan another one there.").  
> Source: prototype v0.23  

#### B11 · At least one line selected?

- Warehouse Staff
- Comes from: B10
- Goes to [No]: B12 · Blocked: "Select at least one SO line."
- Goes to [Yes]: B13 · Select receiving warehouse · Bin

> Is at least one SO line selected?  
> Yes: open the receipt.  
> No: blocked with "Select at least one SO line."  
> Test:  
> - Click "Receive to Warehouse" with no row ticked → blocked  
> Source: prototype v0.23  

#### B13 · Select receiving warehouse · Bin

- Warehouse Staff · Web · FG Receipt
- Comes from: B11, B03
- Goes to: B14 · Destination warehouse set?

> The Warehouse Staff picks the receiving warehouse and bin.  
> Action: "FG Warehouse-In Request" pop-up (number FGR-REQ-nnnn) › "RECEIVE INTO WAREHOUSE" (mandatory) · "BIN / LOCATION" (Optional) · "SCAN WAREHOUSE / BIN BARCODE" → "Scan"; "REMARK" field.  
> System: lot table "Lot No." · "WO No." · "Item" · W5…W11 · "Total".  
> Source: prototype v0.23  

#### B14 · Destination warehouse set?

- Warehouse Staff
- Comes from: B13
- Goes to [No]: B15 · Blocked: "Scan or select the destination FG warehouse first."
- Goes to [Yes]: B16 · Any Critical lot without QA disposition?

> Does the receipt have a destination warehouse?  
> Yes: continue to the Critical defect check.  
> No: blocked with "Scan or select the destination FG warehouse first."  
> Test:  
> - Clear the default warehouse and confirm → blocked  
> Source: prototype v0.23  

#### B16 · Any Critical lot without QA disposition?

- Warehouse Staff
- Comes from: B14, B04
- Goes to [Yes]: B17 · Remove blocked lots from the receipt
- Goes to [No]: B18 · Confirm Warehouse-In

> Does the receipt contain a lot with a Critical defect that QA has not dispositioned?  
> Yes: remove those lots from the receipt; the other lots are received normally.  
> No: confirm the receipt.  
> System: a Critical defect blocks FG receipt until QA disposition ("Block WI closing, FG receipt or shipment until QA disposition is completed.").  
> Open: checking per lot instead of blocking the whole receipt is a proposal, not yet confirmed.  
> Source: BRD §6.5 · BRD §7 · convention Q6  

#### B17 · Remove blocked lots from the receipt

- Warehouse Staff · System (auto) · FG Receipt
- Comes from: B16
- Goes to: B19 · Blocked lots stay in FG Queue — awaiting QA disposition
- Goes to [remaining lots]: B18 · Confirm Warehouse-In

> The system removes blocked lots from the receipt.  
> Result: Critical lots without QA disposition stay in the FG Queue as "Waiting FG" with a block flag; the other lots are still received.  
> Blocked when: no lot is left on the receipt — it cannot be confirmed.  
> Test:  
> - Receipt of 3 lots, 1 Critical without disposition → 2 lots received, the other stays in the FG Queue  
> Source: BRD §6.5 · convention Q6  

#### B18 · Confirm Warehouse-In

- Warehouse Staff · Web · FG Receipt
- Comes from: B17, B16
- Goes to: B20 · Create FG Receipt Received

> The Warehouse Staff confirms the finished-goods receipt into the warehouse.  
> Action: "Confirm Warehouse-In" button ("Cancel" closes the pop-up, lots stay "Waiting FG").  
> Result: message "FGR-0001 (from FGR-REQ-0001) — n SO line(s), n pairs received into <warehouse>."  
> Source: prototype v0.23  

#### B20 · Create FG Receipt Received

- System · System (auto) · FG Receipt
- Comes from: B18
- Goes to: B21 · FG Receipt FGR-nnnn Received · lot · warehouse · Bin
- Goes to: B22 · Allocate FG to the WO's SOs by ETD

> The system creates the received FG Receipt.  
> Result: receipt FGR-nnnn, "Status" = "Received"; the lots leave the FG Queue for the "Receipts" tab (columns "Receipt No" · "Date" · "Warehouse" · "SO Lines" · "Qty" · "SO" · "Lot" · "Status").  
> System: the receipt records the transaction and lot traceability ("FG Receipt must create stock transaction and lot traceability record."); finished-goods stock does not increase here — only once, when the Product Income Slip is APPROVED in WMS.  
> Open: finished-goods stock increasing only in WMS is a proposal, not yet confirmed.  
> Test:  
> - After Confirm, the lot leaves the FG Queue and shows on the "Receipts" tab  
> Source: BRD §6.6 · convention Q6  

#### B22 · Allocate FG to the WO's SOs by ETD

- System · System (auto) · FG Receipt
- Comes from: B20, B05
- Goes to: B23 · Any quantity without Customer PO?

> The system allocates the received finished quantity to the WO's sales orders by ETD.  
> System: the SO with the earlier "Current ETD" is allocated first ("Finished quantity is allocated to Sales Orders by Current ETD priority.").  
> Open: the prototype has "Allocate by ETD" code (SO Qty · Allocate · Open · Open / Partial / Fulfilled) but no visible tab yet.  
> Test:  
> - WO with 2 SOs, receipt enough for 1 SO → the earlier-ETD SO is allocated first  
> Source: prototype v0.23 (Master Plan · Plan Details)  

#### B23 · Any quantity without Customer PO?

- System
- Comes from: B22
- Goes to [Yes]: B24 · Move the surplus to Common Stock
- Goes to [No]: B25 · Update WO Completed Qty

> Is any received quantity left without a Customer PO?  
> Yes: the receipt exceeds the WO's SO total, or the lot has no Customer PO → move the excess to Common Stock.  
> No: update the WO directly.  
> Source: Q-20260918-29  

#### B24 · Move the surplus to Common Stock

- System · System (auto) · FG Receipt
- Comes from: B23
- Goes to: B26 · Quantity without Customer PO → Common Stock
- Goes to: B25 · Update WO Completed Qty

> The system moves the excess without a Customer PO to Common Stock.  
> Result: the excess goes to Common Stock to be re-mapped to another SO later. For US POs, an excess ≤ 3 % stays on the PO ("Over shipping 3%(only us)").  
> Test:  
> - SO needs 100, 110 received (non-US PO) → 10 to Common Stock  
> - US PO needs 100, 103 received → all 103 on the PO  
> Source: Q-20260918-29 · Function List no. 76  

#### B25 · Update WO Completed Qty

- System · System (auto) · FG Receipt
- Comes from: B24, B23
- Goes to: B27 · WO Completed Qty + received SO allocation
- Goes to: B28 · Sinh Product Income Request

> The system updates the WO completed quantity.  
> Result: the WO "Completed Qty" and demand allocation are updated ("updates completed quantity for WO and demand allocation").  
> System: WO progress uses the last operation's Good Qty or the FG Receipt quantity ("WO completion based on last operation Good Qty or FG Receipt Qty.").  
> Source: BRD §6.6 · BRD §6.1  

#### B28 · Sinh Product Income Request

- System · System (auto) · FG Receipt
- Comes from: B25
- Goes to: B29 · Product Income Request → WMS Product Income
- Goes to: B30 · End

> The system creates a Product Income Request so WMS can receive the finished goods.  
> Result: a Product Income Request per received lot · warehouse · bin, sent to WMS Product Income.  
> System: finished-goods stock increases only when the Product Income Slip is APPROVED in WMS.  
> Open: this way of creating the Request is a proposal (question J unanswered); it differs from Q-20260923-17 (Request created from the Sales Order).  
> Source: Q-20260917-22 · Q-20260923-19 (J) · convention Q6  

## Status lifecycle

#### Lot in the FG Queue

`WAITING FG` → `RECEIVED`

Transitions:

- `WAITING FG` -- Confirm Warehouse-In --> `RECEIVED`

## Input

| # | Input | Type | Used in step |
| --- | --- | --- | --- |
| I-1 | Completed Packing Output + FG Handover Note (Packing hand-over) | Production result — MES Packing Process | Put lots into the FG Queue |
| I-2 | Lots that finished the last process when the routing has no Packing — no Packing QC | Production result — MES (last Routing step) | Put lots into the FG Queue |
| I-3 | FG Warehouse · Bin (Location) | Master data | Select receiving warehouse · Bin |
| I-4 | QA disposition for Critical defects | Quality result — QC / QA | Lot has a Critical defect without QA disposition? |
| I-5 | SO lines allocated to the WO (SO Qty · Current ETD) | Document — Sales module / Master Plan | Allocate FG to the WO's SOs by ETD |

## Step ↔ screen

| Step | Role | Screen · UI button |
| --- | --- | --- |
| Put lots into the FG Queue | System (auto) | FG Receipt · tab `FG Queue` (Status `Waiting FG`) |
| Filter the FG Queue by SO · WO · Select SO lines · lots to receive · Press Receive to Warehouse | Warehouse Staff | FG Receipt · `All sales orders`, checkbox, `Receive to Warehouse` |
| Select receiving warehouse · Bin · Confirm Warehouse-In | Warehouse Staff | Pop-up `FG Warehouse-In Request` (`Scan`, `Cancel`, `Confirm Warehouse-In`) |
| Remove blocked lots from the receipt | System (auto) | Pop-up `FG Warehouse-In Request` (checked lot by lot) |
| Create FG Receipt Received · Allocate FG to the WO's SOs by ETD · Split the surplus into Common Stock · Update WO Completed Qty · Create Product Income Request | System (auto) | FG Receipt · tab `Receipts` |

## Output

| # | Output | Produced when |
| --- | --- | --- |
| O-1 | Blocked: "Select at least one SO line." | Receive to Warehouse pressed with no line selected |
| O-2 | Blocked: "Scan or select the destination FG warehouse first." | Confirm Warehouse-In pressed without a destination warehouse |
| O-3 | Blocked lots stay in FG Queue — awaiting QA disposition | A lot with a Critical defect has no QA disposition (BRD §6.5) — the system removes that lot from the receipt, the other lots are still received |
| O-4 | FG Receipt FGR-nnnn = `RECEIVED` by lot · warehouse · Bin; lots leave the FG Queue | Warehouse Staff press Confirm Warehouse-In |
| O-5 | Quantity without Customer PO → Common Stock | Received quantity above the WO's SO total, or lots without a Customer PO (Q-20260918-29) |
| O-6 | WO Completed Qty + received SO allocation | After FG Receipt Received and SO allocation by Current ETD |
| O-7 | Product Income Request → WMS Product Income (finished-goods stock only increases when the Product Income Slip is `APPROVED`) | After FG Receipt Received (Q-20260917-22; item J recommendation, not settled) |

## Glossary

| Glossary | Meaning in this flow |
| --- | --- |
| `FG` | Finished Goods |
| `FG Queue` | Finished-goods receiving queue: lots that finished the last process, status Waiting FG |
| `FG Receipt (FGR)` | Finished-goods receipt into the warehouse; Status Received |
| `QA disposition` | QA's decision on a lot with a Critical defect; without it the lot cannot be received |
| `ETD` | Estimated departure date — the SO with the earliest ETD is allocated first |
| `Common Stock` | Shared stock not tied to a Customer PO, re-mapped to another SO later |
| `Completed Qty` | The WO's completed quantity, updated from FG Receipt |
| `Product Income Request` | Finished-goods receiving request sent to WMS; stock increases only when the Product Income Slip is APPROVED |
