Páginas filhas
  • CADSPED - Entry Codes and Reflexes of the Calculation

CONTENTS

01. OVERVIEW

In order to automate the process of adjustments in the tax SPED EFD that are made by the records C197, D197, E111, and E220, the system allows the user to configure these entries during the issuance of tax documents.

In order for these adjustments to be made in the generation of the Tax EFD (SPEDFISCAL), it will be necessary to carry out the corresponding entries in the calculation of ICMS (MATA953).

In order to automate this process, the system allows the user to configure when these entries should be made during the issuance of tax documents.

02. EXAMPLE OF USE

  1. In the Tax Records Module (SIGAFIS), access Updates/Files/Types of Inflow and Outflow (MATA080). The system displays the screen containing registered TIOs.
  2. Place the cursor on a TIO and click Change, or Add a new record.
  3. In the ICMS Calculation Entries folder, fill in the fields according to the Configuration Procedures session guidelines.
  4. In the Tax Records (SIGAFIS), access Updates/Transactions/Outgoing Invoice (MATA920) or Incoming Invoice (MATA910)– this process can be done by other routines that involve the issuance of tax documents and have interaction with the Tax Calculations Engine (MATXFIS), for example, Sales Order (MATA410), Incoming Document (MATA103), Outgoing Document (MATA461), and more.
  5.  In the item row of the Tax Document, when selecting a TIO (SF4) that is bound to the Calculation Entries (CC7), the codes can be displayed in the ICMS Calculation Entries tab.
  6.  In the Tax Records (SIGAFIS), access Miscellaneous/Calculation/ICMS Calculation (MATA953) and, after the routine configuration, you can view the Adjustment Codes entered in the ICMS and ICMS-ST calculation rows.
  7.  In the Tax Books (SIGAFIS), go to Miscellaneous/Magnetic Files/Tax Sped (SPEDFISCAL) and, when generating the magnetic file, you can view the entries in the following records: C197; D197; E111, and E220. 

03. CALCULATION ENTRY IMPORT

Entry import can be accessed through two different routines:

    • UPDFIS – This update adjusts the whole dictionary and enables you to import the entry code table at the end of the processing.
    • IMPSPED – This routine updates a series of tables that have pre-defined codes (such as IBGE city codes and BCB country codes), and also enables you to import the entry code table.

For both cases, you must copy the tables published by the Federal Revenue Service to a folder in the server. It is necessary to download the tables of all States where the taxpayer collects ICMS and/or IPI: ICMS and IPI calculation adjustment tables.

For the proper functioning of the IMPSPED routine, there should be no name change in the tables downloaded in SEFAZ.

One of the steps of IMPSPED is the import of Entry Codes published by the Treasury Office of each State. You are prompted for the directory containing the entry files (in .*txt format) so that the system can import them automatically. Therefore, first, download these files from the SPED website, then copy them to a folder on the server.

For Smart ERP platform customers using the Electron Smartclient, you will be asked to access a local directory where you will add the entry files (in .*txt format). 

Tables comprised in the import process are:

    • CDO - Published on the SPED website as Adjustments of ICMS Calculation Balances.
    • CC6 - Published on the SPED website as Adjustments and Information concerning Values from Tax Document.
    • CCK - Published on the SPED website as IPI Calculation Adjustments.
    • CDY – Published on the SPED website as Declaratory Values (note: For CDY import, you must rename the TXT file referring to table 5.2 to TABELA52.txt).
    • CE7 - Published on the SPED website as Types of Credit Usage.


Important

The entity responsible for linking the Adjustment Codes to the Tax Documents is the TIO x Calculation Entry Binding (CC7).


04. PROCEDURE FOR APPROVAL OF ADJUSTMENT CODES

Until April/2014, the procedure adopted by the Protheus® product line for approval of the Fiscal EFD Adjustment Codes was opening a ticket and undergoing technical evaluation for approval in the routine of issuing tax documents.

In order for this procedure not to be necessary, a mechanism was created to allow the user to configure any adjustment code published by the Treasury Office through the registrations made available in the Tax Records module, so that the taxpayer does not need to wait for the approval of the code by TOTVS.

However, codes that have already been approved in the invoice issuance routine will remain available for use.

New features should be used for new codes.

Below are the codes already approved by TOTVS – Protheus®:
            

  Entry/Adjustment Code

  Description

States Comprised

Rules for Calculation

All entries ended with 000.

Regular ICMS Operation

MG/MA/MS/PB/SE

This entry is obtained with the total value of the document ICMS.

All entries ended between '001' and '005', plus the specific SC40000002, SC40000003, RJ70000002, and
PR40000081.

Rate Differential

MG/MS/PB/SE/RJ/PR

This entry is obtained with the value of the document's Complementary ICMS. To get this value, the field Calc. ICM Dif. (F4_COMPL) must be enabled in the TIO File.

All entries ended with 002.

Credit Transfer

MG/MS/PB/SE

This entry is obtained with the value of document goods as long as the TIO is configured for credit transfer(F4_TRFICM).

All entries ended with 008.

Fixed Assets

