(BRA) Using Electronic Notas Fiscais

This chapter provides an overview of the electronic nota fiscal process and discusses how to:

Click to jump to parent topicUnderstanding the Electronic Nota Fiscal Process

The electronic nota fiscal (NFe) process enables you to generate an XML file that includes information about the nota fiscal, which is sent to the fiscal authority. The fiscal authority validates the file and returns information to you, including an assigned number for the NFe. JD Edwards EnterpriseOne software provides the programs that you use to generate the XML file and to review and update the information that is returned to you by the fiscal authority. A third-party software company provides the programs to read the XML data from the JD Edwards EnterpriseOne tables, send the data to the fiscal authority, and write the returned information to JD Edwards EnterpriseOne tables.

JD Edwards EnterpriseOne software provides a process for transactions that occur in the state of São Paulo and one for transactions that are outside of São Paulo (national transactions).

To use the NFe process:

  1. Print the final nota fiscal by running the Print Nota Fiscal – Ship From program (R76560B).

    This program assigns and writes to the NFe Header table (F76B01TE) the nota fiscal number according to the next numbering scheme that you set up, and then prints the nota fiscal.

    As the last process within the Print Nota Fiscal – Ship From program, the system launches the Nota Fiscal Elec. - Outbound program (R76B560Z1) if you set the processing options in the Print Nota Fiscal – Ship From program to do so. You can also run the Nota Fiscal Elec. - Outbound program from a menu option.

  2. Use the XML Transaction Review program (P70XMLZ1) to review the data that you wrote to the tables for the outbound transaction.

  3. Use the third-party software to send the data to the fiscal authority.

  4. Use the third-party software to receive the data that the fiscal authority sends back.

  5. Run the XML Inbound Process program (R70XMLI1) to update your system with the information that you receive back from the fiscal authority.

    Use the XML Transaction Review program to review the data that you receive.

  6. Use the Nota Fiscal Elect. Revision program (P76B01TE) to review updated nota fiscal information and release the nota fiscal that was put on hold by the Nota Fiscal Elec. - Outbound program.

  7. Update journal entries for Brazil taxes by running the Update Sales – Brazil program (R76B803).

  8. Update the base-software sales tables by running the Sales Update program (R42800) if you did not set the processing option in the Update Sales – Brazil program to update the base-software tables.

The Nota Fiscal Elec. - Outbound program assigns these values to the outbound records as it writes them to the XML Transaction Interface table (F70XMLZ1):

This diagram shows the batch processes and tables that are used by the NFe process:

Process flow for electronic nota fiscal

The system changes the status of the records to b when the third-party software reads the data from the F70XMLZ1 table.

The third-party software assigns these transaction types to the records when it writes data to the F70XMLZ1 table after sending the records to and receiving an answer form the fiscal authority:

Click to jump to top of pageClick to jump to parent topicPrerequisites

Before you complete the tasks in this chapter:

Click to jump to parent topicGenerating the Electronic Nota Fiscal

This section provides an overview of how to generate the NFe and discusses how to:

Click to jump to top of pageClick to jump to parent topicUnderstanding How to Generate the Electronic Nota Fiscal

You can automatically or manually generate the NFe. The system automatically generates the NFe when you run the Print Nota Fiscal program if you set the processing options in the Print Nota Fiscal program to generate the NFe. To manually generate the NFe, run the Nota Fiscal Elec. - Outbound program from the menu option.

Print Nota Fiscal Program (R76560B)

When you run the Print Nota Fiscal program for sales transactions, the system:

Nota Fiscal Elec. - Outbound Program (R76B560Z1)

You can run the Nota Fiscal Elec. - Outbound program from a menu option, or you can run it automatically by setting a processing option in the Print Nota Fiscal program.

The Nota Fiscal Elec. - Outbound program:

  1. Converts the nota fiscal generated by the R76B560 program into a XML version, and saves the data to the F70XMLZ1 table.

    The data saved is the same as the header and detail data that resides in the Nota Fiscal Header (F7601B) and Nota Fiscal Detail (F7611B) tables. This data is now available for processing by the third-party software.

  2. Updates the status of the NFe to G (generated) in the F76B01TE table.

  3. Prints a control report to enable you to review the transactions processed.

Click to jump to top of pageClick to jump to parent topicRunning the Nota Fiscal Elec. - Outbound Program

Use one of these navigations:

