Páginas filhas
  • APUISS – ISS Calculation

01. OVERVIEW

The routine of Calculation of ISSQN Any Nature (MATA954) by the city performs the control procedure for Incoming Invoices and their respective Projects/WBS/tasks for later use of the values in the Materials and Sub-Contract Deduction.

In the issuance of the outgoing invoice, the bonding is performed with the respective Incoming Invoices using the available deductions and later calculating the ISSQN by City.

The consolidation of branches performs the calculation of several branches in the system without having to be within a logical range of data (from/to), protecting the customer from generating undue information because it blocks the selection of branches in the system that do not meet the criteria.

02. EXAMPLE OF USE

  1. Branch selection will only be available for branches within the same group of current companies.
  2. The MV_CONSCGC parameter is considered in the processing of this routine. Thus, for companies that are processing different Root CNPJ (first eight digits), it is necessary to check if the parameter is created and if the logical content is different from true (.T.).
  3. The selection of branches with aggregation control by CNPJ + IM will only have functionality for DBAccess environments. In this environment, the questions "Consider Branch?", "From Branch?", and "To Branch?" have no functionality.
  4. When using the branch selection option, the branch selection window will be sorted by CNPJ + I.E. + I.M. + Branch Code.
  5. So that the system does not aggregate information, it is suggested to use the question "Select branches?" set to "No", thus considering only the current branch.

In order to use information aggregation, the customer should consult their legal department to verify that their branch of activity allows such aggregation.

2.1. Settings

In the Configurator (SIGACFG), check if the company uses Referential Integrity by selecting the option Integrity/Checking (APCFG60A).

  1. If no active Referential Integrity exists, all the companies and branches registered for the system are listed in a new window, and none of them is selected. In this case, AND ONLY IN THIS CASE, you do not need any other activation/deactivation integrity procedure; just finalize the checking the apply the compatibility tool according to the instructions.
  2. If Referential Integrity is activated in all companies and branches, a message is displayed on the window Relationship checking between tables. Confirm the message to complete the checking, or;
  3. If active Referential Integrity exists in one or more companies, but not in all of them, companies and branches registered for the system will be listed in a new window, and only those with integrity will be selected. Write down which companies or branches have the integrity activated and save this note for later reference on reactivation (you may also contact our Framework Help Desk for a file with this information).
  4. In the cases described in items 3 or 4, AND ONLY IN THESE CASES, you must deactivate such integrity by selecting the option Integrity/ Deactivate (APCFG60D).
  5. Upon deactivation of the Referential Integrity, run the compatibility tool in accordance with the instructions.
  6. After applying the compatibility tool, the Referential Integrity must be reactivated, IF AND ONLY IF it has been deactivated, using option Integrity/Activate (APCFG60). To do so, have the information of companies and/or branches that had integrity activation at hand, select them once again, and confirm the activation.

2.2. Creation of Fields in file SX3 – Fields:

Table CE1 - ISS Rates

Field

CE1_FILIAL

Type

Character

Size

2

Decimal

Empty

Format

@!

Title

Branch

Description

System Branch

Help 

System Branch

Field

CE1_CODISS

Type

Character

Size

9

Decimal

Empty

Format

@!

Title

Service Code

Description

Service Code

Help

Service Code

Field 

CE1_ESTISS

Type

Character

Size

2

Decimal

Empty

Format

@!

Title

City State

Description

City State

Help

State of the City

Field

CE1_CMUISS

Type

Character

Size

5

Decimal

Empty

Format

@9

Title

City Cd.

Description

City Code

Help

City Code

Field

CE1_ALQISS

Type

Numeric

Size

7

Decimal

3

Format

@E 999,999

Title

ISS Rate

Description

ISS tax rate

Help

ISS tax rate

Field

CE1_RETISS

Type

Character

Size

1

Decimal

Empty

Format

@!

Options

1=YES, 2=NO

Title

City Withhold?

Description

City Withhold?

Help

City Withhold

Field

CE1_RMUISS

Type

Character

Size

1

Decimal

Empty

Format

@!

Options

1=Inside, 2=Outside, and 3=Both

Title

Withholding

Description

