# Invoices: Bouw7 Invoices
Returns a list of invoices associated with the organization.
Returns a list of invoices associated with the organization.
- Catalog: `Bouw7`
- Schema: `Invoicing`
- Label: Invoices
This is a read-only table function. The Bouw7 API may not support changing the data or the Invantive UniversalSQL driver for Bouw7 does not cover it. In the latter case, please use the table NativePlatformScalarRequests to upload data to the Bouw7 API.
## Parameters of Table Function
The following parameters can be used to control the behaviour of the table function `Invoices`. A value must be provided at all times for required parameters, but optional parameters in general do not need to have a value and the execution will default to a pre-defined behaviour. Values can be specified by position and by name. In both cases, all parameters not specified will be evaluated using their default values.
Value specification by position is done by listing all values from the first to the last needed value. For example: a `select * from table(value1, value2, value3)` on a table with four parameters will use the default value for the fourth parameter and the specified values for the first three.
Value specification by name is done by listing all values that require a value. For example with `select * from table(name1 => value1, name3 => value3)` on the same table will use the default values for the second and fourth parameters and the specified values for the first and third.
| Name | Data Type | Required | Default Value | Documentation |
|---|:---:|:---:|:---:|---|
| `q` | `` | ☐ | | A [Heimdall Query Language](https://heimdall.bouw7.nl/docs/query-language) string. |
## Columns of Table Function
The columns of the table function `Invoices` are shown below. Each column has an SQL data type.
| Name | Data Type | Label | Required | Documentation |
|---|:---:|---|:---:|---|
| `branch_id` | `int64` | Branch ID | ☐ | The ID of the branch. |
| `branch_name` | `varchar2` | Branch Name | ☐ | The name of the branch. |
| `contact_emailAddress` | `varchar2` | Contact Email Address | ☐ | The email address of the contact. |
| `contact_id` | `int64` | Contact ID | ☐ | The ID of the contact. |
| `contact_name` | `varchar2` | Contact Name | ☐ | The name of this contact. |
| `contact_type` | `varchar2` | Contact Type | ☐ | The type of this contact. |
| `contact_typeId` | `int64` | Contact Type ID | ☐ | The type ID of this contact. |
| `contactPersonName` | `varchar2` | Contact Person Name | ☐ | The contact person for this invoice. Value can be NULL if undefined. |
| `createdAt` | `datetime` | Created at | ☐ | The creation date of the object in ATOM/ISO-8601 format |
| `createdBy_id` | `int64` | Created by ID | ☐ | The ID of the user. |
| `createdBy_username` | `varchar2` | Created by User Name | ☐ | The username of the user. |
| `date` | `datetime` | Date | ☐ | The invoice date in YYYY-MM-DD format, or NULL if the invoice date has not been set. |
| `datePaid` | `varchar2` | Date Paid | ☐ | The date when the invoice was paid in YYYY-MM-DD format, or NULL if the invoice is unpaid. |
| `debtorNumber` | `varchar2` | Debtor Number | ☐ | The debtor number of the contact associated with this invoice. |
| `division_description` | `varchar2` | Division Description | ☐ | The description of the division. |
| `division_exactDivisionId` | `varchar2` | Division Exact Division ID | ☐ | The division ID of an Exact Online environment. |
| `division_glAccountCode` | `varchar2` | Division General Ledger Account Code | ☐ | A default general ledger account code to use for sales related items. |
| `division_glAccountCodePurchase` | `varchar2` | Division General Ledger Account Code Purchase | ☐ | A default general ledger account code to use for purchase related items. |
| `division_id` | `int64` | Division ID | ☐ | The ID of the division. |
| `division_journalCode` | `varchar2` | Division Journal Code | ☐ | A default journal code to use for sales related items. |
| `division_journalCodePurchase` | `varchar2` | Division Journal Code Purchase | ☐ | A default journal code to use for purchase related items. |
| `dueDate` | `datetime` | Due Date | ☐ | The invoice date in YYYY-MM-DD format, or NULL if the invoice due date has not been set. |
| `id` | `int64` | ID | ☐ | The ID of invoice. |
| `invoiceNumber` | `varchar2` | Invoice Number | ☐ | The number of invoice. |
| `isBookedInAfas` | `char` | Is Booked in AFAS | ☐ | Whether this invoice has been booked into your AFAS administration. |
| `isBookedInExact` | `char` | Is Booked in Exact | ☐ | Whether this invoice has been booked into your Exact administration. |
| `isBookedInMareon` | `char` | Is Booked in Mareon | ☐ | Whether this invoice has been booked into your Mareon administration. |
| `isBookedInTwinfield` | `char` | Is Booked in Twinfield | ☐ | Whether this invoice has been booked into your Twinfield administration. |
| `isCollective` | `char` | Is Collective | ☐ | Whether this is a collective invoice, containing lines associated with different projects. |
| `isCredit` | `char` | Is Credit | ☐ | Whether this is a credit invoice. |
| `isMailed` | `char` | Is Mailed | ☐ | Whether this invoice has been mailed. |
| `mailDate` | `datetime` | Mail Date | ☐ | The date and time the invoice was mailed. |
| `note` | `varchar2` | Note | ☐ | The note of this invoice. |
| `project_branchId` | `int64` | Project Branch ID | ☐ | The ID of the branch of this project. |
| `project_categoryId` | `int64` | Project Category ID | ☐ | The ID of the category of this project. |
| `project_divisionId` | `int64` | Project Division ID | ☐ | The ID of the division of this project. |
| `project_id` | `int64` | Project ID | ☐ | The ID of the project. |
| `project_name` | `varchar2` | Project Name | ☐ | The name of the project. |
| `project_number` | `varchar2` | Project Number | ☐ | The number of the project. |
| `project_status` | `varchar2` | Project Status | ☐ | The name of the current status of this project. |
| `project_statusId` | `int64` | Project Status ID | ☐ | The ID of the status of this project. |
| `status` | `int64` | Status | ☐ | The status of the invoice. (0 = Open, 1 = Expired, 2 = Paid, 3 = Draft) |
| `subTotal` | `varchar2` | Subtotal | ☐ | The sum of all invoice line subtotals, excluding VAT. |
| `total` | `varchar2` | Total | ☐ | The sum of all invoice line subtotals, including VAT. |
| `updatedAt` | `datetime` | Updated At | ☐ | The creation date of the object in ATOM/ISO-8601 format |
| `updatedBy_id` | `int64` | Updated by ID | ☐ | The ID of the user. |
| `updatedBy_username` | `varchar2` | Updated by User Name | ☐ | The username of the user. |
| `vatTotal` | `varchar2` | VAT Total | ☐ | The sum of all invoice line VAT totals. |
| `workAddress` | `varchar2` | Work Address | ☐ | The work address of this invoice. |