# Stock Exchange — Changing stock information

> Fine Chemical (FC) · WMS module · v1.5 · 18/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/wms/stock-exchange

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

### Steps

| Code | Role | Type | Content | Platform · Screen | Goes to |
| --- | --- | --- | --- | --- | --- |
| B01 | Input | Data | Item / Warehouse Master Location (Bin) | Master data | B03 |
| B02 | Input | Data | Current stock (Lot · PO · Barcode · Grade) | Stock | B08 |
| B03 | Warehouse Staff | Start | Start |  | B04 |
| B04 | Warehouse Staff | Decision | Request or standalone Slip? |  | B05 [Standalone Slip]; B06 [Create Request] |
| B05 | Warehouse Staff | Task | Create Exchange Slip (standalone) Stock · Type · EX values | Web · Stock Exchange | B07 |
| B06 | Warehouse Staff | Task | Create Exchange Request | Web · Stock Exchange | B08 |
| B07 | Warehouse Staff | Task | Submit for Approval | Web · Stock Exchange | B09 [Slip SUBMITTED] |
| B08 | Warehouse Staff | Task | Select from Stock (current OUT lines) | Web · Stock Exchange | B10 |
| B09 | Warehouse Manager | Decision | The document's stock period closed? |  | B11 [Closed]; B12 [Not yet] |
| B10 | Warehouse Staff | Task | Set Exchange Type per line (LOT / PO / BARCODE / GRADE) + enter new EX values | Web · Stock Exchange | B13 |
| B11 | Output | Data | Blocks every action: Submit · Approve · Cancel · Delete — This action cannot be completed because the affected inventory period is closed through [Close Date] |  | (end) |
| B12 | Warehouse Manager | Task | Approve – Update Stock | Web · Stock Exchange | B14 |
| B13 | Warehouse Staff | Task | Submit Request | Web · Stock Exchange | B15 [SUBMITTED] |
| B14 | Warehouse Manager | Task | Ghi Lot/PO/Barcode/Grade by Exchange Type | System (auto) · Stock Exchange | B16; B17 [optional branch]; B18 |
| B15 | Warehouse Staff | Task | Print Request (QR = Request No.) | Web · Stock Exchange | B19 |
| B16 | Output | Data | Exchange Slip = APPROVED Stock carries new information |  | (end) |
| B17 | Warehouse Staff | Task | W/H Stock Checking (view-only lookup) | Web · W/H Stock Checking |  |
| B18 | Warehouse Manager | Decision | Any line with new Barcode/Lot/PO? |  | B20 [Yes]; B21 [No] |
| B19 | Warehouse Staff | Decision | Create Slip where? |  | B22 [Mobile]; B23 [Web] |
| B20 | Warehouse Staff | Task | Print new labels → attach to goods | Web · Exchange Label Issue | B21 |
| B21 | Warehouse Manager | Decision | All Request Slips Request APPROVED? |  | B24 [Yes]; B25 [No] |
| B22 | Warehouse Staff | Task | Scan QR Request | Mobile · Stock Exchange | B26 |
| B23 | Warehouse Staff | Task | Create EX Slip from this Request | Web · Stock Exchange | B27 |
| B24 | Output | Data | Request → CLOSED (automatic) |  | (end) |
| B25 | Output | Data | Request stays SUBMITTED (awaiting other Slips) |  | (end) |
| B26 | Warehouse Staff | Task | Scan Barcode of goods to change | Mobile · Stock Exchange | B28 |
| B27 | Warehouse Staff | Task | From Request → pull Request lines | Web · Stock Exchange | B07 |
| B28 | Warehouse Staff | Task | Make Slip | Mobile · Stock Exchange | B07 |
| B29 | Warehouse Manager | Start | Start |  | B30 |
| B30 | Warehouse Manager | Task | Cancel (Slip is APPROVED) | Web · Stock Exchange | B31 |
| B31 | Warehouse Manager | Decision | No transaction/ action since the exchange? |  | B32 [No]; B33 [Yes] |
| B32 | Output | Data | Cancel blocked — Slip stays APPROVED a transaction/action followed the exchange |  | (end) |
| B33 | Warehouse Manager | Task | Slip → CANCELLED restore old information | System (auto) · Stock Exchange | B34; B35 |
| B34 | Output | Data | Stock back to its pre-exchange information |  | (end) |
| B35 | Output | Data | CLOSED Request → back to SUBMITTED |  | (end) |

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

#### B04 · Request or standalone Slip?

- Warehouse Staff
- Comes from: B03
- Goes to [Standalone Slip]: B05 · Create Exchange Slip (standalone) Stock · Type · EX values
- Goes to [Create Request]: B06 · Create Exchange Request

#### B09 · The document's stock period closed?