MG/MS/PB/SE

This entry is obtained with the value of the document's Complementary ICMS as long as the CFOP is concerning Asset Acquisition for Fixed Assets (291 or 2551). To get this value, the field Calc. ICM Dif. (F4_COMPL) must be enabled in the TIO File.

PA40000001

Fixed Asset

PA

This entry is obtained with the value of the document's Complementary ICMS as long as the CFOP is concerning Asset Acquisition for Fixed Assets (291 or 2551). To get this value, the field Calc. ICM Dif. (F4_COMPL) must be enabled in the TIO File.

SC40000002

Fixed Asset

SC

This entry is obtained with the value of the document's Complementary ICMS as long as the CFOP is concerning Asset Acquisition for Fixed Assets (291 or 2551). To get this value, the field Calc. ICM Dif. (F4_COMPL) must be enabled in the TIO File.

AL00000004

Fixed Asset

AL

This entry is obtained with the value of the document's Complementary ICMS as long as the CFOP is concerning Asset Acquisition for Fixed Assets (291 or 2551). To get this value, the field Calc. ICM Dif. (F4_COMPL) must be enabled in the TIO File.

All entries ended with 009.

Presumed Credit

MA/MS/SE

This entry is obtained with the value of Presumed Credit calculated in the document. To get this value, you must enter the Credit Percentage (F4_CRDPRES) in the TIO.

MG10001014/
MG71091014/
MG91001014/
MG91011014/
MG91021014

ST Transportation

MG

This entry is obtained with the value of ICMS ST calculated in the document. To get this entry, you must fill out the field Add Value (F4_AGREG) in the TIO.

MG10000503

ICMS ST previously retained

MG

This entry is obtained when the Prev. ICMS ST B. (D1_BASNDES) and Prev. ICMS ST (D1_ICMNDES) fields are greater than zero. These fields are manually entered in incoming invoices.

SC10000018

Presumed Credit of 3% on the local value for outflow subsequent to the inflow of imported goods.

SC

This entry is obtained for Outgoing Invoices with a Credit of 3% on the value of imported goods. For calculation, the field B1_IMPORT must be filled out with S-Yes.

SC10000019

Deemed credit in the outflow of fish, crustaceans, or mollusks.

SC

This entry is obtained with the value of Presumed Credit calculated in the document. To get this value, you must enter the Credit Percentage (F4_CRDPRES) in the TIO.

SC10000033

Presumed Credit in the outflow of textile articles, clothing, leather artifacts, and their accessories promoted by the industrial site.

SC

This entry is obtained with the value of Presumed Credit calculated in the document. To get this value, you must enter the Credit Percentage (F4_CRDPRES) in the TIO. Only for Outgoing Invoices.

SC10000034

Presumed credit in the inflow of goods acquired from suppliers under Simples Nacional.

SC

This entry is obtained for Incoming Invoices, with the calculation of applied ICMS in Credit for Suppliers that have the field Simples Nacional (A2_SIMPNAC) filled out with 1 (Yes).

SC11000002

Reimbursement of ICMS ST arising from the sale to taxpayers located in another unit of the federation.

SC

This entry is obtained with the value of ICMS ST calculated in the interstate outgoing document.

SC10000030

Credit proportional to the goods received with tax substitution, when a new retention is made.

SC

This release is obtained for Incoming Invoices, with the calculation of ICMS in which the tax situation is equal to 60 – ICMS previously charged for Tax Subst. in field F4_SITTRIB.

SC70000005

ICMS due on import

SC

This entry is obtained for import invoices

SC10000013

Presumed credit in the outflow of goods imported from other countries

SC

This release is obtained for outgoing invoices containing the presumed credit rate, Credit Percentage(F4_CRDPRES).

PA10000997/ES10000100

Presumed Credit

PA

This entry is obtained with the value of Presumed Credit calculated in the document. To get this value, you must enter the Credit Percentage (F4_CRDPRES) in the TIO.

PA00000999

Other Incoming Credits

PA

This entry is obtained for Incoming Invoices if the Supplier is Opting for Simples (A2_SIMPNAC) and has an ICMS value.

MG10000504/MG20000504/PA40000002/
PA70000017/
PB90990018/SC40000003/ ES70009702

Use/Consumption Material

MG/PA/PB/SC/ES

This entry is obtained with the value of the document's Complementary ICMS as long as the CFOP is concerning Material Acquisition for Use/Consumption (297 or 2556). To get this value, the field Calc. ICM Dif. (F4_COMPL) must be enabled in the TIO File.

MA50000000/MS50000000/MS40000000/MS40000999/MS50000999/PA50000999/SC50000999/SC51000999

Credit Reversal

MA/MS/PA/SC

This entry is obtained with the value of credit reversal calculated in the document. To get this value, you must enter the Reversal Percentage (F4_ESTCRED) in the TIO File.

AL99999323/AL99999324/AL99999325/AL99999326/AL99999327

Deferred ICMS

AL

This entry is obtained with the value of Deferred ICMS calculated in the document. To get this value, you must enter the Percentage of Deferred ICMS (F4_PICMDIF) in the TIO File.

