POST /wms/inventory/physical-report/reopen¶
What it does¶
/wms/inventory/physical-report/reopen accepts POST and is declared in app/systems/WMS/inventory/api_routes.php:1021 as a path.
The route handler delegates to physical_inventory_reopen(). That function is the owner of
this behaviour; the route entry is only dispatch.
Call chain:
- →
physical_inventory_reopen()—app/addons/reports/query_helper.php:2462 - ↳
physical_inventory_require_schema()—app/addons/reports/query_helper.php:2072 - ↳
physical_inventory_schema_ready()—app/addons/reports/query_helper.php:2064
Who calls it¶
Called from:
frontend/pages/system/WMS/inventory/inventory-report.php
A caller is the strongest available evidence of the intended use.
Input¶
| Where | Key |
|---|---|
body |
COMMODITIES |
body |
COMPANYID |
body |
COMPANY_ID |
body |
FROM |
body |
PERIODFROM |
body |
PERIODTO |
body |
TO |
body |
commodities |
body |
companyId |
body |
periodFrom |
body |
periodTo |
Request bodies must not use TYPE, ACTION or USERNAME as contract fields.
Output¶
| Key |
|---|
AVG_WEIGHT_LB |
BALE_QTY |
CLIENT_ID |
COMMODITY |
COMPANY_UUID |
FINALIZED_AT |
PERIOD_FROM |
PERIOD_TO |
SNAPSHOT_UUID |
SORT_ORDER |
ST |
STATUS |
Success is { "data": …, "requestId": "…" }.
Failure is { "error": { "code", "message" }, "requestId": "…" }.
SQL executed¶
UPDATE T_INVENTORY_LOT_SNAPSHOT
Data¶
Tables reached from the owner function:
T_INVENTORY_LOT_SNAPSHOT
Access¶
- module-gated on
wms.inventory, so tenant module access applies
Validation and failure messages¶
- Company is required.
- Only a finalized Physical Inventory can be reopened.
- Physical Inventory was changed by another session. Reload before reopening.
- Inventory Lot Snapshot schema is not installed. Run the inventory lot snapshot migration first.
These strings come from the owner function and are the messages a client can receive. They are also the cheapest way to tell a rejected request from a broken one.