Understanding Cancelled Notas Fiscais

You must notify SEFAZ of NFe legal numbers that are cancelled. There are many reasons to cancel an NFe. For example, if you sent the NFe to SEFAZ using the normal process, but technical issues arise that require you to use a contingency process. In that case, you need to inform SEFAZ that the original NFe legal number was cancelled in case the company receives a response for the original NFe legal number.

You must generate and submit an XML file for cancelled Nfe legal numbers when:

  • You cancel an NFe in the NF-e Response Process and Contingencies program (P76B12TE).

  • You change the XML status from Unused to Cancelled in the Unused/Cancelled NF-e Legal Numbers program (P76B22TE).

See Running the NFe XML Response Processing Program.

The system considers the two following statuses:

  • The NFe status in the NF-e Status Log table (F76B12TE). The status value can be Initial, Generated, Accepted, Error, Cancelled, Unused, Rejected.

  • The Unused/Cancelled XML file status in the NF-e Legal Numbers Unused/Cancelled - BRA table (F76B22TE). This status is independent of the NFe status and it can be Initial, Generated, Accepted or Error.

When you cancel an NFe in the NF-e Response Process and Contingencies program, the system moves the NFe to cancelled status, creates a new record in the F76B12TE table with Cancelled status and creates a new record in the F76B22TE table with NFe legal number cancelled at Initial status. Then, you can generate an XML for the cancelled NFe in the Unused/Cancelled NF-e Legal Numbers program, which changes the status of the Unused/Cancelled XML from Initial to Generated. The NFe status in the F76B12TE table is still Cancelled.

If you submit an XML file to cancel an NFe number and the cancellation file has an error, SEFAZ will reject the file. When you upload the file that SEFAZ sends you, the system updates the status in the F76B22TE file to E (error). You can reset the status of the F76B22TE record to I (initial) status, correct the error, and then resubmit the file to SEFAZ.