This project provides a tool to convert various audit data formats to the XBRL GL 2015 format. It is designed to facilitate interoperability between different accounting and audit data standards.
The following formats are supported:
- OECD Standard Audit File for Taxation (SAF-T): A standard for the electronic exchange of accounting data from organizations to a national tax authority or external auditors.
- ISO 21378:2019 Audit Data Collection: An international standard that establishes common definitions of accounting data elements and provides the information necessary to extract relevant audit data.
- AICPA Audit Data Standard (ADS): A suite of voluntary, uniform audit data standards that identify the key information needed for audits and provide a common framework.
- UN/CEFACT Accounting and Audit Schemas: A project to harmonize existing accounting and audit data standards. At present, this is primarily focused on mapping SAF-T to XBRL GL.
This tool requires Python 3. No external libraries are needed beyond the standard library. The unrar command-line tool is required to extract the ISO 21377 schemas, which can be installed on Debian-based systems with sudo apt-get install -y unrar.
The main entry point for the tool is main.py. It takes the input file, output file, and the format of the input file as command-line arguments.
python3 main.py <input_file> <output_file> <format> [--table-type <table_type>]input_file: The path to the input file.output_file: The path to the output XBRL GL file.format: The format of the input file. Choose fromsaft,iso21377,aicpa_ads.--table-type: (Optional) The table type for the AICPA ADS format (e.g.,GL_Detail).
To convert a SAF-T file:
python3 main.py Test\ Mapping\ SAF-T\ XBRL-GL.xml output.xbrlgl.xml saftTo convert an ISO 21377 file, you first need to download and extract the schemas from the official source. This tool does not handle the download and extraction.
Once you have the sample files, you can run the converter:
# This is a conceptual example, as the files are not checked in.
# python3 main.py path/to/AdcGlTrialBalance-Sample.xml output.xbrlgl.xml iso21377To convert an AICPA ADS file (in CSV format):
python3 main.py sample_gl_detail.csv output.xbrlgl.xml aicpa_ads --table-type GL_DetailThe UN/CEFACT standard is currently represented by the mapping between SAF-T and XBRL GL. Therefore, to convert a UN/CEFACT-compliant file, you can use the saft format option.
The conversion logic is located in the converters.py file. Each format has its own conversion function. The xbrl_gl_template.xml file is used as a base for creating the output XBRL GL files.