Dimension report: query base, endpoints and permissions

The shared SQL base of the dimension report, the endpoints of the matrix, the document box and the payments, the whitelisted URL parameters, PDF generation and content scope.

The dimension report gives a label dimension × period matrix in a financial or ledger view, with the related documents or the ledger summary and account sheet below. Matrix and details come from the same SQL base set (report/dimension model). Dimensions come from the reportable label groups, quick ranges from the quick range master.

Data used

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

invoice, invoice_item, allocation, allocation_label, label, label_description, entry, entry_item, account, transaction, transaction_settlement, company. The report only reads.

Endpoints

  1. report (matrix): filter (company group and client, role, partner, invoice number, period, booked, labels, allocated) and settings (view, dimension, resolution, net or gross, cash-flow mode) from whitelisted URL parameters; the selection (label, period, ledger account) is part of the URL.
  2. docs: document box of the selected cell.
  3. settlements: the settling documents of one invoice; the invoice's company must be in the allowed set.
  4. groupcompanies: company picker.
  5. pdf and pdfdownload: structured PDF with chart and readable filter header from the same model calls (getMatrix, getLedgerSummary); pdf saves through the document store's fileDocument by the company's storage rule and opens in the shared document modal. Errors: error_pdf_library, error without a dimension or with an empty result.

Permissions

  • Keys: list (on report, docs, settlements), pdf, debug (last SQL); none classified in the seeds.
  • Content scope inside the model query (getCompanyGroupFilter).
  • The invoice link of document rows depends on the finance/invoice list or edit permission.