# PurchaseOrderContracts: Bouw7 Purchase Order Contracts Returns a list of purchase order contracts. Returns a list of purchase order contracts. - Catalog: `Bouw7` - Schema: `Contract` - Label: Purchase Order Contracts 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 `PurchaseOrderContracts`. 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 `PurchaseOrderContracts` are shown below. Each column has an SQL data type. | Name | Data Type | Label | Required | Documentation | |---|:---:|---|:---:|---| | `acceptedAt` | `varchar2` | Accepted at | ☐ | The date when contract was accepted in ATOM-format. | | `attachmentCount` | `int64` | Attachment Count | ☐ | The attachment count for this contract. | | `calledReceiptCount` | `int64` | Called Receipt Count | ☐ | The called receipt count for this contract. | | `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. | | `currentApprover` | `varchar2` | Current Approver | ☐ | The full name of the current approver. | | `deliveryAddress` | `varchar2` | Delivery Address | ☐ | Delivery address of the purchase order contract. | | `deliveryDate` | `datetime` | Delivery Date | ☐ | Delivery date of the purchase order in ATOM-format. | | `deliveryDateText` | `varchar2` | Delivery Date Text | ☐ | Delivery date of the purchase order as free-form text. | | `deniedAt` | `varchar2` | Denied at | ☐ | The date the contract was denied in ATOM-format. | | `description` | `varchar2` | Description | ☐ | The description of the contract. May contain HTML content. | | `emailSentAt` | `varchar2` | Email Sent at | ☐ | The date the email was sent in ATOM-format. | | `emailSentBy` | `varchar2` | Email Sent by | ☐ | The username of the user that sent the email. | | `id` | `int64` | ID | ☐ | The ID of the Contract. | | `internalNote` | `varchar2` | Internal Note | ☐ | Internal note about the contract. May contain HTML content. | | `isEmailSent` | `char` | Is Email Sent | ☐ | True if an email was already sent. | | `language` | `varchar2` | Language | ☐ | The locale used by this contract, e.g.: nl-NL. | | `linkedDeliveryTicket_bookingStatus` | `int64` | | ☐ | The current booking status. 0 = Registered, 1 = Invoiced, 2 = Not billable, 3 = Credited. | | `linkedDeliveryTicket_date` | `datetime` | | ☐ | The date of the delivery ticket, represented in ATOM-format. | | `linkedDeliveryTicket_description` | `varchar2` | | ☐ | The description of this delivery ticket. May contain HTML content. | | `linkedDeliveryTicket_id` | `int64` | | ☐ | The ID of this delivery ticket. | | `linkedDeliveryTicket_isProcessed` | `char` | | ☐ | Whether this delivery ticket has been processed. | | `linkedDeliveryTicket_number` | `varchar2` | | ☐ | The ticket number of this delivery ticket. | | `linkedDeliveryTicket_price` | `varchar2` | | ☐ | The price of this delivery ticket. | | `linkedDeliveryTicket_purchaseTypeId` | `int64` | | ☐ | The ID of the purchase type of this delivery ticket. | | `linkedDeliveryTicket_purchaseTypeName` | `varchar2` | | ☐ | The name of the purchase type of this delivery ticket. | | `name` | `varchar2`(255) | Name | ☐ | The display name of the contract. Can be NULL. | | `number` | `varchar2` | Number | ☐ | The identification number of the contract. | | `outstandingCosts` | `varchar2` | Outstanding Costs | ☐ | Outstanding costs for the purchase order. | | `paymentAgreement` | `varchar2` | Payment Agreement | ☐ | The payment agreement of the contract. May contain HTML content. | | `price` | `varchar2` | Price | ☐ | The price of the contract. | | `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. | | `projectSecurityLink_code` | `varchar2` | Project Security Link Code | ☐ | The security code. | | `projectSecurityLink_costType` | `int64` | | ☐ | The name of the cost type. | | `projectSecurityLink_id` | `int64` | Project Security Link ID | ☐ | The ID of the project security link. | | `projectSecurityLink_name` | `varchar2` | Project Security Link Name | ☐ | The name of the project security link. | | `projectSecurityLink_parentName` | `varchar2` | | ☐ | The name of the security code. | | `projectSecurityLink_projectId` | `int64` | Project Security Link Project ID | ☐ | The ID of the project associated with this security code. | | `projectSecurityLink_status` | `int64` | Project Security Link Status | ☐ | The status of the project security link. | | `purchaseType` | `int64` | Purchase Type | ☐ | The type of purchase. (2 = Purchase Order, 4 = Equipment, 5 = Material, 6 = Miscelaneous) | | `status` | `int64` | Status | ☐ | Status of the contract | | `statusName` | `varchar2` | Status Name | ☐ | The name of the current status. | | `supplier_emailAddress` | `varchar2` | Supplier Email Address | ☐ | The email address of the contact. | | `supplier_id` | `int64` | Supplier ID | ☐ | The ID of the contact. | | `supplier_name` | `varchar2` | Supplier Name | ☐ | The name of this contact. | | `supplier_type` | `varchar2` | Supplier Type | ☐ | The type of this contact. | | `supplier_typeId` | `int64` | Supplier Type ID | ☐ | The type ID of this contact. | | `type` | `int64` | Type | ☐ | Type of the contract. (0 = Permanent, 1 = Directing) | | `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. |