GO50009001

ICMS Credit Reversal

GO

This entry is obtained with the value of the ICMS of the document issued by the taxpayer opting for Simples Nacional.

GO10009029

ICMS Credit

GO

This entry is obtained with the value of the ICMS of the document issued by the taxpayer opting for Simples Nacional.

GO10990027

ICMS credit received in transfer

GO

This entry is obtained with the total value of the document ICMS.

GO40999023

ICMS Credit Transfer

GO

This entry is obtained with the total value of the document ICMS.

GO71003005/GO71003006

ICMS ST for the previous operation related to electric power.

GO

This entry is obtained by means of Incoming Invoices that have Withheld ICMS.

RN10000002

Other Credits-FECOP-Direct Consumption Operation

RN

This entry is obtained with the value of the document's FECOP-RN.

RN11000001

Other Credits-FECOP-Internal ST Operation

RN

This entry is obtained with the value of the document's FECOP/ST-RN.

RN11000002

Other Credits-FECOP-Interstate ST Operation

RN

This entry is obtained with the value of the document's FECOP/ST-RN.

RN70000001

Calculation Extra Special Debit-FECOP-Direct Consumption Operation

RN

This entry is obtained with the value of the document's FECOP-RN.

RN71000001

Calculation Extra Special Debit -FECOP-Internal ST Operation

RN

This entry is obtained with the value of the document's FECOP-RN.

RN71000002

Calculation Extra Special Debit - FECOP-Interstate ST Operation

RN

This entry is obtained with the value of the document's FECOP/ST-RN.

RO99990009/
RO99990016/
RO99990017/
RO99990021/
RO99990022/
RO99990037/
RO99990068/
RO99990078/
RO99990083/
RO99990086/
RO99990116/
RO99990130/
 

Exemption – Outgoing Invoices

RO

This entry is obtained with the value of the exempt ICMS.

Therefore, configure the ICMS Tax Record field (F4_LFICM) as Exempt in the TIO.

RO10000006/
RO10000007/
RO10000003/
RO10000012

Presumed Credit – Outgoing Invoices

RO

This entry is obtained with the value of Presumed Credit calculated in the document. To get this value, you must enter the Credit Percentage (F4_CRPRERO) in the TIO.

RO40000001

Rate Differential – Permanent Asset

RO

This entry is obtained with the total value of the document's rate differential. Approved CFOPs: X551, X552, and X352

RO40000002

Rate Differential – Consumption and Use Material

RO

This entry is obtained with the total value of the document's rate differential. Approved CFOPs: X556, X557, and X352

ES70009701

Rate Differential – Permanent Asset

ES

This entry is obtained with the value of the document's Complementary ICMS as long as the CFOP is concerning Asset Acquisition for Fixed Assets (291 or 2551). To get this value, the field Calc. ICM Dif. (F4_COMPL) must be enabled in the TIO File.

RS40009193

Debits by Transfer of Credit Balance

RS

This entry is obtained with the value of the Debits by Transfer of Credit Balance. To obtain this value, you must use the following CFOPs –5601 or 5602

RS10009269

Presumed credits - Fluid milk

RS

This entry is obtained with the value of Presumed Credit calculated in the milk interstate sale document. To obtain this amount, you must enter the Credit Percentage (F4_CRDPRES) in the TIO and create the field manually in the products file, informing it in the MV_PRODLEI parameter as instructed in the technical bulletin RS Presumed Credit.

Another treatment for the same code is the manual entry of the invoice at the end of the period with the amount of the credit. Simply use an Incoming Invoice with ICMS Tax L;(F4_LFICM) as Zeroed and Add value (F4_AGREG) as No.

RS10009029

"Credits by transfer" - CARGO TRANSPORT SERVICE

RS

This entry is obtained by means of Incoming Invoices if the TIO is set to Debit or Credit Transf. (F4_TRFICM)

RS10009314

Presumed credits – Milk from Local Prod. Rur. Prod.

RS

This entry is obtained with the value of Presumed Credit calculated in the document of purchase of milk within the State. To obtain this value, you must enter the Credit Percentage (F4_CRDPRES) in the TIO and set the type of the presumed credit (F4_TPCPRES) to C, as directed by the FIS_BT_Credito_Presumido_ICMS bulletin.

Another treatment for the same code is the manual entry of the invoice at the end of the period with the amount of the credit. Simply use an Incoming Invoice with ICMS Tax L (F4_LFICM) as Zeroed and Add value (F4_AGREG) as No.

RS10000106

Other Credits - Tax Anticipation

RS

This entry is obtained with the value of the tax anticipation at the time of the entry of the goods into the State.

Another treatment for the same code is the manual entry of the invoice at the end of the period with the amount of the credit. Simply use an Incoming Invoice with ICMS Tax L (F4_LFICM) as Zeroed and Add value (F4_AGREG) as No.

RS10000206

Other Credits - Return Goods received for use and consumption

RS

This entry is obtained with the value of ICMS of the return of purchase of materials for use and consumption, considering the outgoing tax documents with CFOP 5556/6556/7556.

