# newInvoiceForProject_ContactCustomAttributeValues Returns the document of a new invoice. Returns the document of a new invoice. - Catalog: `Bouw7` - Schema: `Invoicing` 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 `newInvoiceForProject_ContactCustomAttributeValues`. 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 | |---|:---:|:---:|:---:|---| | `project` | `` | ☑ | | Project ID | ## Columns of Table Function The columns of the table function `newInvoiceForProject_ContactCustomAttributeValues` are shown below. Each column has an SQL data type. | Name | Data Type | Label | Required | Documentation | |---|:---:|---|:---:|---| | `attachEquipmentList` | `char` | Attach Equipment List | ☐ | Whether to attach the material list attachment. | | `attachGarbageList` | `char` | Attach Garbage List | ☐ | Whether to attach the waste list attachment. | | `attachMaterialList` | `char` | Attach Material List | ☐ | Whether to attach the material list attachment. | | `attachRegister` | `char` | Attach Register | ☐ | Whether to attach the register attachment. | | `branch_code` | `varchar2`(255) | Branch Code | ☐ | The code of the branch. | | `branch_division_description` | `varchar2` | | ☐ | The description of the division. | | `branch_division_exactDivisionId` | `varchar2` | | ☐ | The division ID of an Exact Online environment. | | `branch_division_glAccountCode` | `varchar2` | | ☐ | A default general ledger account code to use for sales related items. | | `branch_division_glAccountCodePurchase` | `varchar2` | | ☐ | A default general ledger account code to use for purchase related items. | | `branch_division_id` | `int64` | | ☐ | The ID of the division. | | `branch_division_journalCode` | `varchar2` | | ☐ | A default journal code to use for sales related items. | | `branch_division_journalCodePurchase` | `varchar2` | | ☐ | A default journal code to use for purchase related items. | | `branch_division_salesInvoiceNumberPrefix` | `varchar2`(3) | | ☐ | The prefix (3 digits) used to generate invoice number range per division. | | `branch_gAccountPercentage` | `varchar2` | Branch G-Account Percentage | ☐ | The g account percentage of the branch. | | `branch_gAccountText` | `varchar2`(255) | Branch G-Account Text | ☐ | The g account text of the branch. | | `branch_id` | `int64` | Branch ID | ☐ | The ID of the branch. | | `branch_nAccountText` | `varchar2`(255) | Branch N-Account Text | ☐ | The n account text of the branch. | | `branch_name` | `varchar2` | Branch Name | ☐ | The name of the branch. | | `branch_useOrganizationInfo` | `char` | Branch Use Organisation Info | ☐ | If organization information should be used instead of branch information. | | `branch_wageComponentPercentage` | `varchar2` | Branch Wage Component Percentage | ☐ | The wage component percentage of the branch. | | `canBookToAfas` | `char` | Can Book to AFAS | ☐ | Whether it is allowed to book to AFAS. | | `canBookToExact` | `char` | Can Book to Exact | ☐ | Whether it is allowed to book to Exact. | | `canBookToMareon` | `char` | Can Book to Mareon | ☐ | Whether it is allowed to book to Mareon. | | `canBookToTwinfield` | `char` | Can Book to Twinfield | ☐ | Whether it is allowed to book to Twinfield. | | `canUseCostCenter` | `char` | Can Use Cost Centre | ☐ | Whether the user can use cost center functionality. | | `city` | `varchar2` | City | ☐ | The city of residence of the contact. | | `cocNumber` | `varchar2` | Chamber of Commerce Number | ☐ | The chamber of commerce number of the contact. | | `contactPerson_city` | `varchar2`(255) | Contact Person City | ☐ | The contact person's city. | | `contactPerson_createdAt` | `datetime` | Contact Person Created at | ☐ | The creation time of the entity. | | `contactPerson_createdBy` | `varchar2` | Contact Person Created by | ☐ | The user that created the entity. | | `contactPerson_email` | `varchar2`(256) | Contact Person Email | ☐ | The contact person's email address. | | `contactPerson_firstName` | `varchar2`(256) | Contact Person First Name | ☐ | The contact person's first name. | | `contactPerson_houseNumber` | `varchar2`(50) | Contact Person House Number | ☐ | The contact person's house number. | | `contactPerson_id` | `int64` | Contact Person ID | ☐ | The ID of contact person. | | `contactPerson_jobTitle` | `varchar2`(64) | Contact Person Job Title | ☐ | The contact person's job title. | | `contactPerson_lastName` | `varchar2`(256) | Contact Person Last Name | ☐ | The contact person's last name. | | `contactPerson_phoneNumber` | `varchar2`(255) | Contact Person Phone Number | ☐ | The contact person's phone number. | | `contactPerson_salutation` | `varchar2`(32) | Contact Person Salutation | ☐ | The contact person's salutation. | | `contactPerson_streetName` | `varchar2`(255) | Contact Person Street Name | ☐ | The contact person's street name. | | `contactPerson_updatedAt` | `datetime` | Contact Person Updated at | ☐ | The last updated time of the entity. | | `contactPerson_updatedBy` | `varchar2` | Contact Person Updated by | ☐ | The user that last updated the entity. | | `contactPerson_zipCode` | `varchar2`(20) | Contact Person ZIP Code | ☐ | The contact person's zip code. | | `contactPersonName_2` | `varchar2` | | ☐ | The name of the contact person for this invoice. | | `contactPersonName` | `varchar2` | Contact Person Name | ☐ | The name of the contact person. | | `contactType_id` | `int64` | Contact Type ID | ☐ | The ID of contact type. | | `contactType_name` | `varchar2` | Contact Type Name | ☐ | The name of contact type. | | `country` | `varchar2` | Country | ☐ | The country of the contact. | | `createdAt` | `datetime` | Created at | ☐ | The creation time of the entity. | | `createdBy` | `varchar2` | Created by | ☐ | The user that created the entity. | | `date` | `datetime` | Date | ☐ | The invoice date. | | `datePaid` | `varchar2` | Date Paid | ☐ | The paid date. | | `debtorNumber_2` | `varchar2` | | ☐ | The debtor number of the contact associated with this invoice. | | `debtorNumber` | `varchar2` | Debtor Number | ☐ | The debtor number of the contact. | | `description` | `varchar2` | Description | ☐ | The public description for this invoice. | | `displayWorkAddress` | `char` | Display Work Address | ☐ | Whether the work address is displayed on the 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. | | `division_salesInvoiceNumberPrefix` | `varchar2`(3) | Division Sales Invoice Number Prefix | ☐ | The prefix (3 digits) used to generate invoice number range per division. | | `dueDate` | `datetime` | Due Date | ☐ | The invoice due date. | | `emailAddress` | `varchar2` | Email Address | ☐ | The email-address of the contact. | | `endDate` | `datetime` | End Date | ☐ | The end date of attached booking items in Y-m-d format. | | `exactFinancialPeriod_endDate` | `datetime` | | ☐ | The end date of the exact financial period in Y-m-d format. | | `exactFinancialPeriod_financialPeriod` | `int64` | | ☐ | The period of the exact financial period. | | `exactFinancialPeriod_financialYear` | `int64` | | ☐ | The year of the exact financial period. | | `exactFinancialPeriod_id` | `int64` | | ☐ | The ID of the exact financial period. | | `exactFinancialPeriod_startDate` | `datetime` | | ☐ | The start date of the exact financial period in Y-m-d format. | | `exactPaymentCondition` | `varchar2`(255) | Exact Payment Condition | ☐ | The code of the Exact Online payment condition for this invoice. | | `expirationReminderDays` | `int64` | Expiration Reminder Days | ☐ | The number of days before a reminder is sent. | | `gAccountAmount` | `varchar2` | G-Account Amount | ☐ | G-account amount. | | `gAccountPercentage_2` | `varchar2` | | ☐ | G-account percentage. | | `gAccountPercentage` | `varchar2` | G-Account Percentage | ☐ | G-account percentage. | | `gAccountText_2` | `varchar2`(255) | | ☐ | G-account text. | | `gAccountText` | `varchar2`(255) | G-Account Text | ☐ | G-account text. | | `glnNumber` | `varchar2`(13) | GLN Number | ☐ | The Global Location Number. | | `houseNumber` | `varchar2` | House Number | ☐ | The house- or building-number of the contact. | | `iban` | `varchar2` | IBAN | ☐ | The IBAN-account number of the contact. | | `id_2` | `int64` | ID | ☐ | The ID of the invoice. Must be omitted to create a new invoice. | | `id` | `int64` | ID | ☐ | The ID of the contact. | | `includeCoverSheet` | `char` | Include Cover Sheet | ☐ | Whether to include a cover sheet to the invoice PDF. | | `internalNote` | `varchar2` | Internal Note | ☐ | The internal note for this invoice. | | `invoicedProjectStatusName` | `varchar2` | Invoiced Project Status Name | ☐ | The status name of the projects if the status is going to be changed when an invoice is saved. | | `invoiceMail` | `varchar2` | Invoice Mail | ☐ | The invoice mail. | | `invoiceNumber` | `varchar2` | Invoice Number | ☐ | The number of this invoice. | | `invoiceUblVersion` | `varchar2` | Invoice UBL Version | ☐ | The preferred UBL invoice version for this contact. | | `isBooked` | `char` | Is Booked | ☐ | Whether the invoice is already booked. | | `isCollective` | `char` | Is Collective | ☐ | Whether the invoice is a collective invoice. | | `isCredit` | `char` | Is Credit | ☐ | Whether this invoice is a credit invoice. | | `isMareonBooked` | `char` | Is Mareon Booked | ☐ | Whether the invoice is already booked in mareon. | | `isVatShifted_2` | `char` | | ☐ | Whether VAT is shifted for the invoice. | | `isVatShifted` | `char` | Is VAT Shifted | ☐ | Whether VAT is shifted for the contact. | | `language` | `varchar2` | Language | ☐ | The locale used by this invoice document, e.g.: nl-NL. | | `nAccountText_2` | `varchar2`(255) | | ☐ | N-account text. | | `nAccountText` | `varchar2`(255) | N-Account Text | ☐ | N-account text. | | `name` | `varchar2` | Name | ☐ | The name of the contact. | | `organization_city` | `varchar2` | Organisation City | ☐ | The city of residence of the supplier. | | `organization_cocNumber` | `varchar2` | Organisation CoC Number | ☐ | The chamber of commerce number of the supplier. | | `organization_country` | `varchar2` | Organisation Country | ☐ | The country of the supplier. | | `organization_emailAddress` | `varchar2` | Organisation Email Address | ☐ | The email-address of the supplier. | | `organization_expirationReminderDays` | `int64` | Organisation Expiration Reminder Days | ☐ | The number of days before a reminder is sent. | | `organization_gAccountPercentage` | `varchar2` | Organisation G-Account Percentage | ☐ | The g account percentage for the customer. | | `organization_gAccountText` | `varchar2` | Organisation G-Account Text | ☐ | The g account text for the customer. | | `organization_houseNumber` | `varchar2` | Organisation House Number | ☐ | The house- or building-number of the supplier. | | `organization_iban` | `varchar2` | Organisation IBAN | ☐ | The IBAN-account number of the supplier. | | `organization_logo_createdAt` | `datetime` | Organisation Logo Created at | ☐ | The creation time of the entity. | | `organization_logo_createdBy` | `varchar2` | Organisation Logo Created by | ☐ | The user that created the entity. | | `organization_logo_extension` | `varchar2` | Organisation Logo Extension | ☐ | The extension of the file. | | `organization_logo_id` | `int64` | Organisation Logo ID | ☐ | The ID of this file | | `organization_logo_modelId` | `int64` | Organisation Logo Model ID | ☐ | The ID of the associated type. | | `organization_logo_modelType` | `varchar2` | Organisation Logo Model Type | ☐ | The category of the file. | | `organization_logo_name` | `varchar2` | Organisation Logo Name | ☐ | The public name of the file. | | `organization_logo_secureHash` | `varchar2` | | ☐ | A secure random hash for the file, that can be used for retrieving thumbnails without additional authentication. | | `organization_logo_size` | `int64` | Organisation Logo Size | ☐ | The size of the file in bytes. | | `organization_logo_updatedAt` | `datetime` | Organisation Logo Updated at | ☐ | The last updated time of the entity. | | `organization_logo_updatedBy` | `varchar2` | Organisation Logo Updated by | ☐ | The user that last updated the entity. | | `organization_logo_uri` | `varchar2` | Organisation Logo URI | ☐ | The URI of the file, used to fetch the contents. | | `organization_nAccountText` | `varchar2` | Organisation N-Account Text | ☐ | The n account text for the customer. | | `organization_name` | `varchar2` | Organisation Name | ☐ | The name of the supplier. | | `organization_phoneNumber` | `varchar2` | Organisation Phone Number | ☐ | The phone number of the supplier. | | `organization_shouldCopyProjectDescription` | `char` | Organisation Should Copy Project Description | ☐ | Whether the project description should be copied. | | `organization_showProjectNameOnInvoicePdf` | `char` | Organisation Show Project Name on Invoice PDF | ☐ | Whether the project name will show on the invoice. | | `organization_showProjectNumberOnInvoice` | `char` | Organisation Show Project Number on Invoice | ☐ | Whether the project number will show on the invoice. | | `organization_streetName` | `varchar2` | Organisation Street Name | ☐ | The street name of the supplier. | | `organization_vatNumber` | `varchar2` | Organisation VAT Number | ☐ | The VAT-number of the supplier. | | `organization_wageComponentPercentage` | `varchar2` | Organisation Wage Component Percentage | ☐ | The wage component percentage for the customer. | | `organization_websiteAddress` | `varchar2` | Organisation Website Address | ☐ | The website address of the supplier. | | `organization_zipCode` | `varchar2` | Organisation ZIP Code | ☐ | The zip-code of the supplier. | | `phoneNumber` | `varchar2` | Phone Number | ☐ | The phone number of the contact. | | `project_fullProjectNumber` | `varchar2` | Project Full Project Number | ☐ | The full project number including year. | | `project_id` | `int64` | Project ID | ☐ | The ID of the project. | | `project_name` | `varchar2` | Project Name | ☐ | The name of the project. | | `project_reference` | `varchar2` | Project Reference | ☐ | The reference of the project. | | `project_value` | `varchar2` | | ☐ | The value of the custom attribute. | | `project_workAddress` | `varchar2` | Project Work Address | ☐ | The work address of the project. | | `startDate` | `datetime` | Start Date | ☐ | The start date of attached booking items in Y-m-d format. | | `status` | `int64` | Status | ☐ | The status of the invoice. | | `streetName` | `varchar2` | Street Name | ☐ | The street name of the contact. | | `updatedAt` | `datetime` | Updated At | ☐ | The last updated time of the entity. | | `updatedBy` | `varchar2` | Updated by | ☐ | The user that last updated the entity. | | `value` | `varchar2` | Value | ☐ | The value of the custom attribute. | | `vatNumber` | `varchar2` | VAT Number | ☐ | The VAT-number of the contact. | | `vatShiftedValue` | `varchar2`(255) | VAT Shifted Value | ☐ | VAT is shifted value. Usually a VAT-number of the contact. | | `wageComponentAmount` | `varchar2` | Wage Component Amount | ☐ | Wage component amount. | | `wageComponentPercentage_2` | `varchar2` | | ☐ | Wage component percentage. | | `wageComponentPercentage` | `varchar2` | Wage Component Percentage | ☐ | Wage component percentage. | | `workAddress` | `varchar2`(255) | Work Address | ☐ | The work address of the invoice. | | `zipCode` | `varchar2` | ZIP Code | ☐ | The zip-code of the contact. |