Withholding

Help

Withholding Types

Field

CE1_CTOISS

Type

Character

Size

9

Decimal

Empty

Format

@!

Title

Contr. Serv. Cd

Description

Contractor's Service Code

Help

Contractor's Service Code

Field

CE1_CPRISS

Type

Character

Size

9

Decimal

Empty

Format

@!

Title

Prov. Serv. Cd

Description

Provider's Service Code

Help

Provider's Service Code

Field

CE1_FORISS

Type

Character

Size

6

Decimal

Empty

Format

@!

Title

Supp. ISS

Description

Supplier of ISS

Help

Supplier of ISS

Field

CE1_LOJISS

Type

Character

Size

2

Decimal

Empty

Format

@!

Title

Store

Description

Store

Help

Store

Field

CE1_PROISS

Type

Character

Size

15

Decimal

Empty

Format

@!

Title

Product Code

Description

Product Code

Help

Product Code

Field

CE1_DESPRO

Type

Character

Size

50

Decimal

Empty

Format

@!

Title

Product Desc.

Description

Product Description

Help

Product Description

Table CE2 – Inflows X Outflows

Field

CE2_FILIAL

Type

Character

Size

2

Decimal

Empty

Format

@!

Title

Branch

Description

System Branch

Help

System Branch

Field

CE2_NUMPV

Type

Character

Size

6

Decimal

Empty

Format

@!

Title

Number Order

Description

Order Number

Help

Sales Order Number

Field

CE2_PRODPV

Type

Character

Size

15

Decimal

Empty

Format

@!

Title

Product Order

Description

Product of the Order.

Help

Sales Order Product

Field 

CE2_ITEMPV

Type

Character

Size

3

Decimal

Empty

Format

@!

Title

Order Item

Description

Order Item

Help

Sales Order Item

Field

CE2_PROJPV

Type

Character

Size

10

Decimal

Empty

Format

@!

Title

Order Proj.

Description

Order's Project

Help

Project of the Sales Order

Field

CE2_EDTPV

Type

Character

Size

12

Decimal

Empty

Format

@!

Title

EDT Order

Description

Order EDT

Help

EDT of the Sales Order

Field

CE2_TASKPV

Type

Character

Size

12

Decimal

Empty

Format

@!

Title

Ord. Task

Description

Order Task

Help

Task of the Sales Order

Field

CE2_DOCNF

Type

Character

Size

9

Decimal

Empty

Format

@!

Title

Invoice Doc.

Description

Invoice Doc.

Help

Invoice Document

Field

CE2_SERINF

Type

Character

Size

3

Decimal

Empty

Format

@!

Title

Invoice Series

Description

Invoice Series

Help

Invoice Series

Field

CE2_FORNNF

Type

Character

Size

6

Decimal

Empty

Format

@!

Title

Invoice Supp.

Description

Invoice Supplier

Help

Invoice Supplier

Field

CE2_LOJANF

Type

Character

Size

2

Decimal

Empty

Format

@!

Title

Invoice Store

Description

Invoice Store

Help

Invoice Store

Field

CE2_CODNF

Type

Character

Size

15

Decimal

Empty

Format

@!

Title

Inv. Prod. Cd.

Description

Inv. Product Code

Help

Code of the Invoice Product

Field

CE2_ABTSER

Type

Numeric

Size

14

Decimal

2

Format

@E 99. 999. 999. 999,99                        

Title

Service Ded.

Description

Service Deduction

Help

Value of Service Deduction

Field

CE2_ABTMAT

Type

Numeric

Size

14

Decimal

2

Format

@E 99. 999. 999. 999,99                        

Title

Material Ded.

Description

Material Deduction

Help

Value of Material Deduction

Field

CE2_MUNPRE

Type

Character

Size

5

Decimal

Empty

Format

@!

Title

Prov. City

Description

City of Provision

Help

Code of City of Provision

Field

CE2_ESTPRE

Type

Character

Size

2

Decimal

Empty

Format

@!

Title

Prov. St.

Description

Provision State

Help

State of the Provision

Field

CE2_DTDIGT

Type

Date

Size

8

Decimal

Empty

Format

