Skip to content

GET /tms/loading-planner/bale-sources

TMS > tms.transload

What it does

/tms/loading-planner/bale-sources accepts GET and is declared in app/systems/TMS/transload/api_routes.php:360 as a path.

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

Call chain:

  1. → tmsTransloadApiLoadingPlannerBaleSources() — app/systems/TMS/transload/planning_query_api_helper.php:250
  2. ↳ tmsTransloadShipperFamilyFromCompanyIds() — app/systems/TMS/transload/shipper_family_compatibility_helper.php:4
  3. ↳ ctcShipperFamily() — app/shared/commodity_compatibility_helper.php:18

Who calls it

No literal caller path was found in frontend/, public/ or new-system/. The endpoint may be called through a constructed path, a helper wrapper, or only by an external client. Treat the route table and owner function as the authority.

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

The response is produced by a shared helper, so the key set is not visible at the route. Read the owner function to confirm the shape before writing a client.

SQL executed

SELECT T.BILLING_COMPANY_ID, T.SHIPPER_COMPANY_ID, T.INITIAL_COMMODITY_NAME, T.FINAL_COMMODITY_NAME, C.DISPLAY_NAME AS BILLING_COMPANY_NAME, C.COMPANY_NAME AS BILLING_COMPANY_LEGAL_NAME FROM T_TRANSLOAD T LEFT JOIN T_COMPANY C ON C.CLIENT_ID=T.CLIENT_ID AND C.ID=T.BILLING_COMPANY_ID AND C.DELETED_AT IS NULL WHERE T.CLIENT_ID=? AND T.ID=? AND T.DELETED_AT IS NULL LIMIT 1
SELECT IL.ID, IL.LOT_SOURCE_TYPE, COALESCE(WL.LOCATION_CODE, '') AS WAREHOUSE_LOCATION, IL.REMAIN_QUANTITY,

Data

Tables reached from the owner function:

  • T_COMPANY
  • T_INVENTORY_LOT
  • T_INVENTORY_LOT_LEDGER
  • T_TRANSLOAD
  • T_WAREHOUSE_LOCATION

Access

  • module-gated on tms.transload, so tenant module access applies

Validation and failure messages

  • Transload id is required.
  • Transload not found.

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.