Processing for Response Type retConsReciNFe

When processing the response type retConsReciNFe, the system:

  1. Verifies that the request is valid (value for element cStat is equal to 104).

  2. Uses the access key from the chNFe element to retrieve these existing values from the F76B12TE table:

    • NF-e legal number

    • NF-e legal series

    • Nota fiscal type

    • Company

    • NF-e emission type

  3. Obtains the values for the protocol number and response code from the transmission response XML file.

  4. Uses the value for the response code to get the NF-e status from the Special Handling Code field of UDC 76B/RS.

  5. Validates the sales order and nota fiscal next status codes based on the document type and NF-e status code.

  6. If no errors exist, updates these tables as appropriate:

    • F76B12TE

    • F7611B

    • F4211

If errors exist or validations fail, the system writes error messages to the Work Center. Additionally, the PDF generated by the process shows the XML file name, the general information extracted from the XML file, and the status of the processed file, including a status that indicate whether the process completed successfully. Prints the DANF-e document according to the values set in the processing options.