Partner turnover: query, endpoints and content scope

The SQL source of the partner turnover report in the invoice model, the endpoints of the list, summary and monthly chart, the whitelisted filter and the permission conditions.

The report shows income (outgoing invoices) and expense (incoming invoices) per partner, net and gross in HUF, for a period, with a monthly chart, filtered by client group and client. The SQL lives in the finance/invoice model (getPartnerTurnover, getTurnoverByMonth); the report writes no query of its own.

Data used

Table names carry the installation's own prefix in the database.

invoice; models: finance/invoice, company/company, masterdata/quickrange.

Endpoints

  • list: whitelisted URL filter (default period from the quick range master's default); list, summary and monthly chart on the same set; invoice link with finance/invoice + list.
  • chart: data of the monthly turnover chart.
  • filtercompanies: company picker.

Permissions

  • Keys: list, debug; neither is classified in the seeds.
  • Content scope: getCompanyGroupFilter; a foreign company ID returns an empty result.
Related topics: report turnover content scope