SAF-T extraction
Use this function to generate the SAF-T PT file to communicate with legal authorities.
The Standard Audit File –Tax (SAF-T) is a standard for audit purposes established by the Organization for Economic Co-operation and Development (OECD). SAF-T PT is the Portuguese version of the SAF-T standard.
The SAF-T is an XML file for common data (products, customers, tax codes, etc.) and functional data (invoices and journal entries).
The file generation can be an integrated SAF-T file with all the information (invoices plus accounting), an invoicing file (with a set of the common data), or an accounting file (also with a set of common data).
For each account, you need to enter the taxonomy code in the Reporting codes grid on the Reporting tab in Accounts.
Prerequisites
Refer to documentation Implementation
Screen management
Entry screen
The extracted data is based on the filtering criteria.
The file is exported one company at a time, by date, and by the selected file type:
Integrated – Exports all information from Accounting and Sales options
Invoicing– Exports Customers; VAT Taxes; Items; Suppliers; Sales Invoices including credit notes, debit notes from sales and AP/AR Accounting; and Movement of Goods documents including deliveries, customer returns, loan returns, sub-contractor returns, purchase returns, Inter-site transfers, sub-contractor transfers, sub-contractor returns
Accounting – Exports Customers, VAT Taxes, Accounts (with initial balance), Suppliers, and General ledger documents
Self-billing – Exports a SAF-T PT file for the self-billing process where the taxpayer owns the goods or services and issues invoice to self
AT communication – Exports the same data as Accounting but does not include Items; can send monthly data to the tax authority by web service
Self-billing AT communication – Exports the same data as Accounting but does not include Items; can send monthly self-billing information to the tax authority by web service
Shipping documentsAT – Exports Customers, Suppliers and Movement of Goods documents including deliveries, customer returns, loan returns, sub-cont. returns, purchase returns, Inter-site transfers, sub-cont. transfers, sub-cont. returns; sends the transport information to the tax authority. Selecting this type enables the All document types check box and selections.
The comment field is optional and any content is exported to the SAF-T file.
When you use SAFT-T to communicate the transportation instead of using the web service, you need to import the transport code returned from AT using the SAF-T Import function (FUNIMPCDTSA).
Block number 1
Company (field CPY) |
Enter the company code or use the Look up tool to search for and select the code. |
Start date (field STRDAT) |
Enter a date range to extract data within that range according to the SAF-T rules: Accounting data must be exported from the first day of the fiscal year to the end date. On the other hand, customer invoice data can be partially exported within these guidelines:
The initial date is only relevant for customer invoices (sales information) because entry journals are forced to the first day of the fiscal year. The end date is applied to both groups of data. The control of these dates is made at the process level and not at the screen level. This is because these controls are mandatory to Portugal but they may not be mandatory for another country extracting SAF-T data. The examples below show date ranges that would not be and would be allowed for SAF-T extraction and why. For these samples, 19/10/2011 is the current date and 01/01/2011 is the first date of the fiscal year:
|
Type (field SAFTTYP) |
Select the content types to export. Integrated – Exports all information from Accounting and Sales options Invoicing– Exports Customers; VAT Taxes; Items; Suppliers; Sales Invoices including credit notes, debit notes from sales and AP/AR Accounting; and Movement of Goods documents including deliveries, customer returns, loan returns, sub-contractor returns, purchase returns, Inter-site transfers, sub-contractor transfers, sub-contractor returns Accounting – Exports Customers, VAT Taxes, Accounts (with initial balance), Suppliers, and General ledger documents Self-billing – Exports a SAF-T PT file for the self-billing process where the taxpayer owns the goods or services and issues invoice to self AT communication – Exports the same data as Accounting but does not include Items; can send monthly data to the tax authority by web service Self-billing AT communication – Exports the same data as Accounting but does not include Items; can send monthly self-billing information to the tax authority by web service Shipping documentsAT – Exports Customers, Suppliers and Movement of Goods documents including deliveries, customer returns, loan returns, sub-cont. returns, purchase returns, Inter-site transfers, sub-cont. transfers, sub-cont. returns; sends the transport information to the tax authority. Selecting this type enables the All document types check box and selections. The comment field is optional and any content is exported to the SAF-T file.
|
Detail by BP (field SAFTDET) |
If you select this check box the balance sheet regarding control accounts is detailed by BP. If not selected, the amounts are exported at the level of the control account. |
Version (field VERSION) |
Select the scheme for the export file.
|
Control SVAT rules (field SAFTSVATCT) |
Additional criteria
Supplier (field BPSNUM) |
Enter or select the code for the supplier to export the self-billing invoices. |
Site (field STRFCY) |
Enter a site range to include documents for those sites. This field is only available when SAF-T PT Shipping documents AT is selected in the Type field. |
field ENDFCY |
All document types (field EVRDOCTYP) |
Select a specific document type to include in the SAF-T file. This field is only available if the All document types check box is cleared and if the content Type is set to SAF-T PT Shipping documents. |
field DOCTYP |
Document (field DOCNUMSTR) |
Enter a document range to limit export to documents within the range. This field is only available when SAF-T PT Shipping documents AT is selected in the Type field.
|
field DOCNUMEND |
Comment
Comment (field COMMENT) |
Enter a comment to be included in the SAF-T PT file. |
File
Destination type (field TYPEXP) |
Select the destination to save the exported file:
If you select Server, you must indicate the directory. |
Directory (field VOLFIL) |
Enter the directory or Access path if you selected Server for the Destination type. |
Description of the file
The SAF-T PT file includes the following major sets of information:
Header
This section displays the version, the software producing the SAF-T file, and company information like fiscal number and address. The default company address displays and if there is no default address, the first address listed displays.
General ledger
This section provides the company general ledger and the opening debit and credit values for each account in the fiscal period.
Customers and Suppliers
This section includes two record types based on information in the following tables: customers, business partners, addresses, and contacts.
The first Customer record includes all customers that have a record in the Customer table (in Common data). The second record includes miscellaneous customers who are invoiced but do not have a permanent record in the Customer table. However, if different information is set at the invoice level, this information is used.
The EU VAT no. is included in the exported file. SAF-T PT legal specifications state that if the EU VAT no. is unknown or not registered, you can use 999999990, or leave this field blank because it is not mandatory.
The account code is also included in the file, which you can find by searching the account from the first mandatory line in the accounting codes. You can use this method for Customers and Suppliers.
Products
This section includes all products registered in the Common data product table. Additionally, you need to export all items that are not registered in the product table but appear in invoice lines. This means that you need to include what was invoiced in A/P-A/R invoices. Any line items not registered in the product table are automatically assigned a product type based on the nature of the account.
There are three product types: P (Product); S (Service); O (Other). A new field is created in the product file, item category file, and accounts file due the reason explained above regarding A/P-A/R invoices.
For product group, one of the product statistical groups will be used. The SAFTPGROU - Product group (TC chapter, MIS group) parameter indicates which one of the statistical groups will be considered.
Tax table
This section includes the tax rates set up in the Tax classification (GESVCL) function according to two criteria: tax country region (Main land, Azores, and Madeira) and tax level (reduced rate, intermediate rate, normal rate, exemption rate, and other). This information is defined by company.
This section is based on information collected mainly from the tax rates file.
General ledger entries
This section provides the general ledger entries for a given period. It does not include the opening records (including carry-forward amounts) because they are included in the general ledger section of the SAF-T file.
The source documents included in SAF-T PT are customer invoices and debit and credit notes from the Sales and A/P-A/R accounting modules.
Invoices
All future elements are allocated through the invoice lines, influencing the net price and the discount on the line. The SAF-T PT legal technical requirements explicitly dictate not include any invoicing elements.
Error messages
In addition to the generic error messages, the following messages can appear during the entry :
Function not authorized for the userThe user profile does not contain the access rights for this function, irrespective of the site.
Legislation - not foundThe company introduced does not have an existing legislation.
This function is being used for the "XXX" company"This process cannot run simultaneously for two different companies.
Filename incorrectThe path for the filename may be empty.
The directory must be specified on a serverYou have selected Server for the destination, but the directory entered does not exist.
The SAFT is not implemented for this legislationThe company you are trying to extract data from has a legislation not supported by this function.
Tax code "XXX" it's not classified. Review the tax classification.
This tax code does not include the transaction origin details for tax country region (Main land, Azores, and Madeira) and tax level (reduced rate, intermediate rate, normal rate, exemption rate, and other).
Incorrect initial date: it must be the begining of the fiscal year or the begining of a month.
The periods to be extract depend on certain specific rules. The initial date must be always the first day of the period or the fiscal year.
Incorrect end date: it must be the end of the fiscal year, the end of a month or the current date.The end date must follow certain rules: It must be the end of one fiscal year, the end of a certain period (unless the month is the current month), or the current date.
Fiscal Year Not Yet DefinedThe fiscal year is not defined for this company.
Incorrect value: Parameter-" SAFTPGROU "The general parameter SAFTPGROU - Product group (TC chapter, MIS group) is not defined.