# ContractByDocumentNumber: Fortnox Contract by Document Number Retrieve a single contract - Catalog: `Fortnox` - Schema: `Contracts` - Label: Contract by Document Number This is a read-only table function. The Fortnox API may not support changing the data or the Invantive UniversalSQL driver for Fortnox does not cover it. In the latter case, please use the table NativePlatformScalarRequests to upload data to the Fortnox API. ## Parameters of Table Function The following parameters can be used to control the behaviour of the table function `ContractByDocumentNumber`. 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 | |---|:---:|:---:|:---:|---| | `DocumentNumber` | `` | ☑ | | identifies the contract | | `financialyear` | `` | ☐ | | Selects what financial year that should be used (does not work on every table). | | `financialyeardate` | `` | ☐ | | Selects by date, what financial year that should be used (does not work on every table). | | `fromdate` | `` | ☐ | | Defines a selection based on a start date. Only available for invoices, orders, offers, vouchers and supplierinvoices (does not work on every table). | | `lastmodified` | `` | ☐ | | Retrieves all records since the provided timestamp (does not work on every table). | | `todate` | `` | ☐ | | Defines a selection based on an end date. Only available for invoices, orders, offers, vouchers and supplierinvoices (does not work on every table). | ## Columns of Table Function The columns of the table function `ContractByDocumentNumber` are shown below. Each column has an SQL data type. | Name | Data Type | Label | Required | Documentation | |---|:---:|---|:---:|---| | `Contract_Active` | `char` | Contract Active | ☐ | | | `Contract_AdministrationFee` | `double` | Contract Administration Fee | ☐ | | | `Contract_BasisTaxReduction` | `double` | Contract Basis Tax Reduction | ☐ | | | `Contract_Comments` | `varchar2(1024)` | Contract Comments | ☐ | | | `Contract_Continuous` | `char` | Contract Continuous | ☐ | | | `Contract_ContractDate` | `datetime` | Contract Date | ☐ | | | `Contract_ContractLength` | `int32` | Contract Length | ☐ | | | `Contract_ContributionPercent` | `double` | Contract Contribution Percent | ☐ | | | `Contract_ContributionValue` | `double` | Contract Contribution Value | ☐ | | | `Contract_CostCenter` | `varchar2` | Contract Cost Centre | ☐ | | | `Contract_Currency` | `varchar2` | Contract Currency | ☐ | | | `Contract_CustomerName` | `varchar2` | Contract Customer Name | ☐ | | | `Contract_CustomerNumber` | `varchar2` | Contract Customernumber | ☐ | | | `Contract_DocumentNumber` | `varchar2` | Contract Document Number | ☐ | | | `Contract_EmailInformation_EmailAddressBCC` | `varchar2` | Contract Email Information Email Address Bcc | ☐ | | | `Contract_EmailInformation_EmailAddressCC` | `varchar2` | Contract Email Information Email Address CC | ☐ | | | `Contract_EmailInformation_EmailAddressFrom` | `varchar2` | Contract Email Information Email Address From | ☐ | | | `Contract_EmailInformation_EmailAddressTo` | `varchar2` | Contract Email Information Email Address To | ☐ | | | `Contract_EmailInformation_EmailBody` | `varchar2` | Contract Email Information Email Body | ☐ | | | `Contract_EmailInformation_EmailSubject` | `varchar2` | Contract Email Information Email Subject | ☐ | | | `Contract_ExternalInvoiceReference1` | `varchar2` | Contract External Invoice Reference 1 | ☐ | | | `Contract_ExternalInvoiceReference2` | `varchar2` | Contract External Invoice Reference 2 | ☐ | | | `Contract_Freight` | `double` | Contract Freight | ☐ | | | `Contract_Gross` | `double` | Contract Gross | ☐ | | | `Contract_HouseWork` | `char` | Contract House Work | ☐ | | | `Contract_InvoiceDiscount` | `double` | Contract Invoice Discount | ☐ | | | `Contract_InvoiceInterval` | `int32` | Contract Invoice Interval | ☐ | | | `Contract_InvoicesRemaining` | `varchar2` | Contract Invoices Remaining | ☐ | | | `Contract_Language` | `varchar2` | Contract Language | ☐ | | | `Contract_LastInvoiceDate` | `varchar2` | Contract Last Invoice Date | ☐ | | | `Contract_Net` | `double` | Contract Net | ☐ | | | `Contract_OurReference` | `varchar2(25)` | Contract Ourreference | ☐ | | | `Contract_PeriodEnd` | `datetime` | Contract Period End | ☐ | | | `Contract_PeriodStart` | `datetime` | Contract Period Start | ☐ | | | `Contract_PriceList` | `varchar2` | Contract Pricelist | ☐ | | | `Contract_PrintTemplate` | `varchar2` | Contract Print Template | ☐ | | | `Contract_Project` | `varchar2` | Contract Project | ☐ | | | `Contract_Remarks` | `varchar2(1024)` | Contract Remarks | ☐ | | | `Contract_RoundOff` | `double` | Contract Round Off | ☐ | | | `Contract_TaxReductionType` | `varchar2` | Contract Tax Reduction Type | ☐ | | | `Contract_TaxReduction` | `double` | Contract Tax Reduction | ☐ | | | `Contract_TemplateName` | `varchar2` | Contract Template Name | ☐ | | | `Contract_TemplateNumber` | `int32` | Contract Template Number | ☐ | | | `Contract_TermsOfDelivery` | `varchar2` | Contract Terms of Delivery | ☐ | | | `Contract_TermsOfPayment` | `varchar2` | Contract Terms of Payment | ☐ | | | `Contract_TotalToPay` | `double` | Contract Total to Pay | ☐ | | | `Contract_TotalVAT` | `double` | Contract Total VAT | ☐ | | | `Contract_Total` | `double` | Contract Total | ☐ | | | `Contract_VatIncluded` | `char` | Contract Vatincluded | ☐ | | | `Contract_WayOfDelivery` | `varchar2` | Contract Way of Delivery | ☐ | | | `Contract_YourOrderNumber` | `varchar2(75)` | Contract Your Order Number | ☐ | | | `Contract_YourReference` | `varchar2` | Contract Your Reference | ☐ | | | `Contract__urlTaxReductionList` | `varchar2` | Contract URL Tax Reduction List | ☐ | | | `Contract__url` | `varchar2` | Contract URL | ☐ | |