Empty

Title

Input Dt. 

Description

Typing Date

Help

Date of Invoice Typing

Field

CE2_NUMSEQ

Type

Character

Size

6

Decimal

Empty

Format

@!

Title

Sequential

Description

Sequential

Help

Sequential Number

Table CC2 - Cities

Field

CC2_MDEDMA

Type

Character

Size

1

Decimal

Empty

Format

@!

Options

1=YES, 2=NO

Title

C. Ded. Mat.

Description

City deduces materials

Help

City deduces materials

Field

CC2_MDEDSR

Type

Character

Size

1

Decimal

Empty

Format

@!

Options

1=YES, 2=NO

Title

C. Ded. Serv

Description

City deduces Services

Help

City deduces Services

Field

CC2_PERMAT

Type

Numeric

Size

7

Decimal

3

Format

@E 999,999                                  

Title

Ded.% Mat.

Description

Material deduction %

Help

Percentage of material deduction

Field

CC2_PERSER

Type

Numeric

Size

7

Decimal

3

Format

@E 999,999                                  

Title

Serv. Ded.%

Description

Service Deduction %

Help

Service Deduction Percentage

Field

CC2_DTRECO

Type

Numeric

Size

2

Decimal

0

Format

@!

Title

ISS Coll. Day

Description

ISS Coll. Day

Help

Day of ISS Collection

Field

CC2_BASISS

Type

Character

Size

1

Decimal

0

Format

@!

Title

ISS Ded Base

Description

Deduction of ISS Base

Help

Deduction of federal taxes fromthe ISS calculation base.

Important

IMPORTANT

The field CC2_BASIS meets Complementary Statute no. 185 of July 25, 2007, of the city of Barueri. If the field is set to "Yes", the Inc. Tax value is deducted, and, if the value of the goods is greater than that defined in the MV_VL10925 parameter, the PIS, COFINS, and CSLL values will be deducted from the ISS calculation base. 


Table SB1 - Generic Product Description

Field

B1_MEPLES

Type

Character

Size

1

Decimal

Empty

Format

@!

Options

1-EP and 2-LES.

Title

Service Exec.

Description

Execution of the Service

Help

Place of execution of the Service:
1=EP - Provider's site
2=LES - Place of execution of the Service

Table SC5 - Sales Orders

Field

C5_ESTPRES

Type

Character

Size

2

Decimal

Empty

Format

@!

Title

Prov. St.

Description

Provision State

Help

State of the Provision

Table SD1 – Incoming Invoice Items

Field

D1_OKISS

Type

Character

Size

2

Decimal

Empty

Format

@!

Title

Brand

Description

Brand

Help

ISS import mark

Table SD3 – Internal Transactions

Field

D3_OKISS

Type

Character

Size

2

Decimal

Empty

Format

@!

Title

Brand

Description

Brand

Help

ISS import mark

Important

The size of fields that have groups may vary according to the environment in use.

2.3. Creation of Indexes in file SIX

Table CE1 - ISS Rates

Index

CE1

Order

1

Key

CE1_FILIAL+CE1_CODISS+CE1_ESTISS+CE1_CMUISS+CE1_PROISS

Description

Code Service+City State+City Code

Owner

S

Table CE2 – Inflows X Outflows

Index

CE2

Order

1

Key

CE2_FILIAL+CE2_NUMPV+CE2_DOCNF+CE2_SERINF+CE2_ITEMNF+CE2_CODNF+
CE2_FORNNF+CE2_LOJANF+CE2_NUMSEQ

Description

Order Number+Invoice Doc.+Invoice Series+Invoice Item+Prod Code Supp. Invoice+Invoice Store

Owner

S

2.4 Creation of Parameters in the SX6 file

Variable Name 

MV_INTPMS

Type

Character

Description

Identifies whether The Project Management Module is integrated into the other modules. 

Default Value

N

Important

When the MV_INTPMS parameter is set to S, it is not possible to deduct the ISS by the Ded. ISS icon on the sale order

Variable Name 

MV_ISSXMUN

Type

Logical

Description

ISS Treatment by City:
.T. = Enabled and .F.= Disabled.

Default Value

