Compartir a través de


(BRA) Set up, import, and verify NF-e XML documents and DANFE that you receive in emails

Applies To: Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2

Follow the steps in this topic to set up and use Microsoft Dynamics AX to import Nota Fiscal eletrônica (NF-e) XML documents and Documento Auxiliar da Nota Fiscal Eletrônica (DANFE) that you receive in emails. For more information, see (BRA) Import and verify NF-e XML documents and DANFE that you receive in emails.

Nota

This topic does not apply to versions of Microsoft Dynamics AX 2012 prior to cumulative update 7 for AX 2012 R2.

Prerequisites

The following table shows the prerequisites that must be in place before you start.

Category

Prerequisite

Version

Microsoft Dynamics AX 2012 R2 with cumulative update 7 or later

Country/region

The primary address for the legal entity must be in the following countries/regions: Brazil

Related setup tasks

1. Set up email accounts to import XML files and DANFE for NF-e

Use the Email accounts form to set up email accounts that are used to import XML documents and DANFE for NF-e.

To perform this task, follow these steps:

  1. Click Organization administration > Setup > Brazil > Configure email accounts.

  2. In the Email accounts form, click New or press CTRL+N to create a new record, and then specify the server address, port, user name, and password for the email account.

    Field

    Description

    Server address

    Enter the POP3 server address for the email account.

    Port

    Enter the port number to use for the email server.

    Require SSL

    Select this check box to indicate that the server requires a Secure Socket Layer (SSL) encrypted connection.

    Username

    Enter the user name for the email account.

    Password

    Enter the password for the email account.

  3. Repeat step 2 to set up additional email accounts.

2. Set up the IBGE code for a state, and then assign the state to an NF-e authority

Use the Address setup form to set up the Instituto Brasileiro de Geografia e Estatistica (IBGE) code for a state, and then use the NF-e federal parameters form to assign the state to an NF-e authority.

To perform this task, follow these steps:

  1. Click Organization administration > Setup > Addresses > Address setup.

  2. Click State/province, and then in the State/province area, select or create a state record. For more information, see “Set up state/province information” in Tareas clave: configurar formatos de dirección.

  3. In the IBGE code field, enter the IBGE code for the state, and then close the form.

  4. Click Organization administration > Setup > Brazil > NF-e federal parameters.

  5. Select or create an NF-e authority record. For more information, see “Set up web services for an NF-e” in (BRA) Set up NF-e federal parameters.

  6. In the lower pane, on the States using authority tab, in the State field, select a state for the NF-e authority. The description of the state is updated in the Description field.

    Nota

    You can only select the states for which you specify the IBGE codes.

3. Import and verify the NF-e XML files and DANFE from emails

Use the Import XML files from email form to import the XML files and DANFE for NF-e from emails. You can then use the Received NF-e XML documents form to verify the XML document and DANFE for an NF-e and inquire about the current status of the NF-e at the Secretaria da Fazenda (SEFAZ) using the access key.

To import and verify the NF-e XML files and DANFE from emails, follow these steps:

  1. Click Accounts payable > Periodic > NF-e Federal > Import XML files from email.

  2. Specify criteria, such as batch group and recurrence schedule, to import the XML files and DANFE.

  3. Click OK to import the files from emails.

  4. Click Accounts payable > Periodic > NF-e Federal > Received NF-e XML documents.

  5. In the Received NF-e XML documents form, verify the access key, fiscal establishment, series, number, Cadastro Nacional da Pessoa Jurídica (CNPJ), and name for the received NF-e XML document.

    Field

    Description

    Access key

    The access key for the NF-e.

    Fiscal establishment

    The fiscal establishment that the NF-e is issued for.

    Nota

    Only the NF-e XML documents that are issued to the CNPJ of the fiscal establishments of the legal entity are imported from the emails.

    Series

    The series number of the NF-e.

    Number

    The number of the fiscal document.

    CNPJ

    The taxpayer registration number of the account that issued the NF-e.

    Name

    The name of the account that issued the NF-e.

    Nota

    This field is left blank if an account that has the CNPJ of the NF-e issuer is not available in Microsoft Dynamics AX.

    IBGE code

    The IBGE code for the state where the NF-e is issued.

    Status from SEFAZ

    The last queried status of the NF-e at the SEFAZ.

    Date and time of the last inquiry

    The date and time of the last queried status of the NF-e at the SEFAZ.

    Posted

    A selected check box indicates that the NF-e is posted.

    Return Code

    The return code for the NF-e from the SEFAZ.

    Description

    The description of the return code for the NF-e.

  6. Select a line, and then on the Action Pane, click XML document to view the XML file for the NF-e. Close the form.

  7. In the Received NF-e XML documents form, select a line, and then on the Action Pane, click DANFE to view the DANFE for the NF-e. Close the form.

  8. In the Received NF-e XML documents form, select a line, and then click Inquire status to inquire about the current status of the NF-e at the SEFAZ using the access key. The status, date, and time of the inquiry are updated in the Status from SEFAZ and Date and time of the last inquiry fields.

