DAE_FILTER: Additional filter on the VAT declaration on debits postings

The DAE_FILTRE entry point is used to complete the standard filter made on the document line table in order to take into account the postings in the VAT declaration on debits program.

Context and operating method

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 the transaction in the VAT declaration on collection processing for a company. 

Available variables and masks

Depending on the content of the GFONCTION variable, the DCLVATFRA or DCLVATBEL mask is available and contains the release parameters of the function. The GFONCTION variable is initialized to DCLVATFRA or DCLVATBEL depending on whether it is a French or Belgian VAT declaration/debits.

The OPT local variable contains the value of the DCLVATDAT parameter.

The CRITDEB local variable contains the selection criterion for entry headers (GACCENTRY table) and entry lines (GACCENTRYD table).

The COMPANY [CPY] and TABCUR [TCU] tables are open and contain the company being processed as well as the currency of the main general ledger.

BEFWRIDLVB: Before the write to the temporary DCLVATBOXH table.

This entry point is used to insert additional logic just before the write to the temporary DCLVATBOXH table in order to modify the value of certain fields in the table or to initialize specific/custom fields that have been added.

The DCLVATBOXH table is used by the VAT declaration on debits 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 right before the write or the rewrite to the temporary table DCLVATBOXH [DLVB]. The DLVB_UW variable is initialized to "W" or "U" depending on whether it is a write or rewrite operation.                                                            

Available variables and masks

Depending on the content of the GFONCTION variable, the DCLVATFRA or DCLVATBEL mask is available and contains the release parameters of the function. The GFONCTION variable is initialized to DCLVATFRA or DCLVATBEL depending on whether it is a French or Belgian VAT declaration/debits.

Open tables

Table

Significant content

Table Title

 COMPANY

X

Companies

 TABCUR

X

Currency table

 FACILITY

              X

Sites

 DCLVATBOXH

               X

Temporary VAT declaration/debits table