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

SEEREFERTTO 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).

Description of the file

The SAF-T PT file includes the following major sets of information:

 SEEINFO

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 user

The user profile does not contain the access rights for this function, irrespective of the site.

Legislation - not found

The 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 incorrect

The path for the filename may be empty.

The directory must be specified on a server

You have selected Server for the destination, but the directory entered does not exist.

The SAFT is not implemented for this legislation

The 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 Defined

The 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. 

Tables used

SEEREFERTTO Refer to documentation Implementation