- Warehouse Manager
- Comes from: B07
- Goes to [Closed]: B11 · Blocks every action: Submit · Approve · Cancel · Delete — This action cannot be completed because the affected inventory period is closed through [Close Date]
- Goes to [Not yet]: B12 · Approve – Update Stock

#### B18 · Any line with new Barcode/Lot/PO?

- Warehouse Manager
- Comes from: B14
- Goes to [Yes]: B20 · Print new labels → attach to goods
- Goes to [No]: B21 · All Request Slips Request APPROVED?

#### B19 · Create Slip where?

- Warehouse Staff
- Comes from: B15
- Goes to [Mobile]: B22 · Scan QR Request
- Goes to [Web]: B23 · Create EX Slip from this Request

#### B21 · All Request Slips Request APPROVED?

- Warehouse Manager
- Comes from: B20, B18
- Goes to [Yes]: B24 · Request → CLOSED (automatic)
- Goes to [No]: B25 · Request stays SUBMITTED (awaiting other Slips)

#### B31 · No transaction/ action since the exchange?

- Warehouse Manager
- Comes from: B30
- Goes to [No]: B32 · Cancel blocked — Slip stays APPROVED a transaction/action followed the exchange
- Goes to [Yes]: B33 · Slip → CANCELLED restore old information

## Status lifecycle

#### Exchange Request

`SAVED` → `SUBMITTED` → `CLOSED`

Transitions:

- `SAVED` -- Submit Request --> `SUBMITTED`
- `SUBMITTED` -- Auto: all linked Slips APPROVED --> `CLOSED`
- `CLOSED` -- Linked Slip cancelled — back to pending exchange --> `SUBMITTED` (back)
- `SAVED` -- Delete Request --> `Deleted`

#### Exchange Slip

`SAVED` → `SUBMITTED` → `APPROVED` → `CANCELLED`

Transitions:

- `SAVED` -- Submit for Approval --> `SUBMITTED`
- `SUBMITTED` -- Approve – Update Stock --> `APPROVED`
- `APPROVED` -- Cancel — no later transaction/action --> `CANCELLED`
- `CANCELLED` -- Edit Remark / Line items → approve again --> `APPROVED` (back)
- `SAVED` -- Delete --> `Deleted`

- `CANCELLED` (Exchange Slip) → pulls row Exchange Request back

Notes on the diagram:

- Cancel blocked if a later transaction/action followed the exchange, or the stock period is closed

## Input

| # | Input | Type | Used in step |
| --- | --- | --- | --- |
| I-1 | Item Master, Warehouse, Location (Bin) | Master data | Every line, Request/Slip header |
| I-2 | Current stock (Lot No · PO No · Barcode · Grade) | Stock | Select from Stock — fills the OUT information of each line |

## Step ↔ screen

| Step | Role | Screen |
| --- | --- | --- |
| Create Exchange Request · Select from Stock · Set Exchange Type per line + enter new EX values | Warehouse Staff | Stock Exchange · Web |
| Submit Request · Print Request (QR) | Warehouse Staff | Stock Exchange · Web |
| Scan Request QR · Scan barcodes of goods to change · Make Slip | Warehouse Staff | Stock Exchange · Mobile |
| Create EX Slip from this Request · From Request | Warehouse Staff | Stock Exchange · Web |
| Create Exchange Slip (standalone) | Warehouse Staff | Stock Exchange · Web |
| Submit for Approval | Warehouse Staff | Stock Exchange · Web |
| Print new labels → attach to goods (lines with changed Barcode / Lot / PO) | Warehouse Staff | Exchange Label Issue · Web |
| W/H Stock Checking (lookup, optional) | Warehouse Staff | W/H Stock Checking · Web |
| Approve – Update Stock · Cancel | Warehouse Manager | Stock Exchange · Web |
| The document’s stock period is closed → every action is blocked (Submit · Approve · Cancel · Delete) with the message `This action cannot be completed because the affected inventory period is closed through [Close Date]` | System (auto) | Stock Exchange |

## Output

| # | Output | Produced when |
| --- | --- | --- |
| O-1 | Exchange Request: `SAVED` → `SUBMITTED` → `CLOSED` | CLOSED automatically when every linked Exchange Slip is `APPROVED` |
| O-2 | Exchange Slip = `APPROVED` | Manager clicks Approve – Update Stock while the Slip is `SUBMITTED` |
| O-3 | Stock carries the new Lot No / PO No / Barcode / Grade, per each line's Exchange Type | On Approve |
| O-4 | New labels attached to the goods | After Approve, only for lines with changed Barcode / Lot / PO |
| O-5 | Request stays `SUBMITTED` | Request still has linked Slips not yet `APPROVED` |
| O-6 | *Exception:* Slip = `CANCELLED`, stock returns to its pre-exchange information, a CLOSED Request returns to SUBMITTED — or the cancel is blocked | Slip is `APPROVED`; blocked if a transaction has occurred on the goods since the exchange, or a later action on another screen |
