PT
ES
AO
CV
MZ
ST
GW
Professional
Executive
Public Sector
Omnia
Evolution
To ensure the correct import of data from a billing SAF-T file, a set of settings related to the import must be configured.
These settings must be made before the first import or whenever there is a need to change the import parameters, and must also be done for clients whose sales are integrated through SAF-T file import.
Settings that need to be read from the ERP will be read from the Model Company; however, the information entered does not have to come from this company. You just need to make sure all the data entered in the configuration is common to all clients that share the same model.
Configuring the Extension
To configure the sales SAF-T extension, follow these steps:
Step 1: Create a model
Go to Application | Settings Group | Extensions | SAF-T or Desktop | [Client] | Banks Actions Menu | Configure;
Select an existing model and click Edit, or double-click the row;
Click Duplicate;
The Model Client field will show the default model company; however, you can select another company for the configuration you want to create;
Enter the desired name in the Model field;
Select the Default Model option if you want the model to be automatically assigned to new clients. Only one default model can exist per extension.
Step 2: Set the Processing Parameters
In the Import area, enable the options you want to have already selected in the import menu (these options can be changed later, in the Sales Import menu, before each import):
System Folders: when enabled, you can choose which version of the QR code reader to use, or whether you want to use all of them. All versions allow you to set the number of iterations (minimum of 1 and maximum of 20) and scan all pages of the document. The difference between the versions is technological, with version 2 using a more advanced component;
Note: this option may affect import performance;Cegid Docs;
In the Documents without Data field, you can select one of the following options:
Import: the document is imported and takes on the Pending status (current behavior). In this case, you can manually match it with the e-Fatura document when posting the document;
Discard: the document is imported and takes on the Discarded status;
Ignore: the document is ignored and is not imported by the application;
Enable the Automatic Posting option if you want documents to be automatically posted to the ERP's accounting during import. If an error occurs during posting, the documents will be placed as a Draft in the accounting postings and will need to be finalized manually in the ERP. In this situation, it's advisable to configure automatic balancing for the documents. You should decide whether automatic posting should always be performed, or only in cases where there's an attachment;
Enable the Normalize Document No. option if you want the document number to be normalized by checking patterns (DocType Series/DocNo) or standardized types (FT, FS, FR, NC, ND, etc.);
Set the Withholding Year to consider for the documents' withholdings:
Year of the Posting Date: the withholding year to consider will be the year of the posting date;
Year of the Document Date: the withholding year to consider will be the year of the document date;
Set the Posting Date to consider when posting the documents:
Document Date: the Posting Date to consider will be the same as the Document Date;
Last Day of the Month of the Document Date: the Posting Date to consider will be the last day of the month of the Document Date;
Enable the Reference Month for docs. from previous periods option if you want the Posting Date to be the last day of the Reference Month set in the Desktop, when the document belongs to a previous period. For example, a document dated 02/15/2021 would get a posting date of 03/31/2021, if March was the reference month set in the desktop;
Choose one of the following options:
Balance to VAT Account: the document is automatically balanced and the balancing difference is entered in the VAT account;
Balancing Account: the document is automatically balanced and the balancing difference is entered in the account set in this step. If the non-deductible VAT percentage is 100% and this account is not filled in, the balancing will be applied to the VAT base (the account that has the VAT class associated with it);
Specify the Maximum Value that will be automatically balanced. For example, if the maximum value is set to 0.01, documents will only be balanced if the balancing error is equal to or less than this value. If the error is 0.02, the documents will not be balanced.
Step 3: Set the Customer Creation Parameters
Enable the Create Customers in the ERP option if you want customer records to be created in the ERP. If you choose not to create the entities in the ERP, they will be mapped to the one-time entity, and postings will be made to it;
Set the Rule Type to use for coding new customers:
- Tax ID: the customer's code will be their tax identification number;
- Sequence: a sequential numeric code will be assigned to the customer. If this option is selected, you must specify, in the Mask field, the no. of digits of the code using the # character. For example, the mask #### will return a sequential 4-digit code (0001, 0002, 0003, ..., 9999);
- Mask: in addition to the previous example, this also allows you to use additional tokens in its construction, such as: # (numeric sequence), D (Tax Area token), and H (Country token). Example of filling in the Mask field: DH####;
- Customer ID: the customer code specified in the SAF-T file's customer table will be assigned;
- Formula: this option lets you customize the entity coding rules using all the tokens, fields, and formulas available in PAA;Depending on the option selected in the previous step, different fields will be shown:
- Sequence or Mask: fill in the Mask field according to one of the examples given above;
- Formula: specify the formula for building the customer's code. Clicking the ... button opens the formula editor, where you can customize the code using the tokens, fields, and formulas provided by the application. You must also specify the No. of Digits to assign to the customer's code;Set the Minimum Value and Maximum Value for the customer's code (optional). When filled in, the sequential code will start numbering from the minimum value and will not exceed the maximum value. If the value is set to 0, there is no minimum limit set;
Enable the Search public Entity data option if you want the customer data specified in the file to be replaced by tax data, whenever that information is public;
Fill in the Paym. Term, Currency, Tax Area, Oper. Location, Postal Code, and Country fields with the values to use when creating the customer's record, in case there is no information in the file;
In the ERP Code field, specify the One-Time Customer's code in the ERP;
Set the document grouping rule in the One-Time Customer Docs. field: - Do Not Group: the documents will not be grouped; - One document per line: the documents will be grouped, and the posting will distinguish each document by showing one line per sales document; - By document totals: the documents will be grouped, but, in this case, there will only be one line with the sum of the documents' totals and their respective VAT totals in the accounting posting. Only documents issued to the One-Time Customer on the same Day, for the same Tax Document Type and Series, will be grouped. The External Document Number of a grouped document will have the format TaxDocType Series/YYYYMMDD (for example: FR 2024/20240131);
Enable the Post to Third-Party Account option if you want the one-time customer's balances to be posted to its own third-party account. Otherwise, the posting will be made through the revenue account, against cash/bank;
In the "One-Time Customer Names" table, set the names of the third parties you want to be treated as one-time customers.
Step 4: Set the Accounting Connection Parameters
Enable the Integrates with Current Accounts option if you want the account to create open items in the Logistics module. When the account is posted in the accounting postings, you must make sure a posting document set to integrate with current accounts is used; otherwise, the open item will not be created;
In the Account Type field, set the account type to use when creating the open item;
In the Status field, set the current account's status when the account is integrated with Cash Management (when it creates open items);
Set the Rule Type to use for the accounting connection token of new customers:
- Sequence: a sequential numeric token will be assigned to the customer;
- Same as Code: when selected, the accounting connection token will be the same as the customer's code set previously;
- Fixed Token: the same accounting connection token, common to all customers, will be set;
- Formula: you can customize the accounting connection tokens using all the tokens, fields, and formulas available in PAA;Depending on the rule type selected previously, different fields will be shown:
- Formula: specify the formula for building the customer's code in the respective field. Clicking the ... button opens the formula editor, where you can customize the token using the tokens, fields, and formulas provided by the application;
- Fixed Value: specify, in the Fixed Value field, the accounting connection token to assign to all customers;Set the Minimum Value and Maximum Value for the connection tokens (optional). When filled in, the sequential numbering will start at the minimum value and will not exceed the maximum value. If the value is set to 0, there is no minimum limit set;
Note: This field is available when the Sequence or Formula options are selected;In the Third-Party Seg. field, set the third-party segment to consider when creating the customers' accounts in the Chart of Accounts.
Step 5: Set the Item Creation Parameters
Enable the Create Items in the ERP option if you want items to be created in the ERP;
Fill in the Item Type, VAT Code, and Unit fields with the values to consider when creating the item, in case there is no information in the file.
Step 6: Set the Discount Account Mappings
In the Financial Discount field, set the discount account in the Chart of Accounts.
Step 7: Set the Mappings between Taxes and Withholding Accounts
In this section, set the mappings between the SAF-T file's tax types and their respective accounts in the Chart of Accounts.
Tax Type: Specify the tax type you want to map;
Description: Description of the tax type;
Source: Data source you want to associate with the account. For each tax type, the sources to consider in this setting are the following: - Invoice - Sales. - Receipts - Sales; - Documents - Sales; - Documents - Receipts;
Withholding Account: The tax type's account in the Chart of Accounts.
Step 8: Set the Document Type Mappings
Specify the Tax Document Type;
Set the internal Document Type corresponding to the tax document type;
Set the Template to use for each tax document type. This option is only applicable when the ECHO Posting Assistant is not used;
Set the Nature of the Tax Document Type. For example, setting the tax document type FT as having nature C means that, when the document is posted, the revenue account will be credited;
Enable the Generate Settlement option so that document types are automatically settled when the document is posted. However, if an entity is set to generate a settlement, that setting will override the document's setting, meaning that if a tax document of type FT is not configured to generate a settlement, but the entity that issued the document has settlement enabled, a settlement will be generated for the issued FT document;
Enable the Ignore option to discard the document types during import.
Step 9: Set the Mappings between SAF-T and ERP Item Types
In this section, set the mappings between the item types specified in the SAF-T file and the corresponding ERP item types:
SAF-T Item Type: Item type specified in the SAF-T file;
Description: Description of the SAF-T file's item type;
ERP Item Type: Description of the ERP's item type.
Step 10: Set the Statuses to Apply to Documents
In the Import with Errors field, set the status for when there are errors during import;
In the Successful Import field, set the status for when the import is completed successfully;
In the Import Canceled field, set the status for a canceled pending document;
In the Posting with Errors field, set the document's status for when there are errors during posting;
In the Successful Posting field, set the document's status for when posting is completed successfully;
In the Posting Canceled field, set the status for a canceled posted document.
Step 11: Select the Desired Clients
In the Clients area, specify the clients you want to apply the configured model to.
Step 12: Finalize the configuration
Clicking Save or Save and Exit will apply these settings to all selected clients;
If another extension in the same category is already active, PAA may disable it and enable the new extension. To do this, simply indicate that you want to enable the new extension in the dialog box that appears after clicking Save;
The clients will automatically have the extension enabled.
Enabling the Extension
After making all the necessary settings, you must enable the SAF-T sales extension in batch or per client.
To enable the SAF-T extension, follow these steps:
Enabling per client
Go to Application | Home Group | Clients;
Select the desired client and click Edit, or double-click the Client's row;
On the Settings tab, under Data Sources, enable the SAF-T extension;
Specify the configuration model you want to use for this extension;
Click Save or Save and Exit.
Enabling in batch
Go to Application | Tables Group | Extensions;
Select the SAF-T extension and click Edit, or double-click the row;
In the Clients grid, select the clients where you want to enable the extension;
Specify the configuration model you want to use for this extension for each client;
Click Save or Save and Exit. If another extension in the same category is already active, PAA may disable it and enable the new extension. To do this, simply indicate that you want to enable the new extension in the dialog box that appears after clicking Save or Save and Exit.
Only one extension can be active per category.
Examples of Coding Customers with formulas
When the Formula rule type is used to create entities, two fields need to be configured to set the code creation rule.
This code consists of two parts:
Fixed prefix: set in the Formula field;
Number of digits of the code: set in the No. of Digits field.
For this type of rule, at least one of these fields must be filled in.
Below are some examples of coding customers using the Formula option.
Example 1: Code equal to the Tax ID
This formula corresponds to selecting Tax ID in the Rule Type field.
Formula: [NIFOrigem]
No. of Digits: 0 (no sequence)
Example 2: Sequential code
This formula corresponds to selecting the Sequence option in the Rule Type field. This example assumes a numeric sequence with four digits.
Formula: not filled in
No. of Digits: 4
Example 3: Mask
This formula corresponds to selecting the Mask option in the Rule Type field.
The following example shows a code made up of the Tax Area, Country, and a numeric sequence with four digits.
Formula: [D] + [H]
No. of Digits: 4
Example 4: Code equal to the CustomerID
This formula corresponds to selecting CustomerID in the Rule Type field.
Formula: [OrigemUQ]
No. of Digits: 0 (no sequence)
Example 5: Code equal to the last six digits of the Tax ID
Formula: SafeSubString([NIFOrigem], 3, 6) - The result will be the six digits of the Tax ID, counting from the digit in the third position
No. of Digits: 0 (no sequence)
Examples of creating Tokens with formulas
Below are three examples of creating accounting connection tokens using the Formula option.
Example 1: Token equal to the customer's code
This formula is equivalent to selecting the Same as Code option in the Rule Type field.
Formula: [CodigoPRI]
Example 2: Sequential number
This formula is equivalent to selecting the Sequence option in the Rule Type field. In this case, one will be added to the highest existing value in the ERP.
Formula: [NumeradorTokenEntidade]
Example 3: Fixed Token
In this case, simply set the desired fixed value in the Formula field.
Formula: '1234'
Accounting connection tokens can only consist of digits. So, when you choose the Same as Code option or use the entity's code in the Formula, you must make sure it consists only of numbers.
For example, if you want to use the entity's Tax ID as the CBL Token and the entity is intra-Community, in the token's configuration, you should select formula as the rule type and use the following formula to remove the country letters from the Tax ID: Replace([NIFOrigem], [PaisOrigem], '').