.F.

Variable Name 

MV_TABABAT

Type

Character

Description

Table of searches of Deduction information, SD1 - Incoming Invoice and SD3 - Internal Transactions.

Default Value

SD3

2.5 Creating triggers in the SX7 file 

Table CE1 – ISS Rates

Field 

CE1_CMUISS

Sequence

001

Rule

CC2->CC2_MUN

Domain Field

CE1_MUNISS

Type

P

Position?

YES

Table

CC2

Owner

S

Field

CE1_PROISS

Sequence

001

Rule

CE1_DESPRO

Domain Field

SB1->B1_DESC

Type

P

Position?

YES

Table

SB1

Owner

S

2.6. Setup Procedures

In the Configurator (SIGACFG), access Environments/Files/Parameters (CFGX017). Configure the following parameter(s):

Variable Name 

MV_ISSXMUN

Type

Logical

Content

.T.

Description

ISS Treatment by City:
.T. = Enabled and .F. = Disabled.  

Variable Name 

MV_TABABAT

Type

Character

Content

SD3

Description

Table of searches for deduction information, SD1 – Incoming Invoice Items and SD3 – Internal Transactions.

Variable Name 

MV_DESCISS

Type

Logical

Content

.F.

Description

Informs the system if ISS must be discounted from the value of the financial bill if the customer is responsible for collecting it.

Variable Name

MV_TPABISS

Type

Character

Content

2

Description

If the parameter is set to 1, this indicates whether a discount will be made on the trade note when the customer collects ISS; if it is set to 2, a deduction bill will be generated.

Variable Name

MV_ISSAJU

Type

Character

Content

Blank

Description

Enter the City Codes that will be used in the Adjustments chart resulting from the ISQN retained at the source.      

Example

5300108

Variable Name 

MV_DEDISS

Type

Character

Content

1

Description

Define when the ISS deduction is processed (at posting or at the issue of the bill).  1 = At posting; 2 = At issue.

Variable Name 

MV_1DUPREF

Type

Character

Content

Blank

Description

Field or data to be saved in the title prefix. When it is generated automatically by the Billing module.

Example

SM0->M0_CODFIL+SF2->F2_SERIE

Variable Name

MV_ISS

Type

Character

Content

"ISS"              

Description

Class used for Service Tax

Important

The MV_TABABAT parameter defines which table of Incoming Invoice Items (SD1) or Internal Transactions (SD3) will be used to start searching Incoming Invoices.

Variable Name

MV_MUNIC

Type

Character

Content

"MUNIC"              

Description

Default supplier for generating ISS bills from the same city.

Important

Usually, the supplier registered in this parameter is the prefecture.

Variable Name 

MV_FPADISS

Type

Character

Content

<set by the user>              

Description

Default supplier to be considered in the folder "By City - Outputs" if the city to which the ISS is due cannot be identified using table CE1

This parameter has two filling options:

  • Enter Supplier Code only Example: CITY HALL If the parameter is filled in this way, the field A2_LOJA in the supplier's file must be filled with "00" (two digits), regardless of the size of the STORE field used. That is, even if the size of the store field is different from 2, this supplier's store should be "00". 
  • Enter the Supplier Code and Store Example: CITY HALL;01 If the parameter is filled in this way, the code and store must be separated by";" (semicolon) as shown above. That way, it is possible to use any store regardless of the size of the field, as long as it is correctly informed. Note: No other settings are required to enable the use of the separator. The simple use of the ";" character in the parameter will already indicate that the default store should not be used.


Note

In both cases, the supplier entered in this parameter must be previously registered in table SA2 and have its State (A2_EST) and City (A2_COD_MUN) fields filled correctly. 


Incoming Invoice Items (SD1)
The system considers that all incoming invoices moved on the dates From and To the Service Measurement were employed and make up the value of the billing.
Internal Transactions (SD3)
It is necessary to implement Stock Control, and all Products and Services purchased should generate transactions in stock and batch tracking.


Important
The implementation of Batches must be carried out through Automatic Batches, not the responsibility of the User to fill them.

2.7 Project Management Integration (SIGAPMS)

