Common data > Common tables > Countries 

This table is used to define the country codes used by the software as well as the associated characteristics, especially the controls to be carried out on standardized information.

Prerequisites

SEEREFERTTO Refer to documentation Implementation

Screen management

Header

Fields

The following fields are present on this tab :

This code is used to identify the country associated with the information.

In the country table, which controls this field, there is a certain number of characteristics useful to perform controls on dependent information, and especially :

  • the telephone number format
  • the format of the number identifying a company or an activity (SIRET, NAF in France)
  • the postal code format
  • the format of the bank ID number
  • field CRYDES

Enter the description of the relevant record.

This long description is used as a title in screens and reports.

Close

 

Tab General

Fields

The following fields are present on this tab :

Block number 1

This code helps identify the currency for a site, a business partner, or define a default value. This code is controlled in the currency table. It is advisable to use the ISO code during the creation of a new currency.

  • EU member (field EECFLG)

Select this check box if the country is a member of the European Union.   
The EU-related information are used for the Intrastat declaration. 

  • EU entry date (field EECDAT)

Enter the date at which the country joined the European Union, if this country is a member state of the EU.

   
  • EU withdrawal date (field EECDATOUT)

Enter the date at which the country has left the European Union, if this country is a former member state of the EU.

   
  • Generalized System of Preferences (field GSPFLG)

  • EORI identification (field EORIFLG)

Select this check box to enable the EORI number field for all entities from this country including companies, sites and business partners (BPs).

Note: This number is needed for entities doing business within the UK and for EU companies importing and exporting goods and services with the UK.

Code controlled in the language table making it possible to define the language of a business partner.

  • SEPA area (field FLGSEPA)

This flag identifies the countries that belong to the SEPA area.

The SEPA area means Single Euro Payments Area.

This affiliation to the SEPA area is controlled in payment creation if they are based on payment modes known as "SEPA" (SEPA Credit Transfer or SEPA Direct Debit).

  • Control script (field CTLPRG)

Defined here is the name of a standardised control programme, within which are found the standard programmes that make it possible to carryout coherence controls on the identifiers above (control of the Bank ID number for example....)
This programme is provided principally as standard, but it is possible to write and add others if necessary. This requires the use of the development tools.

  • Involved in DUE (field FLGDUE)

Codes

  • ISO-3166-1 alpha-2 (field ISO)

This represents the country code according to the ISO standard 7372.

  • ISO-3166-1 alpha-3 (field ISOA3)

 

  • ISO-3166-1 numeric (field ISONUM)

Numeric country code according to the ISO 3166 standard.

  • Federal ID code (field CINSEE)

The code INSEE is used in the social data declaration (TDS).

  • Intrastat country code (field EECCOD)

Code used by the Customs administration for the Intrastat declaration.

  • VAT radical (field CRYVATNUM)

The root for the value added tax identification number for this country (TVA in France, IVA in Italy, VAT in UK, .....etc).
This field only concerns the countries who are part of the European Community identified by the indicator EC membership.
This field is initialised by the first 2 characters of the currency code.

Identification

  • field CRNFMTFLG

The format of the company identification number, specific to each country and applied to the field Comp. reg. no. at the time of entry of the BPs, companies and sites.
Warning:
The company registration number should not exceed 20 characters.

  • Company tax ID no. (field CRNFMT)

 

  • Company tax ID mandatory (field CRNOBL)

When this check box is selected, it indicates that:

  • the Company Registration number, the identification number and the EU tax number are mandatory on the company record,
  • the EU tax number is mandatory on the BP record, except if the BP is a natural person.

Block number 5

  • field NIDFMTFLG

Format of the identification number and applied to the Number field during the entry of the companies. Warning: The identification number cannot exceed 80 characters.

  • Unique number (field NIDFMT)

 

Block number 6

  • field EECFMTFLG

Format of the EU tax number used in BP and company entry. Warning: The VAT number should not exceed 20 characters.

  • VAT format (field EECFMT)

 

Block number 7

  • field NAFFMTFLG