Another treatment for the same code is the manual entry of the invoice at the end of the period with the amount of the credit.

Simply use an Incoming Invoice with ICMS Tax L (F4_LFICM) as Zeroed and Add value (F4_AGREG) as No.

RS40000010

Liability Debits - Reimbursable

RS

This entry is obtained through the outgoing documents with deferred ICMS and using a TIO with entry code RS40000010.

Another treatment for the same code is the manual entry of the invoice at the end of the period with the amount of the credit. Simply use an Incoming Invoice with ICMS Tax L (F4_LFICM) as Zeroed and Add value (F4_AGREG) as No.

RS40000213

Other Debits – Reversal of credits

RS

Manual entry of Invoice at the end of the period with the debit value. Simply use an Outgoing Invoice with ICMS Tax L. (F4_LFICM) as zeroed and Add value (F4_AGREG) as No.

RS40001010

Liability Debits – Reimbursable (Transport)

RS

Manual entry of Invoice at the end of the period with the debit value. Simply use an Outgoing Invoice with ICMS Tax L. (F4_LFICM) as zeroed and Add value (F4_AGREG) as No.

RS40000113

Other Debits – Rate Differential

RS

This entry is obtained through the rate differential calculated at the entry of goods purchased from other States.

RS40000313

Other Debits – Anticipation

RS

This entry is obtained through the tax on the anticipation of the entries of goods purchased from another unit of the Federation. Just use an Incoming Invoice with ICMS Anticip. (F4_ANTICMS) set to Yes.

RS40009913

Other Debits

RS

Manual entry of Invoice at the end of the period with the debit value. Simply use an Outgoing Invoice with ICMS Tax L. (F4_LFICM) as zeroed and Add value (F4_AGREG) as No.

RS10009906

Other Credits

RS

This entry is obtained through an incoming document with deferred ICMS and using a TIO with entry code RS10009906.

Another treatment for the same code is the manual entry of the invoice at the end of the period with the amount of the credit.

Simply use an Incoming Invoice with ICMS Tax L (F4_LFICM) as Zeroed and Add value (F4_AGREG) as No.

ES40000400

Other Debits

ES

This entry is obtained through the tax document.

MG70001001

Special Debits

MG

This entry is obtained through the rate differential calculated at the entry of goods purchased from other States.

MG10990505

Simples Nacional, for the credit entries due to the acquisition of goods of taxpayers opting for the Simples Nacional

MG

This entry is obtained with the value of the ICMS of the Incoming Document, with the calculation of the ICMS applied in credit for suppliers who have the Simples Nacional field (A2_SIMPNAC=1) and with the field ICMS Tax L. (F4_ LFICM=T) in the TIO file.

MG91990000

Simples Nacional for the entries of Information Op.ST

MG

This entry is obtained with the value of the Withheld ICMS of the Incoming Document. To obtain this value, you must enable the field ICMS Tax L (F4_ LFICM=T) in the TIO File and Opt Simp Nac (A2_SIMPNAC=Yes) in the Supplier's Record.

ES70009703

Special Debits

ES

This entry is obtained through the tax document, obtained with the value of the ICMS Withheld from the Incoming Document. CTR/CTE/NFST kinds

ES70001706

Special Debits

ES

This entry is obtained by means of the outgoing tax document of autonomous freight to other states. The Autonomous Freight field (C5_FRETAUT) must be filled in.

ES71000712

Special Debits

ES

This entry is obtained through the tax on the anticipation of the entries of goods purchased from another unit of the Federation. Just use an Incoming Invoice with ICMS Anticip. (F4_ANTICMS) set to Yes.

MG71010501/
MG71110000

Special Debits

MG

This entry is obtained through the tax document, obtained with the value of the ICMS Withheld.

RS10009004

Credits by transfer- RECORD I, ITEM 59, I, "A" - SAME COMPANY SITE

RS

This entry is obtained through the outgoing tax document.

TIO Configuration: ICMS Cred.=No; Credit IPI=No, Calculate ICMS=No, Calculate IPI-No; Tax Code=5602; ICMS Tax L.=Others; IPI Tax L.=No

RS10009031

Credits by Transfer" -RECORD I, ITEM 58, II, NOTE01, B, AND ITEM 58, II, "A" of RICMS/RS

RS

This entry is obtained through the Incoming Tax Document.

RO99990165/
RO99990166/
RO99990170/
RO99990175/
RO99990183/
RO99990195
 

Calculation basis reduction – Outgoing invoices

RO

This entry is obtained with the value of the Credit Basis Reduction calculated in the document. To obtain this value, you must inform ICMS Red. % (F4_BASEICM), set the ICMS Tax Record field (F4_LFICM) to Other or Exempt, and set Consumption Material (F4_CONSUMPTION) to Others or Yes in the TIO.

RO20000002

Debit Reversal - Primary Products - ICMS collected in advance

RO

This entry is obtained through the outgoing tax document with the ICM. Tax Stat. (F4_SITTRIB) field set to 10 or 60.

