# Add automatic messages to the additional information of the fiscal document

> Make the fiscal document come out with the messages the law or the customer requires, such as the Simples Nacional ICMS credit, the DIFAL and the FCP.

Fonte: https://docs.kmee.com.br/en/odoo/localizacoes/brasil/tributacao/mensagens-e-informacoes-complementares/

Make the fiscal document come out with the messages the law or the customer requires, such as the Simples Nacional ICMS credit, the DIFAL and the FCP, and write notes for a specific order.

## Before you start

Use a user with the Fiscal Manager profile. Have the text of each message defined with your accountant and know in which operations it must appear.

## Step by step

### 1. Get to know the ready-made comments

Open **Fiscal > Configuration > Others > Comment**. Odoo brings ready-made messages that calculate the amount in the fiscal document itself: **Simples Nacional permissão de crédito**, **Total ICMS DIFAL Destino** and **Total ICMS FCP**. Open a comment to see the text and the **Comment Type** and **Object** fields.

### 2. Choose where the message appears

The **Comment Type** defines the XML field:

- **Fiscal**: information of interest to the tax authority, infAdFisco (information for the tax authority) tag;
- **Commercial**: additional information of interest to the taxpayer, infCpl (complementary information) tag.

In the DANFE, both appear in the **Dados adicionais** box, under **Informações complementares**.

The **Object** defines the scope: **Fiscal Document** is a message for the whole fiscal document; **Fiscal Document Line** is a message for each item, which goes to the additional product information, infAdProd tag. The **Sequence** defines the order when there are several messages.

### 3. Link the message to the operation

Open the operation in **Fiscal > Configuration > Operations > Operation**, click the button that resets the operation to draft (**Reset To Draft**) if it is approved and, in the **Notes** tab, add the document comments. For item messages, open the operation line and use the **Extra Information** tab. Approve the operation again.

Every fiscal document issued with this operation then carries the messages. For a message that applies to only one company, use an operation of that company, with the **Company** field filled in.

### 4. Make the Simples Nacional message appear

A company under Simples Nacional states in the fiscal document the ICMS credit the taxpayer customer can use, under article 23 of Complementary Law 123/2006.

The text is the one in article 60 of CGSN Resolution 140/2018, in the complementary information field: PERMITE O APROVEITAMENTO DO CRÉDITO DE ICMS NO VALOR DE R$ ...; CORRESPONDENTE À ALÍQUOTA DE ...%, NOS TERMOS DO ART. 23 DA LEI COMPLEMENTAR Nº 123, DE 2006.

Create a new comment by duplicating **Simples Nacional permissão de crédito**. In the copy, choose the **Comment Type** **Commercial**, so the text goes to the complementary information, keep the part of the text that calculates the credit amount, which already brings the currency symbol, so do not write R$ before it, and write the credit rate of the month after CORRESPONDENTE À ALÍQUOTA DE: the effective rate times the ICMS share of the bracket (article 60 of CGSN Resolution 140/2018), not the nominal rate.

The message goes only in the sales with a right to credit, the ones to taxpayers (CSOSN 101). Copy the **Venda** operation to an operation of sales to taxpayers of the Simples Nacional company, with the **Company** field filled in, add the new comment in the **Notes** tab and approve. Use it in the sales to taxpayers; sales to non-taxpayers (CSOSN 102) go through the sale operation without the comment. The credit rate changes every month, because the revenue of the previous 12 months changes; it only stays the same in bracket 1. Update the rate in the comment at the start of each month, with the credit rate of the month.

Example with a credit rate of 2.70%: in a sale of 1,000.00 to a taxpayer customer, the item comes out with CSOSN 101, pCredSN (Simples Nacional credit percentage) 2.70 and vCredICMSSN (ICMS credit amount) 27.00, and the comment text, with the amount of 27.00 and the rate of 2.70%, appears in **Detalhes**, **Extra Information** tab, in the **Customer Additional Data** field.

### 5. Write a note for a single order

For a text that applies to only one sale, such as the customer purchase order number, use the **Manual Customer Additional Data** and **Manual Fiscal Additional Data** fields of the sales order. They pass to the invoice and go into the fiscal document before the automatic messages, separated by a dash.

### 6. Check the fiscal document

Confirm the invoice and click **Detalhes**, at the top of the invoice. In the **Extra Information** tab, the **Customer Additional Data** and **Fiscal Additional Data** fields show the final text. Open the XML and find the infAdic (additional information) group, with the infCpl (complementary information) and infAdFisco (information for the tax authority) tags. Generate the DANFE and check the text in the **Dados adicionais** box.

## Expected result

The fiscal documents of the operation come out with the automatic messages and the calculated amounts, such as the Simples Nacional ICMS credit, and with the notes written in the order.

## If something goes wrong

- The message did not appear: check that the comment is in the **Notes** tab of the operation used in the fiscal document and that the operation was approved again after the change.

- The message came out in the tax authority field and was meant for the customer: change the **Comment Type** to **Commercial**.

- The message came out in fiscal documents of another company: link the comment to an operation with the **Company** field filled in.

## Continue the process

- [Configure the fiscal operation, its lines and the CFOP](https://docs.kmee.com.br/en/odoo/enterprise/localizacoes/brasil/tributacao/operacoes-e-cfop/)
- [Configure the company tax regime and fiscal data](https://docs.kmee.com.br/en/odoo/enterprise/localizacoes/brasil/implantacao/empresa-e-regime/)
- [Prepare, send and check an NF-e](https://docs.kmee.com.br/en/odoo/enterprise/localizacoes/brasil/nf-e/emitir-nf-e/)
