Skip to content

GET /bms/ar-billing/export-dashboard

BMS > bms.transaction

What it does

/bms/ar-billing/export-dashboard accepts GET and is declared in app/systems/BMS/ar-billing/api_routes.php:429 as a path.

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

Call chain:

  1. → bmsArBillingExportDashboard() — app/systems/BMS/ar-billing/workbench_helper.php:1346
  2. ↳ bmsArBillingExportUnassignedReturnBookingStatus() — app/systems/BMS/ar-billing/workbench_helper.php:1336

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

Key
ALREADY_MATERIALIZED
IN_PROGRESS
NEEDS_REVIEW
NOT_YET_DETECTABLE
READY

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

SQL executed

SELECT EQL.ID AS EQUIPMENT_LOAD_ID,HEX(EQ.UUID) AS CONTAINER_UUID_HEX,EQ.CONTAINER_NUMBER,EQL.STATUS AS EQUIPMENT_LOAD_STATUS,EQ.STATUS AS EQUIPMENT_STATUS,EQ.TERMINAL_RETURN_TIME,EQ.STREET_TURN_TIME,EXISTS(SELECT 1 FROM T_TRANSACTION T WHERE T.CLIENT_ID=EQ.CLIENT_ID AND T.RELATED_TABLE_NAME='T_EQUIPMENT' AND T.RELATED_TABLE_ID=EQ.ID AND T.TYPE='AR' AND T.DELETED_AT IS NULL) AS HAS_AR_TRANSACTION,EQL.UPDATED_AT FROM T_EQUIPMENT EQ JOIN T_EQUIPMENT_LOAD EQL ON EQL.CLIENT_ID=EQ.CLIENT_ID AND EQL.EQUIPMENT_ID=EQ.ID AND EQL.DELIVERY_ORDER_ID=0 AND EQL.DELETED_AT IS NULL AND EQL.STATUS<>'CANCELLED' WHERE EQ.CLIENT_ID=? AND EQ.RETURN_BOOKING_ID<=0 AND EQ.PICKUP_BOOKING_ID>0 AND EQ.TERMINAL_PICKUP_TIME>=? AND EQ.DELETED_AT IS NULL{$unresolvedSql} ORDER BY EQL.UPDATED_AT DESC,EQL.ID DESC
SELECT EQ.RETURN_BOOKING_ID,EQL.ID AS EQUIPMENT_LOAD_ID,EQL.STATUS AS EQUIPMENT_LOAD_STATUS,EQL.LOAD_NUMBER,HEX(EQ.UUID) AS CONTAINER_UUID_HEX,EQ.CONTAINER_NUMBER FROM T_EQUIPMENT EQ JOIN T_EQUIPMENT_LOAD EQL ON EQL.CLIENT_ID=EQ.CLIENT_ID AND EQL.EQUIPMENT_ID=EQ.ID AND EQL.DELIVERY_ORDER_ID=0 AND EQL.DELETED_AT IS NULL AND EQL.STATUS<>'CANCELLED' WHERE EQ.CLIENT_ID=? AND EQ.RETURN_BOOKING_ID IN (
SELECT RB.ID,HEX(RB.UUID) AS BOOKING_UUID_HEX,RB.BOOKING_NUMBER,RB.IS_PACKINGLIST_SUBMITTED,RB.IS_INVOICED,RB.EXPORT_WORKFLOW_TYPE,RB.CUTOFF,RB.QUANTITY_20S,RB.QUANTITY_40F,RB.QUANTITY_40S,RB.QUANTITY_40H,RB.QUANTITY_45H,RB.BILLING_COMPANY_ID,
SELECT COUNT(DISTINCT RB.ID) FROM T_BOOKING RB {$equipmentJoinSql} {$customerJoinSql} WHERE RB.CLIENT_ID=? AND RB.BOOKING_TYPE='EXPORT' AND RB.DELETED_AT IS NULL AND {$eligibilitySql}{$searchSql}

Data

Tables reached from the owner function:

  • T_BILLING_SETUP
  • T_BOOKING
  • T_COMPANY
  • T_EQUIPMENT
  • T_EQUIPMENT_LOAD
  • T_TRANSACTION

Access

  • module-gated on bms.transaction, so tenant module access applies