Click to jump to top of pageClick to jump to parent topicSetting Processing Options for Nota Fiscal Elec. - Outbound (R76B560Z1)

Processing options enable you to set default processing values.

Select

1. Next Status Code - From (Required)

Enter a value that exists in the Activity/Status (40/AT) UDC table to specify the beginning of the range of the next status of the notas fiscais that you want to select. The status that you select must be set up in the order activity rules based on the order type and the line type of the notas fiscais that you want to select. The combination of codes that you select for this processing option and the Next Status Code - To processing option in this program must be a valid last status/next status combination in the Order Activity Rules table (F40203).

2. Next Status Code - To (Required)

Enter a value that exists in the Activity/Status (40/AT) UDC table to specify the beginning of the range of the next status of the notas fiscais that you want to select. The status that you select must be set up in the order activity rules based on the order type and the line type of the notas fiscais that you want to select. The combination of codes that you select for this processing option and the Next Status Code - From processing option in this program must be a valid last status/next status combination in the Order Activity Rules table (F40203).

Process

3. Proof or Final Mode

Enter 1 to run the process in final mode. In final mode, the system updates the appropriate tables.

4. Override Next Status Code - Sales Order

Enter a value that exists in the Activity/Status (40/AT) UDC table to select an alternate status for the next step in the order process. The status that you select must be set up in the order activity rules based on the order type and the line type of the sales order. The override status is another allowed step in the process.

5. Override Next Status Code - Nota Fiscal

Enter a value that exists in the Activity/Status (40/AT) UDC table to select an alternate status for the next step in the order process. The status that you select must be set up in the order activity rules based on the order type and the line type of the nota fiscal. The override status is another allowed step in the process.

6. Prevent Next Status Update

Specify whether to prevent the system from updating the next status from the Order Activity Rules. The code that you specify from the 40/AT UDC table must have been set up in the Order Activity Rules based on the order type and the line type that you are using.

Values are:

Blank: Updates the next status according to the existing order activity rules.

1: Prevents the next status update.

CIF Information

7. Supplemental Data Type for Municipal Code

Specify the value that exists for municipal codes for address book records in Brazil. This value is set up in the Supplemental Data Setup program (P00091).

8. Supplemental Data Type for Neighborhood

Specify the value that exists for neighborhood codes for address book records in Brazil. This value is set up in the Supplemental Data Setup program (P00091).

XML Generation

9. Generate .xml file.

Enter 1 to write the XML file to the path that you specify in the File Container Path for XML file processing option.

10. File Container Path for XML file.

Enter the location to which the system saves the XML file. You must have write permission to the location that you enter.

Click to jump to parent topicUploading Inbound Information for Electronic Notas Fiscais

This section provides an overview of how to upload inbound information for electronic notas fiscais and discusses how to:

Click to jump to top of pageClick to jump to parent topicUnderstanding How to Upload Inbound Information for Electronic Nota Fiscais

After the fiscal authority validates the electronic notas fiscais that you send by using the third-party software, you receive back an XML file that includes:

You run the third-party software to move the data that was received by that software into the F70XMLZ1 table in the JD Edwards EnterpriseOne software. The third-party software assigns a transaction type of BRNFI-SP to transactions for São Paulo, and assigns a transaction type of BRNFI-NA for national transactions.

You run the XML Inbound Transaction Process program to read the data for the inbound file that exists in the F70XMLZ1 table and update other JD Edwards EnterpriseOne tables. If the transactions are for São Paulo (transaction type is BRNFI-SP), the system reads the processing options that you set in the PO Transaction BRNFSP program (P76BX001). If the transactions are national transactions (transaction type is BRNFI-NA), the system reads the processing options that you set in the PO Transaction BRNFNA program (P76BX002). For both types of transactions, the system:

Click to jump to top of pageClick to jump to parent topicRunning the XML Inbound Transaction Process Program

Select Brazil Elec Invoice - Process (G76BNF1), XML Inbound Transaction Process.

Click to jump to top of pageClick to jump to parent topicSetting Processing Options for XML Inbound Transaction Process (R70XMLI1)

Processing options enable you to set default processing values.

Select

Transaction Group

Enter the transaction group for the type of transactions that you want to select. For example, if you enter BRNFE, the system selects electronic notas fiscais.

Process

Proof or Final Mode

Enter 1 to process the records in final mode. In this mode, the system updates tables and changes the status of the records. Leave this processing option blank to process the records in proof mode. When you run the process in proof mode, you can print and review the transactions, and review and correct errors in the Work Center.

