Invoice list — behaviour and permissions

The invoice list query, its filters, the content scope, handling of deleted rows and the auxiliary endpoints around the list.

The invoice module is the system's central register of invoices (incoming, outgoing, interest and recovery fee documents). This article covers the list, the filter and the auxiliary endpoints around the list.

Overview

Based on the filter, the list returns invoices from the invoice model, paged (10/25/50/100/all). Every invoice insert goes through the shared addInvoice() → Dlbtinvoice::add() path. Other modules can embed the list (listembed). Slow queries are written to a performance log.

Data model

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

TableRoleMain fields
invoiceinvoice headercompany_client_id (owner), status, HUF/currency amounts, outstanding_balance_huf
invoice_iteminvoice linesitem name, amounts
companypartner and owner companyname, tax number
transaction_settlementsettlement linkinvoice ↔ document
doc_link, label_linkdocument and label linksobject reference

Filters

Company group and company (by content scope), partner, invoice number, invoice ID(s), type, payment type, date type and range, quick range from the masterdata/quickrange master, status, settlement state, source, invoice kind, item name, has document. The “left join” diagnostic filter (partner link) is visible to super admins only.

Permissions

  • Layer 1: base access to the invoice path.
  • Layer 2: list at the start of getList() and listembed() (without it a warning box); the menu uses canSee(list). The debug key is classified SYSTEM, so it opens the SQL toggle for every logged-in user. The charts (finance/invoice.charts) need the chart key; without it the output is empty.
  • Layer 3: the owner (company_client_id) must be in the user's company scope; partner, type and creator scopes also apply. Rows with status = 9 are returned only with canSeeDeleted(); a status filter in the URL cannot bypass this.

Auxiliary endpoints

EndpointPurposeRight
companiesByGroup, shared company pickermember companies of a grouplist + content scope
getBankaccountsthe partner's valid bank accountslist
peekNumber, getClientBlockspreview of the next number, the client's active invoice blocks (creates a missing default block)list (+ owner scope)
navstructure, navrepair, rawdataanalysis of stored NAV responses, repair of header/line fields from NAV data, raw NAV datasuper admin only

The list links to finance/settlement::list and finance/transaction::list only when the user has both canSee and canAction there.

Known limitations

In the seeds the list key is an unclassified (UNMAPPED) list row. This description is derived from the code and has not been verified at run time.

Related topics: invoice filtering permissions