With the integration of Project Management (SIGAPMS) enabled, it is necessary to perform the Binding Incoming Invoice x Project x Quantity, which can be performed in two moments in Protheus®:

  1. Incoming Invoice: Identifying the Project/Task that the Input/Service was appropriated. This procedure can be performed with the parameter MV_TABABAT= SD1 or SD3.
  2. Requisition to Stock: If at the time of generation of the Incoming Invoice, the items were not appropriated, a Requisition (Internal Transactions) can be performed, and, at this time, the Product, Quantity, Batch, Project, and Task must be bound. This procedure can be performed with the parameter MV_TABABAT= SD3.

Important
The information that is imported from Project Management (SIGAPMS) to Billing (SIGAFAT) is that contained in the fields: Project Code (C6_PROJPMS),  EDT Code (C6_EDTPMS), and Task Code (C6_TASKPMS).

2.8 Integration with TOTVS Construction Works and Projects (TOP)

If the integration with TOTVS Construction Works and Projects (TOP) is enabled, Sales Orders will be automatically generated in the Billing Module (SIGAFAT) of Protheus®, Purchase Request, and Stock Requisitions.

For more details, see PROTHEUS x RM SOLUM Integration in TDN - TOTVS Developer Network from version 11.50.

In the Configurator (SIGACFG), access Environments/File/Menu (CFGX013). Enter the new Tax Records (SIGAFIS) menu option according to the following instructions:

Menu 

Updates

Submenu

Files

Routine Name

ISS Rates

Program

FISA052

Module

09

Type

01

Tables

CE1

Menu

Updates

Submenu

Files

Routine Name

Inflow x Outflow

Program

FISA053

Module

09

Type

01

Tables

CE2

2.9 - Cities File

  1. In the Tax Records Module (SIGAFIS), access Updates/Files/Cities (FISA010). All cities are automatically loaded according to the IBGE table.
  2. Four new fields were inserted for ISSQN tracking. In this file, the characteristics of the City collection are entered (if it accepts deductions and if the Service Contractor must make a fixed deduction). See below:
  3. Mat. Ded. (CC2_MDEDMA) – If the City accepts deduction of material employed;
  4. Ser. Ded. (CC2_MDEDSR) – If the City accepts deduction of sub-contract employed;
  5. Material D.%(CC2_PERMAT)– For the case of fixed deduction, enter the deduction percentage established for the material;
  6. %D. Services (CC2_PERSER)– For the case of fixed deduction, enter the deduction percentage established for Services;
  7. ISS Coll Day (CC2_DTRECO)– Enter the ISSQN collection day to be used in the Financial-Generated Bill. 

2.10 Registration of ISS tax rates

       In Tax Records (SIGAFIS), go to Updates/Files/ISS Rates (FISA052) and select the Add option.

  1. This register indicates the specifics of each City regarding ISSQN. The ISS rates table (CE1)was divided into header and items to facilitate the typing of all Products related to the City;
  2. For the Header registration, enter the fields (1 to 1):
  3. City State (CE1_ESTISS) – The State where the City is located;
  4. City Code (CE1_CMUNISS) – The IBGE City Code;
  5. City (CE1_MUNISS) – City Description;
  6. City Withhold? City Withhold? – Whether the City withholds ISSQN;
  7. Withholding (CE1_RMUISS) – Whether the City withholds ISSQN 1 - Inside, 2 - Outside, and 3 - Both;
  8. ISS Suppl. (CE1_FORISS) – ISS Supplier to be used for generating the Bill Payable and the Sales Order;
  9. Store (CE1_LOJISS) – The Supplier's Store.
    1. For the registration of items, enter the fields (1 for several):
    2. Service Code (CE1_CODISS) – The ISSQN Service Code;
    3. ISS Rate (CE1_ALIQISS) – ISSQN Rate;
    4. Serv. Contr. Cd. (CE1_CTOISS) – Service Code of the Service Contractor;
    5. Serv. Prov. Cd. (CE1_CPRISS) – Service Code of the Service Provider;
    6. Product Code (CE1_CPRISS) – Product Code;
    7. Product Desc. (CE1_DESPRO) – Product Description.