RN00000010

The credit value of advance ICMS (1240), withheld and highlighted in the ICMS-ST field of the Incoming Invoice

RN

This entry is obtained through the Interstate Incoming Tax Document with the completion of the ICMS ST Crd. field (F4_CREDST) with a value other than 3.

RN70000005

Special debit value withheld and highlighted in the ICMS-ST field of the incoming invoice

RN

This entry is obtained through the Interstate Incoming Tax Document with field completion.

RN99990004

Advance ICMS (1240), collected to collect, with debit entered by TAFD, at inflows or outflows

RN

This entry is obtained by means of the Incoming or Outgoing Tax Document with the completion of the ICMS ST Crd. field (F4_CREDST) = 4 for Incoming Tax Documents.

RN70009002

Advance collected ICMS regarding the Fixed Asset Rate Differential.

RN

This entry is obtained through the Incoming Tax Document with the completion of the field   ICM Diff. Calc. (F4_COMPL) and the following CFOPs: 1551|1552|1352|2551|2552|2352

1552

1352

2551

2552

2352.*

RN70001004

Advance collected ICMS regarding the Transport Service Rate Differential

RN

This entry is obtained through the Incoming Tax Document with the completion of the ICM Diff. Calc. field (F4_COMPL) and the following kinds: "CTR/CTE/NFST".

RN70009005

ICMS to be collected regarding the Fixed Asset rate differential

RN

This entry is obtained through the Incoming Tax Document with the completion of the field  ICM Diff. Calc. (F4_COMPL) and the following CFOPs: 1551|1552|1352|2551|2552|2352





*

RN70009006

ICMS to collect referring to the rate differential for use and consumption material.

RN

This entry is obtained through the Incoming Tax Document with the completion of the field  ICM Diff. Calc. (F4_COMPL) and the following CFOPs: 1556|1557|1352|2556|2557|2352


1352

2556

2557

2352*

SC41000002

ICMS debit due to the entry of goods subject to the tax substitution system

SC

This entry is obtained through the tax on the anticipation of the entries of goods purchased from another unit of the Federation. Just use an Incoming Invoice with ICMS Anticip. (F4_ANTICMS) set to Yes.

RS41009705

Other debits of ICMS ST, such as debits of RICMS, Record III, item 53-A and 53-C

RS

This entry is obtained through the tax on the anticipation of the entries of goods purchased from another unit of the Federation. Just use an Incoming Invoice with ICMS Anticip. (F4_ANTICMS) set to Yes.

This entry can also be obtained through the rate differential calculated at the entry of goods purchased from other States. Just use an Incoming Invoice with ICM Diff. Calc. (F4_COMPL) set to Yes.

It can also be using a manual entry of the Invoice at the end of the period with the debit value. Simply use an Outgoing Invoice with ICMS Tax L. (F4_LFICM) as zeroed and Add value (F4_AGREG)as No.

RJ70000001

ICMS due on import

RJ

This entry is obtained through the Import Invoice. It will consider the value of ICMS due at the import.

RJ70000005

FECP referring to the import

RJ

This entry is obtained by means of the Import Invoice considering the value of the FECP on the ICMS due in the import.

RJ70000006

FECP referring to the rate differential

RJ

This entry is obtained by means of an invoice that has a rate differential value considering the FECP on the value of the rate differential.

MS60000011

Deductions from the FECOMP – local ICMS

MS

This entry is obtained by the amount to be collected for the FECOMP in an operation with the taxation of the local ICMS.

SP90090104 

The amount corresponding to the column Exempt/Non-Taxed and Others (Items 214 and 215 of RICMS/2000)

SP

Code used to demonstrate, in the C197, operations in which, in the ICMS Rate field, the value must be 0.01 when Basis and Value are Zero.


 In the Setup Procedures session, all the features available in the system will be addressed for the configuration of the new Entries that should be used in the calculation of ICMS and Tax SPED, such as the tables, records, and routines that involve this mechanism.

05. SETUP PROCEDURES

Adjustment Codes

These entries are used to identify specific situations in which a tax document is associated with an adjustment of ICMS or ICMS - ST calculation, such as presumed credits, rate differential, or other situations provided by the legislation of the State where the transaction occurred.

Entry using Tax Document

The tables of Calc. Reflex (CC9), Calc. Type (CCA), Liability (CCB), Influence (CCC), and Source (CCD) have fixed codes and are updated automatically during system deployment or by the IMPSPED routine.


The ICMS Calculation Entries table (CC6) is the composition of the tables mentioned above, making the complete code of the entry.

This is also updated by the IMPSPED routine.


The entry codes linked to the tax documents are formed by the codes registered or imported in the tables above, that is, each code used in these tables, together, composes an entry code.

This code, when bound to the tax document, will generate the C197/D197 record in the EFD, and this must be accompanied by a complement of note on the entry, generated by record C195 (which can be registered in the Additional Information table (CCE) and bound to the document by the TIO (SF4) or through the Supplementary Information by Invoice (table CDT – MATA926) that will also generate the C110 record).


