DCLVATOTH script: VAT declaration
FILTRE: Additional filter on the sites.
This entry point is used to restrict the VAT declaration to certain sites.
Context and operating method
Transaction
There is no transaction in progress.
Log file
There is an open log file.
Different call cases
This entry point is called for each company concerned by the declaration, in the loop of the site table.
Available variables and masks
The [L]CRITERE variable is used to enter the selection criterion. The condition is evaluated in the loop for the sites of the current company.
The DCLVAT mask is available and contains the release parameters of the function.
Variable or mask |
Definition |
DCLVATOTH [DIA] Mask |
VAT declaration |
CRITERE(250) Char |
|
|
|
Open tables
Only the tables Companies and Currencies have a significant content in that context.
Table | Significant content | Table title |
COMPANY | X | Companies |
TABCUR | X | Currency table |
FACILITY |
| Sites |
DAEFILTRE: Additional filter on the VAT declaration/cash receipts postings.
This entry point is used to complete the standard filter made on the document line table in order to take into account the entries in the VAT declaration on collection program.
Context and operating method
Transaction
There is one transaction in progress.
Log file
There is an open log file.
Different call cases
This entry point is called at the start of the transaction in the VAT declaration on collection processing for a company.
Available variables and masks
The [L]DAEFILTRE variable is used to enter the selection criterion. The condition is evaluated in the company accounting document lines loop for which the VAT declaration on collection is carried out.
The DCLVAT mask is available and contains the release parameters of the function.
Variable or mask |
Definition |
DCLVATOTH [DIA] Mask |
VAT declaration |
DAEFILTRE(250) char |
|
SOC char |
Company |
Char TTYP(1..NBTYP) |
Variable table containing the document types to be taken into account in the VAT declaration on collection. |
Open tables
Table | Significant content | Table title |
COMPANY | X | Companies |
TABCUR | X | Currency table |
FACILITY |
| Sites |
AV_ECRDVP: Before the write to the temporary DCLVATPAY table.
This entry point is used to insert additional logic just before the posting to the temporary DCLVATPAY table in order to modify the value of certain fields in the table or to initialize specific/custom fields that have been added.
The DCLVATPAY table is used by the VAT declaration on collection.
Context and operating method
Transaction
There is one transaction in progress.
Log file
There is an open log file.
Different call cases
This entry point is called just before the write to the temporary table DCLVATPAY [DVP]. Four "Write [DVP]" are made in the VAT declaration on cash receipts program corresponding to different types of record postings:
[DVP]TYPREC = 0 record serving to store the selection criteria ; [DVP]TYPREC = 2 for unmatched postings ; [DVP]TYPREC = 3 pre-payment cases ; [DVP]TYPREC = 1 other records.
The [DVP]TYPREC field is initialized just before the call to the entry point.
Available variables and masks
The DCLVATFRA mask is available and contains the release parameters of the function.
Open tables
Table | Significant content | Table title |
COMPANY | X | Companies |
TABCUR | X | Currency table |
FACILITY |
| Sites |
DCLVATPAY | X | Temporary VAT declaration on collection table |
NOM_ETAT: Name of the reports to be printed
This entry point is used to modify the codes of the VAT declaration reports to be printed.
Context and operating method
Transaction
There is no transaction in progress.
Log file
There is no open log file.
Different call cases
This entry point is called just before printing the VAT declaration reports (debits and payments) and is used to modify the codes of the reports to be printed.
The [L]ETAT_DEB variable contains the name of the VAT declaration on debits report to be printed. By default, this variable is initialized to DCLVATDEB1, but its value can be changed via this entry point.
The [L]ETAT_ENC variable contains the name of the VAT declaration on collection report to be printed. By default this variable is set to DCLVATENC1.
The DCLVATOTH mask is available and contains the function release parameters.
Variable or mask |
Definition |
DCLVATOTH [DIA] Mask |
VAT declaration |
Char ETAT_DEB (GLONARP) |
Name of the VAT declaration on debit |
Char ETAT_ENC (GLONARP) |
Name of the VAT declaration on collection |
FILTREDEB: Additional filter on the VAT declaration on debits postings
This FILTREDEB entry point is used to complete the standard filter made on the document line table to take into account the postings in the VAT declaration on debits program.
Context and operating method
Transaction
Transaction
There is no transaction in progress.
Log file
There is an open log file.
Call context
This entry point is called at the start of a company's VAT declaration on collection processing in order to process the entries.
Available variables and masksThe DCLVATOTH mask is available and contains the function release parameters.
The OPT local variable contains the value of the DCLVATDAT parameter.
The CRITDEB local variable contains the selection criterion of entry headers (GACCENTRY table) and of entry lines (GACCENTRYD table).
The COMPANY [CPY] and TABCUR [TCU] tables are open and contain the company being processed as well as the currency used.
DAE3FILTRE: Filter on unmatched entries
This DAE3FILTRE entry point is used to complete the standard filter made on the document line table to take into account the unmatched postings in the VAT declaration on cash receipts program.
Context and operating mode
Transaction
There is one transaction in progress.
Log file
There is an open log file.
Different call cases
This entry point is called at the end of a company's VAT declaration on collection processing in order to process the unmatched postings.
Available variables and masks
The [L]DAE3FILTRE variable is used to enter the selection criterion. The condition is evaluated in the company accounting document lines loop for which the amount of the declared VAT is reset to zero.
The DCLVAT mask is available and contains the release parameters of the function.
Variable or mask |
Definition |
DCLVATOTH [DIA] Mask |
VAT declaration |
Char DAE3FILTRE(250) |
Filter |
SOC char |
Company |
Char SITE |
Site |
Char GTYPGEN |
Main General Ledger |
Date DATDEB |
Matching start date |
Date DATFIN |
Matching end date |
Char TTYP(1..NBTYP) |
Variable table containing the document types to be taken into account in the VAT declaration on collection. |
Open tables
Table |
Significant content |
Table title |
COMPANY |
X |
Companies |
TABCUR |
X |
Currency table |
FACILITY |
|
Sites |
BEFWRIDLV: Before the write to the temporary DCLVAT table.
This entry point is used to insert additional logic just before the posting to the temporary DCLVAT table in order to modify the value of certain fields in the table or to initialize specific/custom fields that have been added.
The DCLVAT table is used by the VAT declaration on debit report.
Context and operating method
Transaction
There is one transaction in progress.
Log file
There is an open log file.
Different call cases
This entry point is called immediately before posting to the temporary table DCLVAT [DVL]. Two ‘Write [DVP]’ are made in the VAT declaration on debits program.
A record used for the storage of selection criteria (only the fields CPY, STRDAT, ENDDAT, SIM, OPTDAT and NUMRPT are entered
A record used for recording the declaration.
Available variables and masks
The DCLVATOTH mask is available and contains the function release parameters.
Open tables
Table | Significant content | Table title |
COMPANY | X | Companies |
TABCUR | X | Currency table |
FACILITY |
| Sites |
DCLVATPAY | X | Temporary VAT declaration on collection table |
CHECKDAE2: Read of entry lines belonging to the matching group
This entry point is used to take over in the VAT declaration on collection program to exclude certain entries when reading the entries belonging to the matching group.
Context and operating mode
Transaction
There is one transaction in progress.
Log fileThere is an open log file.
Different call casesThis entry point is called during the read of entry lines of the document belonging to the matching group being processed. The read is carried out on the GACCENTRYD table open with the [DAE2] abbreviation. This entry point is used to exclude certain entry lines from the standard program that loads into the variable grids the bases and VAT amounts that must be taken into account by the VAT declaration on collections.
The OK_DAE2 variable is set to 1 in standard before calling the entry point. If this variable is reset to zero in the specific program, the entry will not be taken into account.
Available variables and masksThe DCLVATOTH mask is available and contains the function release parameters.
Open tables
Table | Significant content | Table title |
COMPANY | X | Companies |
TABCUR | X | Currency table |
FACILITY |
| Sites |
DCLVATPAY | X | Temporary VAT declaration on collection table |