Panly API docsstaging

Screens / Reports

Reports

Cash-flow report for a range and the previous range, grouped by day, week or month, with Sales and Items tabs (PAN-136). The Sales tab adds a Payments by method card from payments_by_method on GET /v1/reports/sales (PAN-142). The Items tab shows the item sales ranking (load more) and recent expenses. Back on the tab (PAN-59) the data shows at once and refreshes quietly. Profit figures and the cost presets show only with `costs.view`. Money follows the business currency (PAN-90).

App routes
/reports
Access
reports.sales, reports.cashflow
Screen code
lib/screens/reports/reports_page.dart
lib/screens/reports/reports_controller.dart
lib/screens/reports/widgets/financials_table.dart
lib/screens/reports/widgets/payments_by_method_card.dart
lib/screens/reports/widgets/report_items_tab.dart
lib/domain/usecases/dashboard/dashboard_usecase.dart
lib/data/repositories/dashboard_repository.dart
Source
elmermj/panly-app @ pre-staging-test (72aaffd)

API calls (4)

CallWhy the screen makes itWhere in the app code
GET /v1/reports/cashflow
Cashflow report (backed by the daily_financials summary)
Current and previous range (from, to, group_by) lib/screens/reports/reports_controller.dart:85
lib/screens/reports/reports_controller.dart:86
lib/data/repositories/report_repository.dart:16
GET /v1/reports/sales
Ranked sales by menu item
Sales tab: payments_by_method for the range (limit=1, from, to) lib/screens/reports/reports_controller.dart:154
lib/domain/usecases/dashboard/dashboard_usecase.dart:34
lib/data/repositories/dashboard_repository.dart:64
GET /v1/reports/sales
Ranked sales by menu item
Items tab: item sales ranking (type preset, from, to, limit=10, cursor for load more)
Cost presets are hidden and never sent without `costs.view`.
lib/screens/reports/reports_controller.dart:188
lib/domain/usecases/dashboard/dashboard_usecase.dart:34
lib/data/repositories/dashboard_repository.dart:64
GET /v1/expenses
List expenses
Items tab: recent expenses (limit=4) lib/screens/reports/reports_controller.dart:164
lib/data/repositories/dashboard_repository.dart:12

Each call links to its operation in the API reference. Code locations are file:line in panly-app at 72aaffd, listed from the screen down to the line that sends the request.