Important
To fill in the ISS Supplier, it is essential that the information of this supplier (usually the prefecture to which the ISS will be due) is duly filled in the suppliers' file (SA2), with attention to the fields A2_COD_MUN and A2_MUN, which will be used in the detailing of the ISS calculation.

2.11 - Incoming Invoices

  1. On Purchases (SIGACOM), go to Updates/Transactions/Incoming Document (MATA103).
  2. Place the cursor on a product and click Add.
  3. Add the Service Invoice, entering the fields Product (D1_COD), Entry Type (D1_TES), and other fields, checking the entry status in the ISS/INSS Calculation folder (MATA103), the records of IBGE Municipalities (CC2) and ISS rates (CE1) impact on the generation of this information.
  4. To enter deductions, fill in the fields ISS Ded. (D1_ABATISS) and Mat. Ded. (D1_ABATMAT). In the case of fixed deduction, the values will be calculated automatically according to the table of Cities of the IBGE (CC2).
  5. Check and confirm data.

Important
If integration with the Project Management Module (SIGAPMS) exists, enter the Project, Task, and Quantity using the Project Management button.
To fill in the INSS fields calculated in the ISS/INSS Calculation folder in the INSS calculation row referring to the fields Collected and Services, the fields Ded. Value /INSS (D1_ABATINS) and Subcontracted INSS Ded. (D1_AVLINSS) must be filled in.

2.12 - Sales Order

  1. At Billing (SIGAFAT), go to Updates/Orders/Sales Orders (MATA410).
  2. Place the cursor on a product and click Add.
  3. Type Sales Order, with attention to the following fields:
  4. ISS Supp. (C5_FORNISS)– with the ISS Supplier Code (Prefecture);
  5. Prov. City (C5_MUNPRES) – with the code of the City of Service Provision*;
  6. Provision State (C5_ESTPRES)– with the acronym of the Federative Unit;
  7. Project Code (C6_PROJPMS) –with the Project Code**;
  8. EDT Code (C6_EDTPMS) –with Project EDT**;
  9. Task Code (C6_TASKPMS) –with Project Task Code**.

Important
If integration with the TOTVS Construction Work and Projects (TOP) system exists, the field will be filled out through the automatic generation of the Sales Order coming from the Service Measurement.

If an integration with the Project Management Module (SIGAPMS) exists.

  1. For binding Incoming Invoices, click ISS Ded., entering the From Date and To Date to select the Incoming Invoices.

Important
The MV_TABABAT parameter defines which table of Incoming Invoice Items (SD1) or Internal Transactions (SD3) will be used to start searching Incoming Invoices.

To use the Internal Transactions table (SD3), it is necessary to implement batch tracking, and, at the time of the Requisition, it will be necessary to enter the Incoming Document that originated the Requisition with the Project Management (SIGAPMS) integration enabled. This configuration is performed when generating the Incoming Invoice. Project and Task binding is required to identify the entries of each Project and Task.

For the definition of the City and State of the Sales Order using the fields Service Exec. (B1_MEPLES) that is set in the Sales Order items, for the correct operation, the product configuration of the first item of the Sales Order will be considered.

If the outgoing invoice that was bound to incoming invoices is deleted, the bond will be undone after changing the sales order by clicking the ISS Ded. button and unchecking the selected invoices. This will delete the information from the Inputs x Outputs table (CE2).

2.13 Collection of ISS and Nature

Check who is responsible for the collection of ISS. If it is the A1_RECISS customer or not, enter the Nature in the A1_NATUREZ Client or Supplier and/or A2_NATUREZ by filling in the ED_CALCISS field. The TIO - Types of Inflows and Outflows must contain the field F4_DUPLIC = YES to generate the bill payable or receivable.

2.14 - ISS Calculation

  1. In the Tax Records Module (SIGAFIS), access Miscellaneous/Calculations/ISS (MATA954).
  2. Observe the parameters' content according to the following instructions:

Calculation Month?
Enter the reference month for tax calculation.

Calculation Year?
Enter the reference year for tax calculation.

Selected Records?
Enter the number of the record to be used in the calculation, or enter '*' (asterisk) to consider all records.

