Skip to content

GET /wms/inventory/source-reconciliation/sources

WMS > wms.inventory

What it does

/wms/inventory/source-reconciliation/sources accepts GET and is declared in app/systems/WMS/inventory/api_routes.php:661 as a path.

The route handler delegates to wmsSourceReconciliationDirectory(). That function is the owner of this behaviour; the route entry is only dispatch.

Call chain:

  1. → wmsSourceReconciliationDirectory() — app/systems/WMS/inventory/source_reconciliation_helper.php:172
  2. ↳ wmsInventoryBaleClientId() — app/systems/WMS/inventory/bale_adjustment_helper.php:7

Who calls it

Called from:

  • public/assets/js/modules/wms/source-reconciliation-runtime.js

A caller is the strongest available evidence of the intended use.

Input

No named input key is visible in the handler or its owner function. The endpoint either takes no parameters or reads them through a shared helper in app/shared/api/.

Output

Key
ACTIVE_ALLOCATION
BALANCE_DECREASED
CURRENT_REMAINING_QUANTITY
CURRENT_REMAINING_WEIGHT
DATA_CONFLICT
DATA_ISSUES
ELIGIBILITY_KEY
ELIGIBILITY_OK
NEEDS_RECONCILIATION
OPEN_SOURCES
PROVENANCE_AT
PROVENANCE_ID
RECONCILED
RECONCILIATION_NEEDED

Success is { "data": …, "requestId": "…" }. Failure is { "error": { "code", "message" }, "requestId": "…" }.

SQL executed

SELECT L.ID, L.INVENTORY_LOT_ID, L.RELATED_TRANSLOAD_ID, L.EVENT_TYPE, L.QUANTITY_DELTA, L.NET_WEIGHT_DELTA, L.BALANCE_QUANTITY_AFTER, L.BALANCE_NET_WEIGHT_AFTER, L.REFERENCE_CODE, L.CREATED_AT, HEX(L.UUID) AS UUID_HEX FROM T_INVENTORY_LOT_LEDGER L WHERE L.CLIENT_ID=? AND L.DELETED_AT IS NULL AND L.INVENTORY_LOT_ID IN ($marks) ORDER BY L.CREATED_AT ASC, L.ID ASC

Data

Tables reached from the owner function:

  • T_COMPANY
  • T_INVENTORY_LOT
  • T_INVENTORY_LOT_LEDGER
  • T_TRANSLOAD

Access

  • module-gated on wms.inventory, so tenant module access applies

Validation and failure messages

  • Client context is required.

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.