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

Tab General

Tab Details

Tab Bank

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