Calculation reflex: Indicate the reflex of this entry in ICMS Calculation, that is, enter in which sub-item of ICMS Calculation this entry must be.


Calculation Type: Indicate the type of calculation this entry must represent.


Liability: Indicate the type of taxpayer's liability.


Influence: Indicate the influence of this entry in ICMS Calculation.


Source of taxation: indicate the origin of the taxation of this tax entry. Note that this item is just informational, and it does not influence the ICMS Calculation.


Adjustment Codes: They are variable codes for each state. Thus, each SEFAZ must provide and perform maintenance in these tables.

Manual Entries of IPI Calculation

They can be imported through the IMPSPED routine and are registered in the IPI Adjustments File (CCK) table.

These codes can be manually entered in the IPI Calculation Routine (MATA952) or can be bound to the Tax Document.

Binding of TIO X Calculation Entries

To make the binding between entry codes (tax documents or calculation manuals) and the issuance of tax documents, table CC7 (Binding of TIO X Calculation Entries) may be used.

This entity is located in the routine of Input and Output Types (MATA080), and can be found in the TIO file interface in a Grid format:   

For each TIO, it is possible to perform the binding of one, several or no calculation entries using the ICMS calculation entry grid. The composition varies according to the operation for which it is intended, with its fields filled as follows:

 
Entry Seq (CC7_SEQ) Sequential entry code related to TIO Code.

Entry Cod. (CC7_CODLAN): Tax Document Entry Code (see table CC6).

Summ. Desc.(CC7_DESCR): Description of Entry Code.

Tax Entry Note (CC7_IFCOMP): Code of Entry Code Note (used to generate the C195 record of the Tax SPED).

Calc. Code (CC7_CLANAP): Code of Manual Calculation Entry (see table CDO).

Dt. of Inclusion (CC7_DTINCL): Date of inclusion of the binding

Reflex Code (CC7_CODREF): Code of Tax Entry Reflex (see table CE0).

Entry Desc. (CC7_CLANC): Description of the note linked to the tax entry for record 0460, field 03 TXT of the Tax SPED EFD.

Form/Bill (CC7_GUIA): Indicates whether to generate Form and Bill with the values calculated using this entry code.

IPI Code (CC7_CODIPI): Adjustment code for IPI calculation.


Important!

In order for the Form/Bill field to be enabled for editing, it is necessary to fill in the fields CC6_TPIMP (indicates the type of GNRE tax generated in the document inclusion) and CC6_NATURE (Indicate the financial nature that will be used in the generation of a bill related to the values of this entry code) of the ICMS Calculation Entry File (MATA985).

When set to "1 - Yes", it indicates that, soon after the incoming document is added, the GNRE and a bill in the Financial module corresponding to the entry code will be automatically generated.


Booking ICMS Calculation Entries

When issuing a Tax Document, when a binding exists between the Item and Adjustment Codes through the TIO, the codes will be booked in the Tax Document Entries (CDA) table and can be viewed in the ICMS Calculation Entries tab:


1) CDA_NUMITE: Item of the Tax Document related to the entry code.

2) CDA_SEQ: Sequence of the code in relation to the item.

3) CDA_CODLAN: Calculation Entry Code.

4) CDA_CALPRO: Indicates whether the entry was automatically generated by the system or manually included by the user.

5) CDA_BASE: Entry Code Calculation Base.

6) CDA_ALIQ: Entry Code Rate.

7) CDA_VALUE: Entry Code Value.

8) CDA_IFCOMP: Supplementary Information (Note) associated with the Entry Code.

9) CDA_TPLANC: Entry Type – Tax Document (CC6) or Manual Document (CDO).

10) CDA_VL197: Sets whether the value of records C197 or D197 will be recorded in the 07-VL_ICMS or 08-VL_OTHERS field.

11) CDA_CLANC: Sets content from the 3 TXT field of the 0460 record to the entry code.

12) CDA_CODREF: Reflex code used in the TIO

13) CDA_ORIGEM: Table CC7 field used in the TIO, which may be: 1-CC7_CODLAN, 2-CC7_CLANAP, or 3-CC7_CODIPI

14) CDA_TPNOTA: Since the same field is used to store the Customer or Supplier Code (CDA_CLIFOR), this field was created for the purpose of differentiating transactions of different natures related to the same customer/supplier, as in the case of returns.

 
Entries calculated by the system are generated with the System Calc. field set to Yes, and you cannot change its value. If you need to change a value, you must add a row (this comes with the System Calc. field set to No) and insert new values.

During the calculation of the ICMS or Tax Bookkeeping, the system checks the entries of each document and, if entries made by the user exist, that is, if the System Calc. field is set to No, all system entries are skipped.

06. MANAGEMENT OF TAX ENTRIES OF ICMS CALCULATION

The Tax Adjustments routine (MATA900), accessed through the options Miscellaneous/Adjustments, provides the Tax Entry Manag. option, which enables you to handle tax entries generated in the tax document, always keeping the ones generated by the system during document issues. Therefore, if any user entry exists, it is considered. Otherwise, system entries are kept and sent during ICMS Calculation.


