Fiscal Document Return Processing

This section discusses the steps included in fiscal document return processing.

Here's the fiscal document return process flow.

This image depicts the fiscal document integration with third parties:

This image shows the fiscal document return process.

Tax Authority Return Interface

After submitting the fiscal document information to the tax authority, the third party receives the tax authority return, and populates the Tax Authority Return interface tables using the Load Interface File for Import Process or the Financial Utilities Service web service. To prepare the data for loading into the interface tables, the third party uses the Fiscal Document Tax Authority Return Interface XLSM template.

For goods and services fiscal documents, the Tax Authority Return interface tables contain:

  • Fiscal Document Key: Forty-four digit fiscal document key used as the unique identifier of the fiscal document. Use the same fiscal document key indicated in the extract file by the Send Fiscal Document to Tax Authority process.
  • Fiscal Document Event Code: Fiscal document event code representing the type of request made to the tax authority. Possible values are:
    • Cancellation request: Request to cancel the fiscal document.
    • Contingency request: Request to approve a fiscal document generated in contingency.
    • Status request: Request to approve a fiscal document.
    • Voiding request: Request to void a fiscal document number.
  • Tax Authority Return Code: Internal code representing the return code from the tax authority. Standard tax authority return codes will be transformed into this internal code. The return code is dependent on the request made to the tax authority. Possible values are:

    • Approved: Represents either a Status request or a Contingency request that is approved.
    • Canceled: Indicates that a cancellation request is approved.
    • Errors: Indicates that a request is returned with errors.
    • Pending return: Indicates an issue in communicating with the tax authority where there is no response for the request or the response has timed out. In this case, you cannot assume that the fiscal document was received by the tax authority. Either the fiscal document was sent but no response was received from the tax authority, or the fiscal document was not received by the tax authority for some reason.
    • Rejected: Indicates that either a Status request or a Contingency request is returned as denied.
    • Upload failed: Indicates that the partner failed to send the request due to errors.
    • Void: Indicates that a voiding request is approved.
  • Event Processing Date and Time:

    The date and time when a request related to a fiscal document was processed by the tax authority.

  • Protocol Number or Temporary Service Document Number:

    Use this field for these purposes:

    • If the fiscal document is a goods fiscal document, indicate the protocol number. The protocol number is generated by the tax authority to uniquely identify the transactions of authorization, cancellation, and void related to a goods fiscal document.
    • If the fiscal document is a service fiscal document, indicate the temporary service document number provided by the partner during the tax authority return process. Use this field to indicate the temporary service document number (RPS number) if a new number is generated by the partner, and communicated to the city tax authority. The partner should inform this new temporary service document number, so the original temporary service document number is replaced by the new number.

  • Service Fiscal Document Date:

    The date when the service fiscal document is issued by the city tax authority.

  • Service Fiscal Document Number: The service fiscal document unique number provided by the city tax authority.

  • Verification Code of Service Fiscal Document:

    The verification code of the service fiscal document provided by the city tax authority when the fiscal document is generated. This code is used to verify the authenticity of the service fiscal document.

  • Tax Settlement Certificate Number of Service Fiscal Document:

    The certificate number provided by the municipality on the payment of taxes.

  • Tax Settlement Date of Service Fiscal Document : The date of the certificate provided by the municipality when taxes are paid.

  • Tax Code: The tax code for the classification of a charge imposed by a government through a fiscal or tax authority.

  • Tax Regime Code: The tax regime code for the set of tax rules that determine the treatment of one or more taxes administered by a tax authority.

  • Tax Jurisdiction Code: The tax jurisdiction code for a geographic area where a tax is levied by a specific tax authority.

  • Tax Status Code: The tax status code for the taxable nature of a product in the context of a transaction for a tax.

  • Tax Rate Code: The tax rate code specified for a tax status for an effective time period, expressed as a percentage or a value per unit quantity.

  • City Code: The city code according to IBGE (Brazilian Institute of Geography and Statistics) as informed by the city tax authority.

  • Taxable Amount: The taxable amount on which the tax rate is applied to calculate the tax amount, as indicated by the city tax authority.

  • Tax Rate: The tax rate expressed as a percentage, and indicated by the city tax authority. Tax Amount: The tax amount as indicated by the city tax authority.

  • Tax Credit Amount: The tax credit amount as indicated by the city tax authority. Some cities allow tax deductions based on tax credits and they can state the current tax credit amount.

For both goods and services fiscal documents, the tax authority can return error, rejection, or warning messages, which are populated in the Tax Authority Return interface tables:
  • Tax Authority Return Message Code: The message code returned by the tax authority, and associated to the text message to justify an error, rejection, or warning condition.
  • Returned Message Text: The message text sent by the tax authority to justify an error, rejection, or warning condition.

    For more information on other fiscal document event codes and fiscal document integration with third parties, see the Quick Reference for Oracle ERP Cloud Documentation for Brazil (2329725.1) on My Oracle Support at https://support.oracle.com.

Selected Parameters

  • Business Unit

    Enter the business unit of the fiscal documents. This is a mandatory parameter.

  • Legal Reporting Unit

    Enter the legal reporting unit that generated the fiscal documents.

  • Application Short Name

    Enter the application that generated the fiscal documents.

  • From Transaction Number

    Enter the transaction number of the transaction that supported the fiscal document. All fiscal document records with the transaction number greater than or equal to this parameter are extracted. This is a conditionally required parameter.

  • To Transaction Number

    Enter the transaction number of the transaction that supported the fiscal document. All fiscal document records with the transaction number lower than or equal to this parameter are extracted. This is a conditionally required parameter.

  • From Transaction Date

    Enter the transaction date of the transaction that supported the fiscal document. All fiscal document records with the transaction date greater than or equal to this parameter are extracted. This is a conditionally required parameter.

  • To Transaction Date

    Enter the transaction date of the transaction that supported the fiscal document. All fiscal document records with the transaction date lower than or equal to this parameter are extracted. This is a conditionally required parameter.

  • From Fiscal Document Number

    Enter the fiscal document number. All fiscal document records with the fiscal document number greater than or equal to this parameter are extracted. This is a conditionally required parameter.

  • To Fiscal Document Number

    Enter the fiscal document number. All fiscal document records with the fiscal document number lower than or equal to this parameter are extracted. This is a conditionally required parameter.

  • From Fiscal Document Date

    Enter the fiscal document date. All fiscal document records with the fiscal document date greater than or equal this parameter are extracted. This is a conditionally required parameter.

  • To Fiscal Document Date

    Enter the fiscal document date. All fiscal document records with the fiscal document date lower than or equal to this parameter are extracted. This is a conditionally required parameter.

  • Re-Extract Only

    Use this option to re-extract the same records when the original extract file is not accessible. Select YES to re- extract the fiscal document information.

    For more information on fiscal document integration with third parties, see the Quick Reference for Oracle ERP Cloud Documentation for Brazil (2329725.1) on My Oracle Support at https://support.oracle.com.