The format of the activity code, specific to each country and applied to the field SIC code at the time of entry of the BPs, companies and sites.

Warning: The activity code must not exceed 10 characters.

  • SIC (field NAFFMT)

 

Block number 8

  • field CRTFMTFLG

Format of the national company identification number, specific to each country and applied to the Site Registration number field on entering BPs and sites. Warning: The Site Registration number cannot exceed 20 characters.

  • Site tax ID no. (field CRTFMT)

 

  • Site tax ID mandatory (field CRTOBL)

When checked, this box specifies that the Site Registration number is mandatory on the site record.
It also specifies that the Site Registration number and the EU tax number are mandatory on the BP's record if the BP is a corporation.

Social identity

  • field SOCNUMFLG1

 

  • Social Security no. 1 (field SOCNUMFMT)

 

  • field SOCNUMFLG2

 

  • Social Security no. 2 (field SOCNUMFMT2)

 

Close

 

Tab Details

Fields

The following fields are present on this tab :

Address

  • Titles (field ADRNAM)

Corresponds to the titles of the three address lines.

  • Address format (field ADRCODFMT)

Format used to enter the address.

  • Postal code (field POSCODFMT)

This represents the Format of the postcode, appropriate to each country and applied to the field postcode during the entry of addresses.

Warning:
The postcode must not exceed 10 characters.

  • Controlled length (field MINZIP)

This field is used to specify the length of the postal code on which the control will be based.
The value: "0" means that the control is carried out on the whole length.
This is a useful feature for some countries, like the United States, where postal codes can contain a suffix identifying a district or a building, for example, in dense urban areas.
Thus, if the postal code is entered using the following format: 5#[-]4#, and the control applies to the first 5 characters only, the town/city corresponding to the postal code made of the first 5 characters will be the one to be submitted when no record corresponding to the full code can be found.

  • Postal code control (field POSCODCTL)

This field is used to manage the community code and to verify the existence of the post code.

  • Mandatory postal code (field POSOBL)

When checked, this box specifies that it is mandatory to enter the postal code and the town/city on the addresses of such entities as Company, Site and all the BP entities (BP, Prospect, Customer, Supplier, Carrier and Sales rep).

  • City format (field CTYCODFMT)

Format used to display the town/city.
The formats used in some countries cannot be complied with by the standard Sage X3 format application (in the United-States, the first letter of each word of a town/city can be an uppercase letter: for example, Los Angeles). It is then necessary to use a sub-program in the control program associated with the function, in order to apply the requested format.

SEEREFERTTOFor additional information, see the technical annex in the documentation on the Country record.

  • Upper-case letters (field CTYUPP)

When this indicator is abled, the names of towns/cities entered by the users are automatically converted to uppercase characters, irrespective of the case specified in the previous field for the town/city format. It is abled at all times by default so as to keep the historical behavior of the application.

When the indicator is disabled, the format specified in the previous field is the one that is displayed.

SEEINFO Irrespective of the entry format, it remains possible, when entering an address, to select towns/cities without taking the case and accented characters into consideration. The selection window contains a column dedicated to the search. In it the names of the towns/cities are stored in uppercase letters.

  • INSEE code format (field CTYNUMFMT)

The format of the community code, appropriate to each country and applied to the field Community code during the entry of postal codes.

Warning : The city code should not exceed 10 characters.

Telephone number

  • Telephone (field TELFMT)

The Format of the telephone number specific to each country and applied during the entry of the addresses and contacts.
Warning: The telephone number should not exceed 20 characters.

  • Country code control (field TELTCY)

This field is used to elaborate the sub-division of the phone number to find the country code.
It must be entered in the form d-f where "d" represents the character at the beginning of the country code on the formatted field and where "f" represents the character at the end of the country code on the formatted field.

For France, for example, if the phone number format is "[(33)]#[.]##[.]##[.]##[.]##", the formatted phone number will be (33)1.46.45.44.42 and the user will have to specify 2-3 to find 33 as a country code.