Important

When this functionality is processed, a screen is displayed warning you about the possible differences in Tax Records due to the use of Tax Adjustments routines (MATA900). Read it carefully and select the option you want.

The management screen is displayed with a header and two GetDados. The first one displays entries generated by the system, and the second one, entries created by the user, in which entry handling is allowed.


07. REFLEXES OF ICMS CALCULATION ENTRIES

Each entry published by SEFAZ has a reflex in the calculation of ICMS and Tax SPED. This reflex is composed of the calculation base, rate, and value associated with the entry.


For the configuration of this reflex, the entity of Reflex Codes – ICMS Calculation (CE0) should be used. The manipulation of this table can be done through the Tax Records Menu (SIGAFIS) in Updates/SPED/Reflex Codes (FISA072).


Each record in table CE0 can be associated with an adjustment code using the CC7_CODREF field in the Input and Output Types routine (MATA080). The reflex should be configured as below:


CE0_CODIGO: Reflex code used as reflex ID.

CE0_PROPRI: Reflex property (System or User).

CE0_DESCRI: Description of the reflex.

CE0_NFBASE: Enter which calculation basis will be used in the entry of this reflex:

1) Base of local ICMS

2) Accounting Value

3) Value of local ICMS

4) ICMS Basis by tax replacement

5) Autonomous Freight ICMS Base.

6) Incentive Credit

7) ICMS Difal Calculation Basis

8) Original ICMS base.

9) IPI Basis.

A) ST Freight.

B) ST Freight ICMS.

C) ICMS reduction.

D) FEEF RJ Calculation Basis.

G) Effective ICMS Base.

H) IPI Value.

I) ICMS Base previously collected

Z) Zeroed basis.


CE0_NFALIQ: Please enter which rate will be used in the entry of this reflex:

1) Rate of local ICMS.

2) Rate of Presumed Credit.

3) Rate of ICMS by Tax Replacement.

4) Credit Reversal Rate.

5) Supplementary ICMS rate.

6) Rate manually entered in this reflex record.

7) FECP local operation rate (the complementary FECP rate will be used when present).

8) Rate of FECP Operation by Tax Replacement.

9) Complementary ICMS / Simples Nacional Rate.

A) IPI Rate.

B) ST Freight.

C) FEEF-RJ Rate.

E) Effective ICMS rate.

F) Rate of the local ICMS subtracting the rate of the FECP.

G) ICMS rate previously collected

H) ICMS anticipation rate in internal operations

I) rate set in the destination state for calculation of the supplementary ICMS

Z) Zero rate.


CE0_NFALVA: User-informed rate (used when the CE0_NFALIQ field is set to 6).

CE0_NFVALO: Enter what value will be used in the entry of this reflex:

1) Value of local ICMS.

2) Value of Complementary ICMS.

3) Goods Value.

4) Value of ICMS by anticipation.

5) Value of Presumed Credit.

6) Value of ICMS by tax replacement.

7) Credit reversal value.

8) Deferred ICMS Value

9) Value calculated from the calculation base and rate manually entered in this reflex record.

A) Value of the local operation FECP.

B) Value of the FECP Operation by Tax Substitution.

C) ICMS of Autonomous Freight.

D) Target DIFAL.

E) Source DIFAL.

F) ECP DIFAL of Destination.

G) ICMS ST adjustment.

H)Anticipation of subsequent operations

I) ICMS ST Reimbursement.

J) ICMS - Presumed CreditK) IPI Value.

L) ST Freight.

M) Reduced ICMS.

N) Generic tribute.

O) Exempt/Non-Taxed.

P) Accounting Value.

Q) Other column value.

R) Prodepe Presumed Credit.

S) Value of FEEF-RJ

T) ICMS previously collected.

U) Effective ICMS Value.

V) Local ICMS value plus the value of ICMS Solidario (Joint ICMS).

W) Local ICMS value plus the previously collected ICMS value.

X) Credit presumed from ICMS. Formula used:  ICMS Value - (goods value * Presumed Credit percentage (F4_CRDPRES)

Y) Value of local ICMS subtracting the value of the FECP.

Z) ICMS unencumbered composite base. Formula used:  ICMS base/ (1 - ICMS rate + FECP) * ICMS rate + FECP

AA) Unencumbered ICMS ST composite base

AB) Unencumbered ICMS ALC

AC) Unencumbered ICMS ALC with Pis and Cofins discount

Important

It is possible that the value of the items contained in the Invoice is small enough to generate an ICMS Calculation Entry (CDA) with zero value. For this, it is necessary that the Reflex Code listed in the TIO is registered with the Value field set to 8 - Diff. and the ICMS is calculated so that it generates a Calculation Basis value.


CE0_VL197: Sets whether the value of records C197 or D197 will be recorded in the 07-VL_ICMS or 08-VL_OTHERS field.

1) ICMS Value

2) Other value


The use of the CC7_CODREF field provides the user with a 1:N relationship between calculation entry codes and reflex codes. That is, an entry code for the calculation may have more than one reflex within one or more operations.

