37 Work with Electronic Nota Fiscal (NFe)

This chapter contains these topics:

37.1 Entering a Sales Order

The Sales Order is entered and processed as usual.

  • Enter Orders

  • Print Pick Slips

  • Confirm Shipments

See Section 27.1, "Generating Outbound Nota Fiscal - Paper Nota Fiscal" for additional information and/or Section 24.1, "About Sales Order Management Requirements" manual for additional information.

37.2 Validations for Electronic Notas Fiscais for Final Consumers

The electronic nota fiscal for a final consumer is often mentioned using the acronym NFCe. You generate the NFCe in the same way that you generate other electronic notas fiscais. However, you must complete specific setup so that the system correctly includes the required information in the NFe XML files for a consumer, and you must enter the appropriate values in the sales order or stand-alone nota fiscal so that the system can write the correct information to the electronic nota fiscal.

The system uses the values in the second and third positions of the Special Handling Code field (SHC) of UDC 00/DT to determine whether the transaction is for a general (also called business or intermediate) consumer or for a final consumer. For a final consumer, the second and third positions must be 65. When you assign a document type with 65 in the SPC field to a sales order or nota fiscal, you must complete additional fields with values that are set up in other UDC tables. The values that you select from UDCs 76/CC (Taxpayer Class), 76B/PR (Presence Indicator Code), and 76B/UF (Branch Plant State) must have a 1 in the SHC field.

For example, suppose you set up code CM in UDC 00/DT for a sales order for a final consumer. You must set up that UDC code with 65 in the second and third positions of the Special Handling Code field. When you enter a sales order or stand-alone nota fiscal using document type CM, then in the sales order or nota fiscal, you must enter a value from UDC 76/CC that has a 1 in the SHC field and enter a value from UDC 76B/PR that has a 1 in the SHC field. You enter a value from UDC 76/CC in the Taxpayer Class field and enter a value from UDC 76B/PR in the Presence Indicator field on the SO Header - Brazil form or in those fields in the stand-alone nota fiscal.

You do not enter a value from UDC 76B/UF in the sales order or nota fiscal. Instead, the system accesses that UDC table to verify that the state of the company and the state of the final consumer is the same. If the state is not the same, the system will not generate the NFCe.

37.3 Generating Electronic Nota Fiscal (NFe)

Navigation

From Localizations - Brazil (G76B) choose Sales Order Management.

From Sales Order Management (G76B42) choose Sales Order Processing.

From Sales Order Processing (G76BB4211) choose Nota Fiscal Processing.

From Nota Fiscal Processing (G76B42111), choose National NF-e.

From Electronic Nota Fiscal - National (G76B42114), choose Generate Nota Fiscal.

Review processing options and data selection and make sure that you enter Electronic Nota Fiscal document type, series and statuses.

See Section 27.1, "Generating Outbound Nota Fiscal - Paper Nota Fiscal"for Additional Information.

This process calculates the Brazilian taxes for the Nota Fiscal and creates or updates records in the following files:

  • Nota Fiscal Header File - Brazil (F7601B)

  • Nota Fiscal Detail File - Brazil (F7611B)

  • Nota Fiscal Header Tag File (F76B1001)

  • Nota Fiscal Taxes Detail - Brazil (F76B4001)

  • Tax Rates - Brazil (F76B4002)

  • Nota Fiscal Taxes Detail - Tag File (F76B4006)

  • NF Header for Sales Tag File - Payment Method (F76B623)

37.3.1 Additional NFe Processes

You may use the following programs to review your nota fiscal and correct the nota fiscal data.

Program Description
Additional Charges (P76295B) Add expenses such as freight and insurance to a nota fiscal.

Review processing options. Make sure that Electronic Nota Fiscal document Type, version and statuses were entered correctly.

See Section 29.2, "Entering Additional Charges" for additional information.

XML- Generation (G76B42116) The following XML Generator (P76B601) versions are available through this menu:

1. XML Generator SEFAZ (ZJDE0001)

2. XML Generator without Ñ (ZJDE0002)

3. XML- Generator SCAN (ZJDE0003)

4. XML- Generator DPEC -Cont. 8 (ZJDE0004)

5. XML- Generator DPEC -Cont. 7 (ZJDE0005)

6. XML - Generator SVC-XX (ZJDE0006)

Select option 1 to generate the Electronic Nota Fiscal (NFe) XML file for normal processing.

Options 2 to 6 may be used to reprint the XML file and/or to generate an XML file to be sent in Contingency mode only.

Nota Fiscal-e Status Update (P76B650)  
NFe Inquiry Status (P76B675)  
DANFE- Generation (P76B660) This program prints the DANFe for document types for which the second and third positions in UDC 00/DT is 55 (nota fiscal for business consumer).
Contingency Process (G76B42115) The following programs are available through this option/menu:

1. Contingency DANFE (P76B660/ZJDE0002)

2. Change NFe Number to Form Ñ (P76B653)

3. Cancelled/Unused Nota Fiscal (P76B670)

4. Unused NFe Numbers (P76B678)

5. XML Generation (G76B42116)


37.4 Understanding How the XML File Is Created

For records defined in user defined code Document Type (system 00/ type DT) as Nota Fiscal type 355 (business/intermediate consumer) or Nota Fiscal type 365 (final consumer), this program reads the Nota Fiscal Detail file (F7611B) and collects data into a set of work files, then combines the data into the NFe XML Flat File (F76B620).

This file is automatically exported to the IFS area of the iSeries as an XML document by the Copy NFe XML Flat File to IFS - Brazil program (P76B602). Each XML file is considered a batch (in Portuguese, the word 'lote' is used, that means a set of one or multiple notas fiscais per XML file).

The number of notas fiscais per XML file is defined in the XML Generator (P76B601) processing option 8:

  • 8. Enter the maximum number the NFe allowed. Default blanks will assume 50.

If there are more NFe records to be processed, another XML file is created automatically.

37.4.1 XML File Names

The naming convention of the XML file is:

PPBBBBBBBBBBBB_NNNNNNNN.XML

Where,

  • P is the prefix

  • The prefix is hard-coded in the program that generates the XML.

  • NF - NFe XML

  • DP - DPEC XML

  • NC - Cancel XML

  • UN - Unused XML

  • B is the Branch/Plant

  • Selected Branch/Plant to process

  • N is a Sequential Number:

    • Next Number for the XML document type i.e., XM and XC

  • .XML is the file extension

The file extension is hard-coded.

Examples:

  • For standard NFe:

    • NF76SP_00000034.xml

  • For cancelled NFe:

    • NC76SP_00000022.xml

  • For unused NFe:

    • UN76SP_00000022.xml

37.4.2 XML Layout

The XML file is generated based on Manual do Contribuinte (Brazilian government specification manual). All mandatory elements should print in the XML file.

If an XML file element is mandatory, but data is not present in the JD Edwards World files, an empty element is created in the XML file. This element has a start tag and an end tag, but no data.

The Signature element is not included in the XML created by JD Edwards World. This element, /enviNFe/NFe/Signature, must be added by the third party before the XML is transmitted to the fiscal authority.

37.4.3 Before You Begin

  1. Create an IFS area on the iSeries for the XML files.

    See "Set Up Import/Export" in the JD Edwards World Technical Tools Guide.

  2. Set up Batch Export parameters on XML Generator program (P76B601). See Section 36.8.2, "Set Up Dream Writer Batch Export Parameters" for additional information.