Calculation?
Enter the desired type of calculation, which may be Decennial, Fortnightly, Monthly, Half-yearly, and Annual.

Period?
Enter the calculation period to be considered, which can be First, Second, or Third.

File Previous period?
Enter the name of the file with the ISS calculation of the previous period related to this calculation routine.

Bill Currency?
Enter the code referring to the type of system currency.

Generate Bill?
Enter if you want to generate a tax bill in this routine.

Display Accounting Entry?
Choose Yes to generate accounting entries, otherwise choose No.

Consider Branches?
Enter if you want to consider the branches that will be grouped or consider only the registered branch.
This parameter is DISABLED for use in dbAccess environments.
For the Xbase environment, choose YES for the system to consider branches From/To in the parameters below.

From Branch?
Choose the Start branch code for file generation.    
This parameter is DISABLED for use in the dbAccess environment.

To Branch?
Choose the end branch code for file generation.    
This parameter is DISABLED for use in the dbAccess environment.

Print Payment Form?
Choose Yes to generate the payment form, otherwise choose No.

Use Progressive Table?
Choose Yes to use the progressive table, otherwise choose No.

Select Branches?
Determine whether to display a screen after confirming routine execution, so that you can select some branches for processing or branches that compose a group that does not follow the sequential order and therefore cannot be indicated within a range of from/to, such as, for example, generate the file for branches 01, 05, 10 and 13. The branches selected here will be calculated and grouped by CNPJ + City Registration, and only branches that meet this criterion can be selected.

Validate selection by CNPJ + C.R.?
This parameter allows you to use the routine by blocking the selections of full CNPJ + City Registration if any branch has already been selected, thus avoiding generating undue information in this process. With the parameter activated, it is possible to select a single branch and ask the system to group the others that meet the criteria of CNPJ + C.R.

2.15 Folder by Cities – Outflows

In this folder, it is possible to verify the values calculated for each city where provisions took place. It is important to note that if the city and description fields are presented blank, it means that the system was not able to identify the city for which that ISS value is due.

In these cases, there are two procedures to follow:

a) Check the completion of table CE1 and the suppliers entered in the CE1_FORISS field. The calculation is made based on the fields of State and city registered in these suppliers. The registrations must be made coherently so that the calculation is performed correctly.

b) Check the content of parameter MV_FPADISS.


Important
If the calculation is confirmed with values not classified in any city, bills and/or payment forms will not be generated because it is not possible to obtain a supplier for the bills. When you confirm the calculation, a message appears on the screen informing you about this restriction. The other bills and payment forms will be generated normally.


MV_MUNIC Parameter
This parameter will be considered if no provision exists within the city and, even then, values exist to be collected from other sources. Otherwise, the bill will be generated following the same logic as the others, that is, for the supplier set in table CE1.

  1. Double-click the desired row. You can see the details of the associated Incoming Invoices.
  2. In the Complementary Information folder, enter the information regarding ISS clearing. This information will be used in the generation in Record B465 of the Cotepe Act 35.
  3. Check the data and confirm.

2.16 Inflows and Outflows

  1. In the Tax Records Module (SIGAFIS), access Updates/Files/Inflows x Outflows (FISA053).
  2. You may view all bindings performed in the Sales Order (MATA410), detailing Incoming Invoices used as a deduction when generating ISSQN.
  3. Filtering the information (e.g.: by Sales Order), the user can print a report of the selected items.

2.17 Withholding of ISS per City

