This chapter contains these topics:
Section 38.1, "Updating Electronic Nota Fiscal Status Using a Third Party Software"
Section 38.2, "Updating Electronic Nota Fiscal Status Interactively"
Section 38.3, "Checking the Status of an Electronic Nota Fiscal"
Section 38.4, "Printing the DANFE -- Documento Auxiliar da Nota Fiscal Electrónica"
A new file has been created to store the fiscal authority response/inbound information: Nota Fiscal Status Update Transactions (F76B652).
This information can be entered interactively by a user or automatically through integration with the third-party software.
The third-party software must add a record to Nota Fiscal Status Update Transactions (F76B652) with the status of each NFe XML file that was processed by the fiscal authority.
At least the following fields need to be populated:
Legal Access key (DTBLAK)
Response Status Code (DTBRST)
Protocol Number (DTBPTL)
If Nota Fiscal Electronica Status Add Trigger (X76B653) is correctly started and a Nota Fiscal Status Update Transactions (F76B652) record is correctly entered, the statuses in the sales order and nota fiscal detail lines advance automatically.
Make sure that Nota Fiscal Electronica Status Add Trigger (X76B653) is started.
See Section 36.8.3, "Set up Electronic Nota Fiscal Status Update Trigger" for information on how to start the trigger.
From Localizations - Brazil (G76B), choose Sales Order Management
From Sales Order Management - Brazil (G76B42), choose Sales Order Processing
From Sales Order Processing - Brazil (G76B4211), choose Nota Fiscal Processing
From Nota Fiscal Processing (G76B42111), choose National NFe
From Electronic Nota Fiscal - National (G76B42114), choose Nota Fiscal -e Status Update
To enter the response from the fiscal authority interactively, choose Nota Fiscal -e Status Update (P76B650).
In the header, enter any combination of search criteria. An asterisk (*) can be entered as a wild card character.
Figure 38-1 Nota Fiscal-e Status Update screen
If your search criteria returned multiple notas fiscais, multiple notas fiscais can be processed.
Complete the following field:
Option (OP)
Press F1 to list all the available values that can be entered in this option, as noted in the screen below.
Press Enter.
Complete Protocol Number, Processed Date and Time if required.
Press F10 (Nota Fiscal Status Update), to call NF-e Nota Fiscal Update - Brazil program (P76B651).
If the NF-e Nota Fiscal Update - Brazil (P76B651) version is properly set up, Nota Fiscal Status Update Transactions (F76B652) record is created/updated.
The trigger is automatically started when the Nota Fiscal Status Update Transactions (F76B652) record is created/updated.
The trigger updates the statuses of the processed sales orders and notas fiscais in Sales Order Detail (F4211) and the Nota Fiscal Detail (F7611B) files.
This program also creates a record in the Nota Fiscal Update - Brazil file (F76B651) when Accepted (option 1) or Contingency options (5 to 9) is selected so the Documento Auxiliar da Nota Fiscal Eletronica (DANFE) can be generated.
When a Contingency Option (options 5 to 9) is selected, NF-e Contingency Data (P76B652) and Generic Text Application Window (P0016) are displayed and additional information regarding the contingency can be entered.
Figure 38-3 NF-e Contingency Data window
Enter Contingency Date and Time and press Enter.
Generic Text Window (P0016) is displayed.
Enter the Contingency Message and press Enter.
You may want to press F24 (key) to review all the options available in the Generic Text Window:
Select Model Memo option may be used to Add, Change and Delete a predefined message (Model Memo) to print when the Contingency Window (P0016) pops up.
XML Generator (P76B601) and DANFE Generation (P76B660) programs can be called if XML Submission and/or DANFE processing options are enabled.
XMLs and DANFEs generated through submission option can be reviewed through WRKSPLF (Work with All Spooled Files) command.
See Section 67.5, "Processing Options for Nota Fiscal-e Status Update (P76B650)".
See Section 67.6, "Processing Options for Nota Fiscal Update (P76B651)".
See Section 67.7, "Processing Options for Trigger Program for the File F76B652 (X76B653)".
See Section 67.7, "Processing Options for Trigger Program for the File F76B652 (X76B653)".
From Localizations - Brazil (G76B), choose Sales Order Management
From Sales Order Management - Brazil (G76B42), choose Sales Order Processing
From Sales Order Processing - Brazil (G76B4211), choose Nota Fiscal Processing
From Nota Fiscal Processing (G76B42111), choose National NFe
From Electronic Nota Fiscal - National (G76B42114), choose NFe Inquiry Status
On NF-e Inquiry Status program (P76B675), enter a combination of:
Branch / Plant
Buyer
Sales Order Number
Order Type
Nota Fiscal Number
Series
NF Type
NFe Status
Fiscal authority response Status
Issue Date
Reference
Protocol
From Localizations - Brazil (G76B), choose Sales Order Management
From Sales Order Management - Brazil (G76B42), choose Sales Order Processing
From Sales Order Processing - Brazil (G76B4211), choose Nota Fiscal Processing
From Nota Fiscal Processing (G76B42111), choose National NFe
From Electronic Nota Fiscal - National (G76B42114), choose DANFE Generation
The DANFE Generation program (P76B660) reads information from the Nota Fiscal Update - Brazil (F76B651) and Nota Fiscal Detail (F7611B) files and updates two temporary work files:
DANFE - Header File - Brazil (F76B660)
DANFE - Detail File - Brazil (F76B661)
The DANFE is printed based on these temporary work files.
This program also updates the statuses of both the nota fiscal and sales order based on processing options values.
This program can be executed manually or automatically executed after the response status is entered as Accepted (option 1) or Contingency (options 5 to 11) and NF-e Nota Fiscal Update - Brazil (P76B651) is properly set up.
Note:
The DANFE Barcode prints on the upper right corner of the document. This barcode follows Code 128-C barcode specifications.A numeric presentation of the barcode prints under the barcode.
It contains the Legal Access Key number plus a 2-digit number that is a Check Digit (based on Modulo 103 check digit specifications).
Protocol Number, Authorization Date and Time also print in the DANFE.
See Section 67.8, "Processing Options for DANFE Generation - Brazil (P76B660)".