Processing for Response Type retEnvEvento

When processing the response type retCancNFe the system identifies and analyzes the element tpEvento.

  1. If the event number is 110111 (Cancel):

    1. Obtains the values for the protocol number and response code for each NFe in the lot, from the transmission response XML file.

    2. Uses the value for the response code to get the NF-e status from the value in the first position of the Special Handling Code field of the NFe Response Status Code UDC table (76B/RS).

    3. Updates the F76B22TE table with the status.

      If errors exist or validations fail, the system writes error messages to the Work Center.

  2. If the event number is 110141 (EPECI):

    1. Obtains the values for the EPEC registration date, EPEC registration time and the response code for each NFe in the lot, from the transmission response XML file.

    2. Uses the value for the response code to get the NF-e status from the value in the second position of the Special Handling Code field of the NFe Response Status Code UDC table (76B/RS).

    3. Validates the next status value based on the document type and NF-e status.

    4. If no errors exist, updates the tables F76B12TE, F7611B and F4211.

    5. If errors exist or validations fail, the system writes error messages to the Work Center.