You can click XML document and DANFE on the Received NF-e federal tab on the Action Pane in the Fiscal document form to view the XML document and DANFE for an NF-e. For more information about how to verify the posted fiscal documents, see (BRA) Fiscal document (form).

4. Inquire about the status of NF-e access keys at the SEFAZ

Use the Received XML Inquiry form to set up Microsoft Dynamics AX to inquire about the status of NF-e access keys at the SEFAZ. Inquiries regarding the status of the NF-e are made multiple times before the NF-e is approved, and one additional inquiry is made about the status after the time that the vendor has to cancel an approved NF-e has elapsed.

To inquire about the status of NF-e access keys at the SEFAZ, follow these steps:

  1. Click Accounts payable > Periodic > NF-e Federal > Inquire about NF-e access key status.

  2. In the Limit of cancellation field, enter the number of hours that the vendor has to cancel the NF-e.

  3. In the Minimum inquiry interval field, enter the minimum interval between the inquiries in minutes for the received NF-e access key at the SEFAZ.

  4. You can specify the additional batch processing criteria, such as batch group and recurrence schedule, on the Batch tab, and then click OK. For more information about batch processing, see Visión general del procesamiento por lotes

5. Update access keys or XML documents for posted electronic fiscal documents

Use the Posted NF-e with pending validation form to view the posted electronic fiscal documents for which the access keys or XML documents are not available in the Received NF-e XML documents form. You can then update the access keys or XML documents for the electronic fiscal documents after posting.

To perform this task, follow these steps:

  1. Click Accounts payable > Periodic > NF-e Federal > Posted NF-e with pending validation.

  2. In the Posted NF-e with pending validation form, select one of the following check boxes to filter the list of NF-e documents that are displayed in the form:

    • Select the SEFAZ status not inquired check box to view a list of NF-e documents for which the access keys are not validated by the SEFAZ. You can validate the access keys for these NF-e documents after posting.

    • Select the Fiscal document status differs from SEFAZ status check box to view a list of NF-e documents for which the status is updated from approved to canceled. You can cancel these NF-e documents and create and post the corrected NF-e documents. For more information, see (BRA) Cancel a vendor NF-e, (BRA) Post an NF-e from a purchase order, and (BRA) Post an NF-e from a tax fiscal document.

    • Select the NF-e documents that do not have XML attachments check box to view a list of NF-e documents for which XML attachments are not available. You can import NF-e XML documents from an email for these NF-e documents after posting. For more information, see 3. Import and verify the NF-e XML files and DANFE from emails.

    • Select the Access keys are not found in received NF-e XML documents check box to view a list of NF-e documents for which the access keys are not available in received NF-e XML documents. You can enter the access keys for these NF-e documents manually in the Received NF-e XML documents form. For more information, see 3. Import and verify the NF-e XML files and DANFE from emails.

(BRA) About the NF-e process

Technical information for system administrators

If you don't have access to the pages that are used to complete this task, contact your system administrator and provide the information that is shown in the following table.

Category

Prerequisite

Configuration keys

No configuration key is required for this task.

Security roles and duties

To set up, import, and verify NF-e XML documents, you must be a member of a security role that includes the duties that are described in the following table.

Duty Name Procedure
Enable receipt electronic fiscal document process EFDocumentReceivedXMLEnable_BR Set up email accounts to import XML files and DANFE for NF-e
Maintain electronic fiscal document received EFDocumentReceivedXMLMaintain_BR
  • Set up email accounts to import XML files and DANFE for NF-e

  • Import and verify the NF-e XML files and DANFE from emails

  • Update access keys or XML documents for posted electronic fiscal documents

Inquire into receipt electronic fiscal documents EFDocumentReceivedXMLInquire_BR Inquire about the status of NF-e access keys at the SEFAZ

Security roles and privileges

To set up, import, and verify NF-e XML documents, you must be a member of a security role that includes the privileges that are described in the following table:

Privilege Name Procedure
Enable receipt electronic fiscal document process EFDocumentReceivedXMLEnable_BR Set up email accounts to import XML files and DANFE for NF-e
Maintain access key for validation of electronic fiscal document EFDocumentReceivedXMLMaintain_BR
  • Set up email accounts to import XML files and DANFE for NF-e

  • Import and verify the NF-e XML files and DANFE from emails

View access key and xml of electronic fiscal document received EFDocumentReceivedXMLView_BR
  • Import and verify the NF-e XML files and DANFE from emails

  • Inquire about the status of NF-e access keys at the SEFAZ