# OfficeSettingsByCode: Twinfield Company settings by code ## Documentation Settings of one company, named by code. Every company is answered by the view OfficeSettings. - Catalog: `Twinfield` - Schema: `Settings` - Primary Keys: `code` - Label: Company settings by code The data in this table is partitioned per value of the `COMPANY_CODE` column. This is a read-only table function. The Twinfield API may not support changing the data or the Invantive UniversalSQL driver for Twinfield does not cover it. In the latter case, please use the table NativePlatformScalarRequests to upload data to the Twinfield API. ## Parameters of Table Function The following parameters can be used to control the behaviour of the table function `OfficeSettingsByCode`. 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 | |---|:---:|:---:|:---:|---| | `code` | `` | ☑ | | Code of the company to read the settings of. | | `COMPANY_CODE` | `` | ☑ | | Code of company. | ## Columns of Table Function The columns of the table function `OfficeSettingsByCode` are shown below. Each column has an SQL data type. | Name | Data Type | Label | Required | Documentation | |---|:---:|---|:---:|---| | `ACCOUNTSPAYABLE` | `varchar2` | Accounts payable account | ☐ | General ledger account the suppliers are booked on. | | `ACCOUNTSRECEIVABLE` | `varchar2` | Accounts receivable account | ☐ | General ledger account the customers are booked on. | | `ADDRESS_CITY` | `varchar2` | City | ☐ | | | `ADDRESS_COUNTRY_NAME` | `varchar2` | Country name | ☐ | | | `ADDRESS_COUNTRY` | `varchar2` | Country | ☐ | | | `ADDRESS_FIELD1` | `varchar2` | Address field 1 | ☐ | | | `ADDRESS_FIELD2` | `varchar2` | Address field 2 | ☐ | | | `ADDRESS_FIELD3` | `varchar2` | Address field 3 | ☐ | | | `ADDRESS_POSTCODE` | `varchar2` | Postcode | ☐ | | | `ADDRESS_TELEPHONE` | `varchar2` | Telephone | ☐ | | | `ALLOWMULTIPLECONTROLACCOUNTS` | `char` | Allow multiple control accounts | ☐ | | | `BASECURRENCY` | `varchar2` | Base currency | ☐ | | | `CLOSEPNL` | `varchar2` | Close profit and loss account | ☐ | | | `COCNUMBER` | `varchar2` | CoC Number | ☐ | | | `CODE` | `varchar2` | Code | ☑ | | | `COMPANY_CODE` | `varchar2` | Company ID | ☑ | | | `COMPANY_NAME` | `varchar2` | Company Name | ☑ | | | `CREATED` | `datetime` | Created | ☐ | | | `CREDITORIDENTIFIER` | `varchar2` | Creditor identifier | ☐ | Identifier used on a SEPA direct debit. | | `CURRENTPERIOD` | `int32` | Current period | ☐ | | | `CURRENTYEAR` | `int32` | Current year | ☐ | | | `DAYSAFTERDUEDATE` | `int32` | Days after due date | ☐ | Credit management: days after the due date before an invoice is listed. | | `DAYSAFTERDUEDATEVALUE` | `decimal` | Days after due date value | ☐ | | | `DAYSAFTERPARTPAYMENT` | `int32` | Days after part payment | ☐ | | | `DEFAULTBANK` | `varchar2` | Default bank | ☐ | | | `DEFAULTMATCHING` | `varchar2` | Default matching | ☐ | | | `DEMO` | `char` | Demo | ☐ | Whether the company serves training purposes only. | | `EDITDIMENSIONNAME` | `char` | Edit Dimension Name | ☐ | | | `HIERARCHY` | `varchar2` | Reporting structure | ☐ | | | `LASTCLOSEDYEAR` | `int32` | Last closed year | ☐ | Financial year up to and including which the books are closed. | | `MODIFIED` | `datetime` | Modified | ☐ | | | `NAME` | `varchar2` | Name | ☐ | | | `NUMBEROFPERIODS` | `int32` | Number of periods | ☐ | | | `OPENINGBALANCE` | `varchar2` | Opening balance account | ☐ | | | `PAYMENTDISCOUNT` | `varchar2` | Payment discount | ☐ | | | `REGION` | `varchar2` | Region | ☐ | | | `REPORTINGCURRENCY` | `varchar2` | Reporting currency | ☐ | | | `SCHEME` | `varchar2` | Scheme | ☐ | Either invoice or cash, being when VAT falls due. | | `SHORTNAME` | `varchar2` | Short Name | ☐ | | | `SOLETRADERVATNUMBER` | `varchar2` | Sole trader VAT number | ☐ | | | `STATUS` | `varchar2` | Status | ☐ | | | `SUSPENCEACCOUNT` | `varchar2` | Suspense account | ☐ | | | `TOUCHED` | `int32` | Touched | ☐ | | | `TYPE` | `varchar2` | Type | ☐ | | | `USER_NAME` | `varchar2` | User name | ☐ | | | `USER` | `varchar2` | User | ☐ | User who created or last changed the company. | | `VATNUMBER` | `varchar2` | VAT Number | ☐ | |