VEF_FUNCTION_SPE: new generic functions are taken into account

Use the VEF_FUNCTION_SPE entry point to take into account the new generic DCLVATGENx functions previously copied from the standard generic DCLVATGEN function. This entry point is called when a function is checked to determine whether it can be managed in a VAT form, and when a function is selected in a VAT form.


Context and operating mode

Call context


The purpose of this entry point is to manage several generic VAT boxes and forms for the same legislation, after the elements from the standard DCLVATGEN function have been duplicated.

The VEF_FUNCTION_SPE entry point is called when a function is checked to determine whether it can be managed in a VAT form. It is also called when a function is selected in a VAT form.


Available variable


The following variable is available:


A_VEF_FCT_SPE, alphanumerical variable sized to 9. It is used to enter the codes of the new generic functions, from index 1 to 9.


Mandatory prerequisites to use the entry point


You can add a maximum of 9 additional generic functions to the VAT framework.


To do so, you first need to duplicate the following elements of the standard DCLVATGEN function by adding a character (here x) at the end of the code of each element:

  • X3 DCLVATGEN function, to by duplicated without modification with the name DCLVATGENx
  • X3 DCLVATGEN screen, to by duplicated without modification with the name DCLVATGENx
  • X3 DCLVATGEN window, to be duplicated with the name DCLVATGENx by linking it to the DCLVATGENx screen
  • X3 DCLVATGEN action to be duplicated with the name DCLVATGENx by linking it to the DCLVATGENx window

Once these prerequisites are completed, you can add the new generic functions by using the entry point, like in the example below.


Example of use for this entry point


$ACTION

Case ACTION

When "VEF_FUNCTION_SPE" : Gosub VEF_FUNCTION_SPE

When Default : Return

Endcase

Return


$VEF_FUNCTION_SPE


A_VEF_FCT_SPE(1) = "DCLVATGEN1"

A_VEF_FCT_SPE(2) = "DCLVATGEN2"


Return