In the case of a withholding location, services can be classified in two ways: EP (City of the Provider's Site) or SLE (City of Execution of the Service). This information is recorded in field B1_MEPLES. The system will then consider the rule(s) defined in the ISS Taxes File (detailed in the section with the same name in this document) to perform the calculations.


Important
The MV_ISSXMUN parameter must be set to (.T.) to enable this tracking.

2.18 - Incoming Invoices

LES – ISSQN product rule due at the location of the service execution.

For the LES product (B1_MEPLES = 2), the user must enter the state and code of the city of service provision (SF1->F1_ESTPRES+SF1->F1_INCISS) at the time of entering the invoice to find the ISS rate rule (CE1).

The ISS withholding considers the configuration of the CE1_RETISS and CE1_RMUISS fields as follows:

 

Rule for withholding within the City:

 CE1->CE1_RETISS = 1 (Yes) and CE1->CE1_RMUISS = 1-Inside.

 Performs ISS retention for the supplier (CE1->CE1_FORISS+CE1->CE1_LOJISS) if the Supplier's city (A2_EST+A2_CODMUN) is the same as the city of service execution (SF1->F1_ESTPRES+SF1→F1_INCISS).


Rule for withholding outside the City:

CE1->CE1_RETISS = 1 (Yes) and CE1->CE1_RMUISS = 2-Outside.

Performs ISS withholding for the supplier (CE1->CE1_FORISS+CE1->CE1_LOJISS) if the Supplier's city (A2_EST+A2_CODMUN) is different from the city of service execution (SF1->F1_ESTPRES+SF1→F1_INCISS).


EP Product Rule – ISSQN due in the Provider's Site.

For the EP product (B1_MEPLES = 1), the city considered in the search of table CE1 to find the ISS rate rule will be the one registered in the Branch (SIGAMAT).

The ISS withholding considers the configuration of the CE1_RETISS and CE1_RMUISS fields as follows:


Rule for withholding within the City:

CE1->CE1_RETISS = 1 (Yes) and CE1->CE1_RMUISS = 1-Inside.

Performs ISS withholding for the supplier (CE1->CE1_FORISS+CE1->CE1_LOJISS) if the supplier's city (A2_EST+A2_CODMUN) is the same as the branch city (SIGMAT.EMP).


Rule for withholding outside the City:

CE1->CE1_RETISS = 1 (Yes) and CE1->CE1_RMUISS = 2-Outside.

Performs ISS withholding for the supplier (CE1->CE1_FORISS+CE1->CE1_LOJISS) if the supplier's city (A2_EST+A2_CODMUN) is different from the branch city (SIGMAT.EMP).


Rule for withholding inside and outside the City

CE1->CE1_RETISS = 1 (Yes) and CE1->CE1_RMUISS = 3-Both.

Performs ISS withholding for the supplier (CE1->CE1_FORISS+CE1->CE1_LOJISS) if the supplier's city (A2_EST+A2_CODMUN) is equal to or different from the branch city (SIGMAT.EMP).

2.1 - Outgoing Invoices

LES – ISSQN product rule due at the location of the service execution.

Considers the city entered in the fields C5_ESTPRES + C5_MUNPRES to search the tax rate of the ISS and the city of SIGAMAT to search for the service code of the provision (CE1->CE1_CPRISS) in table CE1.
 

EP Product Rule – ISSQN due in the Provider's Site.

 Considers the city of SIGAMAT to search the ISS rate and the service code of the provision (CE1->CE1_CPRISS) in table CE1.

2.20 Adjustment in the calculation

It is possible to add adjustment rows in the ISS calculation for debit or credit.

These values impact only the city that is being calculated in the ISS Calculation tab, not interfering with the value presented in the Per City - Outflows tab.


Important
In the Per City - Outflows tab, values debited and retained by the city according to the transactions of invoices are detailed; they do not suffer changes of credit or debit added in the ISS Calculation tab.
 

03. INACTIVE PARAMETERS

It was verified that the parameters below have become obsolete since the last change in function Mt954DedIS within routine MATA954 in 2014:

MV_ISS_COF;
MV_ISS_CSL;
MV_ISS_PIS;
MV_ISS_IRF.

Therefore, no documentation on these parameters exists, since they have become obsolete.
 

04. TABLES

AFN - Projects x Incoming Invoice
CC2 - IBGE Cities
CE1 – ISS Rates
CE2 – Inflows x Outflows - ISS
SB1 - Generic Description of Products
SED - Nature
SA1 – Customers File
SA2 – Suppliers File
SF4 – Types of Inflow and Outflow
SC5 – Sales Orders
SC6 - Sales Order Items
SD1 - Incoming Invoice Items
SD2 - Outgoing Invoice Items
SD3 – Internal Transactions
SF1 - Incoming Invoices
SF2 – Outgoing Invoices