Páginas filhas
  • SPEDFIS - Automatic completion of the invoice complement for the generation of ICMS/IPI EFD record C110

01. OVERVIEW

Configuration is available for automatic completion of the invoice complement (MATA926) "Complementary Invoice Information" (CDT table) that generates the C110 record in the magnetic file ICMS/IPI EFD.

02. USAGE PROCEDURE

Parameters

Variable Name

MV_ATUCOMP 

Type

Logical

Content

.T.

Description

Indicate whether to use automatic update for SPED Tax Document Complements.  

Variable Name

MV_SPDIFC

Type

Numeric

Content

0

Description

Print the C110 Rec.'s TXT_COMPL field. 0-CCE_DESCR field; 1-CDT_DCCOMP field; 2- F1/F2_MENNOTA field; 3- TIO F4_CODINFC/F4_FORINFC

Important!

When the parameter MV_ATUCOMP is set to .T. when generating the incoming document or completing the order, the Complementary Invoice Information add-on (CDT) will be completed automatically.


TIO Registration

  • Inf. Code (F4_CODINFC) = Enter the "Additional Information" code (MATA966 - CCE table) that will be used to write the code in the "Compl. Inf." field (CDT_IFCOMP) in the Complementary Invoice Information (MATA926).
  • NFE Formula (F4_FORINFC ) =Enter the formula code registered in "Formulas" (CFGX019) which returns the contents of the description of the ""Compl. Desc." field (CDT_DCCOMP) in the Complementary Invoice Information (MATA926).


03. EXAMPLES OF USE

  • MV_SPDIFC = 0: The system will perform a search in the CCE table using the CDT_IFCOMP. If the record is found, then the C110 record will be filled with the CDT_IFCOMP field code of the CDT table and the description of the CCE_DESCR field;
  • MV_SPDIFC = 1: The system will complete the C110 record with the CDT_IFCOMP field code and, for the description, it will check the CDT_DCCOMP field. If filled in, then it will be used as a description. If not, the system will perform a search in the CDC table, and if the CDC_DCCOMP field is filled in, then it will be used as the description of the C110 record;
  • MV_SPDIFC = 2: The system will complete the C110 record with the CDT_IFCOMP field code and, for the description, it will use the F1_MENNOTA or F2_MENNOTA fields depending on the invoice type;
  • MV_SPDIFC = 3: The system will complete the C110 record with the CDT_IFCOMP field code and, for the description, it will execute the formula of the F4_FORINFC field. The formula return will be used for the description;


Important!

If the complementary description of the C110 record is field(C5_MENPAD + C5_MENNOTA), simply create a formula in "Formulas" (CFGX019) concatenating this information and then fill the formula in the F4_FORINFC field of the TIO. In the file generation, just configure the MV_SPDIFC parameter = 3,so the system will run the formula registered in the F4_FORINFC field to return the description of the record in the file.

Suggestion

You can use calls from other functions when assembling the formula to be executed, such as the Formula() function to execute and obtain the result of another formula previously registered. In the example below, when booking the incoming invoice and executing this record, the system will first get the formula result that will be stored in the F1_MENPAD field, then concatenate it with another string filled in the F1_MENNOTA field:

Also, it is possible to use other standard functions or even user functions (called customizations), as needed.