Common data > Common tables > Country 

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

Destined notably to figure in the reports and the screens in which the record code can be entered or selected. This text is used to give a clear description to the record concerned.

Close

 

Entry screen

Fields

The following fields are present on this tab :

Block number 1

Code making it possible to identify the currency for a site, a Business Partner, or to define a default value. This code is controlled in the currency table. It is advisable to use the ISO coding during the creation of a new currency.

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

  • EU member (field EECFLG)

Indicate if the country is a member of the European Economic Community.

  • SEPA area (field FLGSEPA)
  • EU entry date (field EECDAT)

When a country is a member of the European Union, its entry date is entered here.

  • 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.

  • Impacted by the 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)
  • Federal ID code (field CINSEE)

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

  • Intrastat country code (field EECCOD)

The code used by customs administration for the declaration of the exchange of goods.

  • 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)
  • field NIDFMTFLG
  • Unique number (field NIDFMT)

 

  • field EECFMTFLG
  • VAT format (field EECFMT)

 

  • 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)

 

  • field CRTFMTFLG
  • Site tax ID number (field CRTFMT)

 

  • Site tax ID no. mandator (field CRTOBL)

Social identity

  • field SOCNUMFLG1

 

  • Social Security no. 1 (field SOCNUMFMT)

Format of the social security code, specific to each country.

Warning : The social security number must not exceed 25 characters.

  • field SOCNUMFLG2

 

  • Social Security no. 2 (field SOCNUMFMT2)

 

Close

 

Tab Detailed:

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)
  • 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)
  • 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)
  • City format (field CTYCODFMT)
  • Upper-case letters (field CTYUPP)
  • 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)
  • Region country control (field TELREG)

Geographic subdivisions

  • Subdivision 1 (field ETATFLG)
  • Title (field ETATNAM)
  • Format (field ETATFMT)

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

  • Subdivision 2 (field ETATFLG2)
  • Title (field ETATNAM2)
  • Format (field ETATFMT2)

 

  • Subdivision entry (field ETAT)
  • Subdivision control (field ETATCTL)

Close

 

Tab Bank

Fields

The following fields are present on this tab :

Bank

  • Bank ID number (field BIDFMT)

 

  • Domicile (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):

  • Let the 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 comprised of 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.

  • Let 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 to the function :

 TABCOUNTRY : Country

This can be changed by 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 comprise 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