There is still the possibility to configure the Manual Calculation Entry Codes (CDO) in a 1:1 ratio, that is, one entry code for only one reflex code. This binding must be done using the CDO_CODREF field. However, when using the CC7_CODREF field for the same entry code, this field will be a priority.


Using the CE0_VL197 field allows the user to configure saving the value of the C197 or D197 record in the 07-VL_ICMS field or in the 08-VL_OUTROS field according to the legislation of their State.

08. REFLEXES ON THE GENERATION OF THE TAX SPED MAGNETIC FILE

When carrying out the adjustments in the ICMS Calculation Entry Table (CDA), these will be demonstrated in the calculation of ICMS in the rows corresponding to the reflexes bound to each entry and also in the Tax SPED, in the records corresponding to the type of entry. The generated records are:


Record C197: Other Tax Obligations, Adjustments, and Information from Values deriving from Tax Document

This record is generated when generated content exists in Table CDA. This table is generated under the following conditions:

  • CDA_VALOR is greater than Zero 
  • RATE CDA is greater than Zero and CDA_BASE is equal to Zero
  • CE0_NFVALOR is Type I - ICMS ST Reimbursement, and CDA_VALUE is greater than Zero.


Record D197: Other Tax Obligations, Adjustments, and Information from Values deriving from Tax Document


Record E111: ICMS Calculation Incentive/Benefit/Adjustment


Record E220: Adjustment/Benefit/Incentive of Tax Replacement ICMS Calculation


Record E530: IPI Calculation Adjustments


Record E531: Additional information on the adjustments of the IPI calculation - identification of tax documents (01 and 55)In the IPI calculation, the adjustment codes will be considered in the following sub-items:


004 - Debit Reversal 001|Debit Reversal;

005 - Other Credit

002|Credit received by transfer;

010|Presumed Credit of IPI - Reimbursement of PIS/Pasep and Cofins - Statute No. 9,363/1996;

011|Presumed Credit of IPI - Reimbursement of PIS/Pasep and Cofins - Statute No. 10,276/2001;

012|Presumed Credit of IPI - Encouraged Regions - Statute No. 9,826/1999;

013|Presumed Credit of IPI-freight-MP2,158/2001;

019|Presumed Credit of IPI - Others;

098|Credits arising from judicial measure;

099|Other credits;


010 - Credit Reversal

101|Credit Reversal;

102|Credit Transfer;


011 - Credit Refund

103|Credit Refund/Compensation;


012 - Other debits

199|other debits;


Record Group 1200: Tax Credit Control – ICMS

Note: Check the procedure in the Tax Credit Control technical bulletin


Record Group 1900: Indicate ICMS Sub-Calculation

Note: Check procedures in Tax SPED Technical Bulletin

Adjustment Codes with special treatment

  Entry/Adjustment Code

  Description

Additional rules

SP90090106

Fill in the VL_OUTROS field with the percentage of VAT-ST. CAT Ordinance - 54 from June 16, 2020.

For the entry code SP90090106 linked to a TIO, the percentage in the Margin field (FT_MARGIN) of the tax record will be displayed in the VL_OUTROS field of the record C197.

SP40090227

Fill in the VL_OUTROS field with the tax charged in the previous operation. CAT Ordinance 54 dated June 16, 2020.

For the posting code SP40090227 linked to a TIO, the value in the ICMS Value (FT_VALICM) field of the tax record will be displayed in the VL_OUTROS field of the record C197.

SP90090102 

Fill in the DESCR_COMPL_AJ field with the e-Invoice access key that includes the item, issued by the order author. Decree CAT 157 dated December 28, 2015

For the SP90090102 entry code linked to a TIO, the e-Invoice key corresponding to the source e-Invoice will be shown in the DESCR_COMPL_AJ field of record C97.

SP90090103 

Fill in the DESCR_COMPL_AJ field with the e-Invoice access key that includes the item, issued by the order author. Decree CAT 157 dated December 28, 2015

For the SP90090103 entry code linked to a TIO, the e-Invoice key corresponding to the source e-Invoice will be shown in the DESCR_COMPL_AJ field of record C97.


09. ADDITIONAL INFORMATION


Tables

CCK – Manual Adjustments of IPI Calculation

CDO – Manual Adjustments of ICMS Calculation

CC6 – ICMS Calculation Entries

CC8 – ICMS Calculation Adjustments

CC9 – ICMS Calculation Reflex

CCA – ICMS Calculation Type

CCB – ICMS Liability

CCC – ICMS Influence

CCD – ICMS Source

CE0 – Reflex Codes – ICMS Calculation

CDA – ICMS Calculation Entries (Bookkeeping)

CDH – ICMS Calculation

CDP – IPI Calculation

SF4 – Type of Inflow and Outflow

CC7 – ICMS Calculation Entries x TIO Binding

Routines

MATXFIS – Tax Calculations Engine

MATA080 – Input and Output Types

FISA072 – Reflex Codes – ICMS Calculation

MATA953 – ICMS Calculation

SPEDFISCAL – Tax EFD

Operating Systems

Windows®/Linux®