Messages

User ID for electronic messages

Enter the user ID of the person who will receive the electronic messages in the Work Center. If you leave this processing option blank, the system sends the Work Center messages to the user who entered the transactions.

Click to jump to parent topicManaging Electronic Notas Fiscais

This section provides overviews of how to review data for electronic notas fiscais and how to purge XML transaction records and discusses how to:

Click to jump to top of pageClick to jump to parent topicUnderstanding How to Review Data for Electronic Notas Fiscais

You can review the XML transaction data and the NFe header and details.

XML Transaction Review Program (P70XMLZ1)

The XML Transaction Review program enables you to review the XML files that you prepare to send to the fiscal authority and the file that is returned to you. The records that you review exist in the XML Transaction Interface table (F70XMLZ1).

The program enables you to search for records by the:

After you locate the files that you want to review, you can select to review the transaction information or the XML file.

Nota Fiscal Elect. Revision Program (P76B01TE)

Use the Nota Fiscal Elect. Revision program to review the electronic notas fiscais. The records that you review exist in the NFe Header (F76B01TE) and NFe Detail (F76B11TE) tables. You can search for records using the fields that exist for the nota fiscal, such as the company or supplier, or by data that is specific to the NFe such as:

After you locate the nota fiscal that you want to review, you can view the details about the nota fiscal or you can release the nota fiscal. Releasing the nota fiscal causes the system to release the sales order and update the status of the nota fiscal according to the order activity rules.

Click to jump to top of pageClick to jump to parent topicUnderstanding How to Purge XML Transaction Records

You use the XML Transactions Batch Purge program (R70XMLI1P) to purge selected records from the F70XMLZ1 table. You select the records to purge by specifying the transaction group in the processing options and using Data Selection to set other selection criteria.

Click to jump to top of pageClick to jump to parent topicForms Used to Manage Electronic Notas Fiscais

Form Name

FormID

Navigation

Usage

Work with XML Transaction Revision

W70XMLZ1A

Brazil Elec Invoice - Process (G76BNF1), XML Transaction Review

Set search criteria for locating transactions, and select transactions to review.

View XML Nota Fiscal electronic

W70XMLZ1C

Select a transaction on the Work with XML Transaction Revision form, and click Select.

View the XML file for the selected transaction.

Work with electronic Nota Fiscal

W76B01TEA

Brazil Elec Invoice - Process (G76BNF1), Nota Fiscal Elect. Revision

Locate and review information about the electronic notas fiscais.

Work with Electronic Nota Fiscal Detail

W76B01TEB

  • Select a record on the Work with XML Transaction Revision form and select Transaction Review from the Row menu.

  • Select a record on the Work with electronic Nota Fiscal form, and click Select.

Review the nota fiscal information that resides in the F76B01TE table.

Work with NFe Header History

W76B01TEC

Select a record on the Work with Electronic Nota Fiscal Detail form, and select View History from the Form menu.

View the processing history of the transaction. For example, the history might show information about the acceptance or cancelation of a record.

Click to jump to top of pageClick to jump to parent topicSetting Processing Options for XML Transaction Review (P70XMLZ1)

Processing options enable you to set default processing values.

General

1. Transaction Group

Enter the transaction group for the type of transactions that you want to display in the XML Transaction Review program. For example, if you enter BRNFE, the fields for electronic notas fiscais for Brazil appear in the forms for the XML Transaction Review program.

2. Number of Days before Expiration

Enter the number of days after which an outbound electronic nota fiscal is expired. An outbound transaction is expired when no answer for the transaction is received from the third-party software. The expiration date is determined by the date type that is specified in the Source of Date for Expiration processing option and the number of days that you enter here.

3. Source of Date for Expiration

Specify the date type that the system uses to determine the expiration date. Values are:

0: Transmission date. The date that the transaction was written to the F70XMLZ1 table.

1: Process date. The date that the third-party software downloaded the transaction from the F70XMLZ1 table.

4. Path for the temporary file

Enter the path to which the system prints the temporary XML file. The system prints the temporary file to the location that you specify while the system runs validations.

Display

Use these processing options to determine the titles that appear in the grid for the program. Processing options 1–19 enable you to specify the title and data item that appear in the header. You can specify the title and data item for these generic fields:

1–19. Enter the Data Item to override the field:

Specify the data item whose title and value you want to display in the header grid to enable you to search the XML file using that data item. For example, for the Enter the Data Item to override the field: " XML Internal Reference" processing option, you could specify B76ELN so that the grid uses the title for that data item (NFe Legal Number) and enables you to search the contents of the F70XMLZ1 table by the values for the NFe legal number.

20. Product Code of the UDC to List XML Header Elements

Enter the product code of the UDC table that includes the values that you set up for the XML header elements. For example, if the XML header elements are in a UDC that is specific to Brazil, specify 76B.

Note. The NFe XML Header Elements (76B/HE) UDC table exists to include the XML header elements for the Brazil electronic nota fiscal process. This UDC table includes some hard-coded values, and you can add other values.

21. Code of the UDC to List XML Header Elements

Enter the code of the UDC table that includes the values that you set up for the XML header elements. For example, you might enter HE.

Note. The NFe XML Header Elements (76B/HE) UDC table exists to include the XML header elements for the Brazil electronic nota fiscal process. This UDC table includes some hard-coded values, and you can add other values.

Click to jump to top of pageClick to jump to parent topicSetting Processing Options for Nota Fiscal Elect. Revision (P76B01TE)

Processing options enable you to set default processing values.

Select

1. Next Status Code - From (Required) 1. Next Status Code - From (Required)

Enter a value that exists in the Activity/Status (40/AT) UDC table to specify the beginning of the range of the next status of the notas fiscais that you want to select. The status that you select must be set up in the order activity rules based on the order type and the line type of the notas fiscais that you want to select. The combination of codes that you select for this processing option and the Next Status Code - To processing option in this program must be a valid last status/next status combination in the Order Activity Rules table (F40203).

2. Next Status Code - To (Required)

Enter a value that exists in the Activity/Status (40/AT) UDC table to specify the beginning of the range of the next status of the notas fiscais that you want to select. The status that you select must be set up in the order activity rules based on the order type and the line type of the notas fiscais that you want to select. The combination of codes that you select for this processing option and the Next Status Code - From processing option in this program must be a valid last status/next status combination in the Order Activity Rules table (F40203).

Process

1. Override Next Status Code - Sales Order

Enter a value that exists in the Activity/Status (40/AT) UDC table to select an alternate status for the next step in the order process. The status that you select must be set up in the order activity rules based on the order type and the line type of the sales order. The override status is another allowed step in the process.

2. Override Next Status Code - Nota Fiscal

Enter a value that exists in the Activity/Status (40/AT) UDC table to select an alternate status for the next step in the order process. The status that you select must be set up in the order activity rules based on the order type and the line type of the nota fiscal. The override status is another allowed step in the process.

3. Prevent Next Status Update

Specify whether to prevent the system from updating the next status from the Order Activity Rules. The code that you specify from the 40/AT UDC table must have been set up in the Order Activity Rules based on the order type and the line type that you are using.

Values are:

Blank: Updates the next status according to the existing order activity rules.

1: Prevents the next status update.

Click to jump to top of pageClick to jump to parent topicReviewing XML Transaction Files

Access the Work with XML Transaction Revision form.

Note. The fields that appear on this form depend on the header titles that you select to display by setting the processing options.

Main Filters (header area)

User ID

Enter the user ID of the transaction that you want to locate.

Batch Number

Enter the batch number of the transaction that you want to locate. The system generates a batch number when you use the Nota Fiscal Elec. Outbound program to generate an XML file.

Transaction Number

Enter the transaction number of the transaction that you want to locate. The system assigns a unique transaction number to each record within a batch.

Transaction Generated From:andTo:

Enter the range of dates during which the transaction that you want to find was generated.

Transaction Processed From: and To:

Enter the range of dates during which the transaction that you want to find was processed.

Status

Select a value to specify the status of the records for which you search. Values are:

Unprocessed: The system searches for records for which the XML file is generated by the Nota Fiscal Elec. - Outbound program but not captured by the third-party software.

Inbound with reprocess Pending.

Processed: The system searches for records for which the XML file is generated by the Nota Fiscal Elec. - Outbound program and captured by the third-party software.

All: The system searches for all records in the F70XMLZ1 table.

Outbound, Inbound, Outbound Wo Inbound (outbound without inbound), Outbound Expired, and All

Specify the status of the XML transaction file that you want to locate. Values are:

Outbound: The system searches for records for which the XML transaction was written to the F70XMLZ1 table by the Nota Fiscal Elec. - Outbound program, but has not been captured by the third-party software.

Inbound: The system searches for records for which the XML transaction has been processed and returned by the third-party software.

Outbound Wo Inbound: The system searches for records for which the XML transaction was captured by the third-party software, but for which no answer has been received.

Outbound Expired: The system searches for records for which the outbound transaction is past the expiration date as set up in the processing options.

All: The system displays all records in the F70XMLZ1 table.

Main Filters (detail area)

The fields in the detail area of the Work with XML Transaction Revision form indicate the transaction type, XML document status, and other transaction information. The fields that reveal the status of the transaction and that are affected by the statuses that you select to search are:

Trans Type (transaction type)

The system displays the transaction type that is associated with the electronic nota fiscal. Values are:

BRNFO: Outbound transaction

BRNFI-SP: Inbound transaction for São Paulo

BRNFI-NA: Inbound national transaction

XML Doc Status (XML document status)

The system displays the status of the XML document after it was processed by the third-party software. Values are:

Blank: The third-party software has not processed the request.

A: Accepted. The fiscal authority accepted the NFe XML file and returned the NFe number and other data.

C: Canceled. The transaction is canceled.

E: Error. An error occurred in the submission. You must correct the error and resubmit the transaction for processing.

SP (status)

The system displays the status of the record in the F70XMLZ1 table. This status reveals the state of the record and does not indicate the status of the answer from the fiscal authority. A record might be processed, but might contain an error. Values are:

Blank: The transaction was written to the F70XMLZ1 table, but has not been processed by the third-party software.

P: Processed. The transaction was processed.

Tr Ac (transaction action)

The system displays an A (Add) for all transactions for the Brazil NFe process. Future processes might use other codes.

XML Error Code

The system displays the error code and description from the XML Error Code (70/EC) UDC table. If you receive an error message, you should correct the error and resubmit the transaction.

Additional Filter

XML Elements

Enter a value that exists in the NFe XML Header Elements (76B/HE) UDC table to specify the element that you want to use as search criteria.

Value

Enter a value for the XML elements that you entered in the XML element field.

Click to jump to top of pageClick to jump to parent topicReviewing Electronic Notas Fiscais

Access the Work with electronic Nota Fiscal form.

NF Number (nota fiscal number)

Enter the nota fiscal number for the transaction that you want to locate.

NF Type (nota fiscal type)

Enter a value that exists in the Nota Fiscal Source (76/NF) UDC table to identify the type of transaction that you want to locate. Values for the electronic nota fiscal process are:

5: Stand Alone Nota Fiscal - SO

6: Complementary Nota Fiscal - SO

7: Nota Fiscal - SO

NFe Legal Number (electronic nota fiscal legal number)

Enter the NFe number for the transaction that you want to locate. The fiscal authority issues an NFe number when it accepts a nota fiscal transaction.

NFe Receipt Number (electronic nota fiscal receipt number)

Enter the NFe receipt number for the transaction that you want to locate. The fiscal authority assigns a receipt number when it accepts a nota fiscal transaction.

Legal Number Date From: and To:

Enter the range of dates that includes the transactions that you want to locate. The legal number date is the date that you generated the nota fiscal and assigned a nota fiscal number.

Receipt Number From: and To:

Enter the range of dates that includes the transactions that you want to locate. The receipt number date is the date that the fiscal authority issued a receipt for acceptance of the transaction.

Status

Select the status of the transaction after processing by the third-party software to use when searching for records. Values are:

Pending: The system searches for transactions that have been captured by the third-party software, but no answer has been received.

Accepted: The system searches for transactions that have been accepted by the fiscal authority.

Canceled by fiscal authority: The system searches for transactions that have been canceled by the fiscal authority.

Rejected: The system searches for transactions that were not accepted by the fiscal authority.

All: The system searches for all transactions.

Click to jump to top of pageClick to jump to parent topicRunning the XML Transaction Batch Purge Program

Select Brazil Elec Invoice - Process (G76BNF1), XML Transaction Batch Purge.

Click to jump to top of pageClick to jump to parent topicSetting Processing Options for XML Transactions Batch Purge (R70XMLI1P)

Processing options enable you to set default processing values.

General

Transaction Group

Enter a value that exists in the Transaction Group (70/TG) UDC table to specify the type of transaction that you want to purge. Electronic notas fiscais belong to transaction group BRNFE.