ERP 2.50:Developers Guide/Database Model/org.openbravo.model.common.geography/C Country
C_Country
The Country Tab defines any country in which you do business. Values entered here are referenced in location records for Business Partners.
- Name:Country
- Classname:Country
This table contains the following columns:
Name | Nullable | Data Type | Description |
C_Country_ID | N | VARCHAR2(32) | A state or a nation. |
AD_Client_ID | N | VARCHAR2(32) | Client for this installation. |
AD_Org_ID | N | VARCHAR2(32) | Organizational entity within client |
IsActive | N | CHAR(1) | A flag indicating whether this record is available for use or de-activated. |
Created | N | DATE | The date that this record is completed. |
CreatedBy | N | VARCHAR2(32) | User who created this records |
Updated | N | DATE | x not implemented |
UpdatedBy | N | VARCHAR2(32) | User who updated this records |
Name | N | NVARCHAR2(60) | A non-unique identifier for a record/document often used as a search tool. |
Description | Y | NVARCHAR2(255) | A space to write additional related information. |
CountryCode | N | CHAR(2) | The geographic country code for a country based on the ISO standard. |
HasRegion | N | CHAR(1) | Country contains Regions |
RegionName | Y | NVARCHAR2(60) | The name of an area in a specific country. |
ExpressionPhone | Y | NVARCHAR2(20) | Phone Format |
DisplaySequence | N | NVARCHAR2(20) | Format for printing this Address |
ExpressionPostal | Y | NVARCHAR2(20) | Postal code Format |
HasPostal_Add | N | CHAR(1) | Has Additional Postal Code |
ExpressionPostal_Add | Y | NVARCHAR2(20) | Additional Postal Format |
IsDefault | Y | CHAR(1) | A value that is shown whenever a record is created. |
AD_Language | Y | VARCHAR2(6) | A method of communication being used. |
C_Currency_ID | Y | VARCHAR2(32) | An accepted medium of monetary exchange that may vary across countries. |
IBANNoDigits | Y | NUMBER | The length of the IBAN code of a bank account is variable, depending on the country. |
IBANCountry | Y | NVARCHAR2(2) | Country Code asigned to a country in the IBAN structure. |
Other Info
Check constraints
These are the check constraints for this table:
- C_COUNTRY_HASPOSTAL_ADD_CHECK: HASPOSTAL_ADD IN ('Y', 'N')
- C_COUNTRY_HASREGION_CHECK: HASREGION IN ('Y', 'N')
- C_COUNTRY_ISACTIVE_CHECK: ISACTIVE IN ('Y', 'N')
- C_COUNTRY_ISDEFAULT_CHECK: ISDEFAULT IN ('Y', 'N')
Indexes
These are the indexes for this table (for each index there is a list of all the columns included within it):
Unique
- C_COUNTRYCODE
- C_COUNTRY_KEY
Columns
Country
The Country defines a Country. Each Country must be defined before it can be used in any document.
- Physical column name: C_Country_ID
- Property Name: id
- Reference: ID
Client
- Physical column name: AD_Client_ID
- Property Name: client
- Reference: TableDir
- Default value: @AD_CLIENT_ID@
Foreign key column to AD_Client table, (column: AD_Client_ID)
Validation Rule AD_Client Security validation: Clients with user access rights. With the following code:
AD_Client.AD_Client_ID IN (@#User_Client@)
Organization
- Physical column name: AD_Org_ID
- Property Name: organization
- Reference: TableDir
- Default value: @AD_Org_ID@
Foreign key column to AD_Org table, (column: AD_Org_ID)
Active
There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reporting. There are two reasons for de-activating and not deleting records:
(1) The system requires the record for auditing purposes.
(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are existing invoices for it. By de-activating the Business Partner you prevent it from being used in future transactions.
- Physical column name: IsActive
- Property Name: active
- Reference: YesNo
- Default value: Y
Creation Date
The Created field indicates the date that this record was created.
- Physical column name: Created
- Property Name: creationDate
- Reference: DateTime
Created By
- Physical column name: CreatedBy
- Property Name: createdBy
- Reference: Search
Foreign key column to AD_User table, (column: AD_User_ID)
Updated
The Updated field indicates the date that this record was updated.
- Physical column name: Updated
- Property Name: updated
- Reference: DateTime
Updated By
- Physical column name: UpdatedBy
- Property Name: updatedBy
- Reference: Search
Foreign key column to AD_User table, (column: AD_User_ID)
Name
A more descriptive identifier (that does need to be unique) of a record/document that is used as a default search option along with the search key (that is unique and mostly shorter). It is up to 60 characters in length.
- Physical column name: Name
- Property Name: name
- Reference: String
- This column is part of the table's identifier
Description
A description is limited to 255 characters.
- Physical column name: Description
- Property Name: description
- Reference: String
ISO Country Code
For details - http://www.din.de/gremien/nas/nabd/iso3166ma/codlstp1.html or - http://www.unece.org/trade/rec/rec03en.htm
- Physical column name: CountryCode
- Property Name: iSOCountryCode
- Reference: String
Has Regions
The Country has Region checkbox is selected if the Country being defined is divided into regions. If this checkbox is selected, the Region Tab is accessible.
- Physical column name: HasRegion
- Property Name: hasRegions
- Reference: YesNo
Region Name
The Region Name defines the name that will print when this region is used in a document.
- Physical column name: RegionName
- Property Name: regionName
- Reference: String
- Default value: State
Phone No. Format
Phone Format
- Physical column name: ExpressionPhone
- Property Name: phoneNoFormat
- Reference: String
Address Print Format
The Address Print format defines the format to be used when this address prints. The following notations are used: @C@=City @P@=Postal @A@=PostalAdd @R@=Region
- Physical column name: DisplaySequence
- Property Name: addressPrintFormat
- Reference: String
- Default value: @C@, @R@ @P@
Postal Code Format
Postal code Format
- Physical column name: ExpressionPostal
- Property Name: postalCodeFormat
- Reference: String
Additional Postal Code
The Additional Postal Code checkbox indicates if this address uses an additional Postal Code. If it is selected an additional field displays for entry of the additional Postal Code.
- Physical column name: HasPostal_Add
- Property Name: additionalPostalCode
- Reference: YesNo
Additional Postal Format
Additional Postal Format
- Physical column name: ExpressionPostal_Add
- Property Name: additionalPostalFormat
- Reference: String
Default
The Default Checkbox indicates if this record will be used as a default value.
- Physical column name: IsDefault
- Property Name: default
- Reference: YesNo
Language
- Physical column name: AD_Language
- Property Name: language
- Reference: Table
Foreign key column to AD_Language table, (column: AD_Language_ID)
Reference Table AD_Language
Currency
- Physical column name: C_Currency_ID
- Property Name: currency
- Reference: TableDir
Foreign key column to C_Currency table, (column: C_Currency_ID)
IBAN Length
Then International Bank Account Number structure do not stablish a specific length: it depends on the country. This field will define the length of the IBAN codes for that country.
- Physical column name: IBANNoDigits
- Property Name: iBANLength
- Reference: Integer
IBAN Code
Then International Bank Account Number structure stablish that the first two digits will belong to the country. This country code is the one associated to a country of the application in this field.
- Physical column name: IBANCountry
- Property Name: iBANCode
- Reference: String
Related tables
Tables that link this table:
- Bank.Country
- BusinessPartnerBankAccount.Country
- City.Country
- CountryTrl.Country
- DataImportBusinessPartner.Country
- DataImportInvoice.Country
- DataImportOrder.Country
- DataImportTax.Country
- DataImportTax.Destination Country
- FinancialMgmtTaxRate.Country
- FinancialMgmtTaxRate.Destination Country
- FinancialMgmtTaxZone.Destination Country
- FinancialMgmtTaxZone.From Country
- Location.Country
- Region.Country
- ShippingShippingCompanyFreight.Country
- ShippingShippingCompanyFreight.Destination Country