The DECOUPE(PAYS,TEL,INTER,REGION,NUTEL) (SUB-DIVISION(COUNTRY, TEL, INTER, REGION, TELNO.) sub-program From CONTNUM is used to find this information.

The general setup CTLTEL - Phone number control is used to completely deactivate the entry control of the phone number or even to carry out a control only during modification.

  • Region country control (field TELREG)

This field is used to elaborate the sub-division of the phone number to find the region code.
It must be entered as "d-f" where "d" is the first character and where "f" is the last character of of the region prefix in the formatted field.

For France, for example, if the phone number format is "[(33)]#[.]##[.]##[.]##[.]##", the formatted phone number will be (33)1.46.45.44.42 and the user will have to specify 5-5 to find 1 as a country code.

The DECOUPE(PAYS,TEL,INTER,REGION,NUTEL) (SUB-DIVISION(COUNTRY, TEL, INTER, REGION, TELNO.) sub-program From CONTNUM is used to find this information.

The general setup CTLTEL - Phone number control is used to completely deactivate the entry control of the phone number or even to carry out a control only during modification.

Geographic subdivisions

When defining a country, it must be attached to a continent. This link is used to define a hierarchy in the datamarts of the Business Intelligence Module.

  • Subdivision 1 (field ETATFLG)

This checkbox is used to define by country what is the geographical subdivision of the highest level. For instance the Region for France,the State for the United States...

  • Description (field ETATNAM)

Title to be displayed to express the highest geographical subdvision of a country. For instance: Region for France, State for the United States...

  • Format (field ETATFMT)

This represents the Report Format, used especially in the USA.

  • Subdivision 2 (field ETATFLG2)

This checkbox is used to define for each country the geographical subdivision of the lowest level compared to the previous one. For instance: Department for France, District for the United States...

  • Description (field ETATNAM2)

Title to be displayed to express the geographical subdivision belonging to a level lower than the previous one. For example, the Department for France, and County for the United-States...

  • Format (field ETATFMT2)

 

  • Subdivision entry (field ETAT)

This checkbox is used to specify for a country if one of the two above mentioned geographical sub-divisions must be taken into account in the definition of the postal address.
For instance, for the United States, if the first subdivision is theState, Subdivision1 will need to be specified here for it to be entered and saved in the addresses.

  • Subdivision control (field ETATCTL)

When abled, this indicator makes it possible to set up an existence control and submit a selection window when entering the subdivision in all those screens where an address needs to be entered.
This control will be carried out based on the subdivisions entered at geographical subdivisions setup level.

 

Tab Bank

Fields

The following fields are present on this tab :

Bank

  • Bank account number (field BIDFMT)

 

  • Paying bank (field PABFMT)

 

  • Bank control (field BIDCTL)

 

  • Length of bank (field BANLNG)

 

  • IBAN management (field FLIBAN)

 

 

Close

 

Belgian legislation

Control program

In the "Control program" field, it is possible to enter the CONTBELG control linked to the Belgian legislation.
This control makes it possible to check the formatting of an EU VAT number and a bank ID number.

Control on the VAT number

Reminder about the structure of the Belgian VAT number
The Belgian VAT number is comprised of the following elements: country code + 10 numerical characters.
For example, BE 0419. 618.535.

The control applies to functions 'Company", "BP", "Prospects", "Customers", "Suppliers", "Sales representatives", "Carrier" for which the country is "BE".

The control program checks the last two numbers, using the following formula (check-digit modulo 97):

  • Take VAT number BE0419.618.535.
  • Retain the first 8 numbers: VATno.=04196185.
  • Calculate the remainder of the division: RT = Modulo (NbTVA/97) that is Modulo (04196185/97) = 62.
  • Withdraw 97-RT i.e. 97 - 62 = 35.

The VAT number is valid.

Control on the bank ID number

Reminder about the structure of the Belgian bank ID number
The Belgian Bank ID number has 12 numbers including the following elements: ten numerical characters where the first three provide information relating to the code of the bank holding the account and the seven next numbers correspond to the account number.
The last two numbers are controlled by a check-digit modulo 97.

  • Take the account number 510-0075470-61.
  • Retain the first 10 numbers: No.=5100075470.
  • Calculate the remainder of the division: RT = Modulo (Nb/97) that is Modulo (5100075470/97) = 61.

The account number is valid.

The control applies to functions "Company", "BP", "Customers", "Suppliers", "Payments", "Bank" for which the country is "BE".

The control is carried out upon entering the Bank ID number on the above mentioned records. It is carried out according to the country and to the setup of the "Control program" field defined on the "Country" record.

Reports

By default, the following reports are associated with this function :

 TABCOUNTRY : Country

This can be changed using a different setup.

Error messages

In addition to the generic error messages, the following messages can appear during the entry :

Format Too Long

The given format corresponds to an information which cannot be completely stored in the table.

Program does not exist

The control program has not been defined.

Tables used

SEEREFERTTO Refer to documentation Implementation

Technical appendix: control program

The control programs by country must include a set of standardized sub-programs which carry out validity controls (for instance a control key or a length test), when these controls cannot be done by the format. If new programs are designed, the rule to name them is CONT followed by the country name. It is possible to use an abbreviation if the country name is too long, a processing being limited to 12 characters.

The necessary sub-programs are described below:

 

##########################################################
##  Control on the bank ID number                                                                              ###
##  SPSTAT=0 if the bank ID number is correct
##  SPSTAT=1 if the control key is incorrect
##  SPSTAT=2 if the length of the bank ID number is incorrect
##########################################################
Subprog RIB(RIB,SPSTAT)
Value Char RIB()
Variable Integer SPSTAT
End

 


##########################################################
##  Control on the site registration number                                                                          ###
##  SPSTAT=0 if the site registration number is correct
##  SPSTAT=0 if the site registration number is incorrect
##  SPSTAT=2 if the length of the site registration number is incomplete
##########################################################
Subprog SIRET(SIRET,SPSTAT)
Variable Char SIRET()
Variable Integer SPSTAT
End

 


##########################################################
##  Control on the VAT number                                                               ###
##  SPSTAT=0 if the VAT code is correct
##  SPSTAT=1 if the VAT code is incorrect
##########################################################
Subprog TVA(TVA,SPSTAT)
Value Char TVA()
Variable Integer SPSTAT
End

 


######################################################
## Control on the social insurance registration number ###
##  SPSTAT=0 if the social security number is correct
##  SPSTAT=1 if the control key is incorrect
## SPSTAT=3 if the number is inconsistent with the other parameters, if provided
######################################################
Subprog SS(NOSS,ETR,SEX,DNAISS,DEPT,COMNNO,SPSTAT)
Value Char NOSS(): # Social security number
Value Char DEPT(): # Birth department code
Value Char COMNNO(): # Birth commune code
Value Integer SEX: # Gender
Value Date DNAISS: # Birth date
Value Title ETR: # =1 if non foreign
Variable Integer SPSTAT
End

 

 ###############################################################
## Sub-program to define a default value
# for the social registration number ###
###############################################################
Subprog VDSS(ETR,SEX,DNAISS,DEPT,COMNNO,NOSS)
Value Title ETR: # =1 if non foreign
Variable Char NOSS(): # Returned number
Value Integer SEX: # Gender
Value Date DNAISS: # Birth date
Value Char DEPT: # Department code
Value Char COMNO: # Commune code
End

 

##########################################################
##  Control on the telephone number                                                                    ###
##  STAT=0 if the telephone number is correct
##  STAT=1 if the telephone number is incorrect
 
##MESSA Description of the error message
##########################################################
Subprog CNTTEL(TEL,MESSA,STAT)
Value Char TEL
Variable Char MESSA
Variable integer STAT
End

 

##########################################################
##  Adaptation of the town/city format                                                                    ###
##  STAT=0 if the format is correct
##  STAT=0 if the format is incorrect
 
##MESSA Description of the error message
##########################################################
Subprog FMTCTY(SCTY,MESSA,STAT)
Value Char SCTY
Variable Char MESSA
Variable integer STAT

Rtz  MESSA
STAT = 0

End