Track B · e-Factura and SAF-T D406Lesson 3 of 4 · 8 minutes

Lesson 3

SAF-T: what the file holds

Under review by an accountant.

The SAF-T file (fișierul standard de control fiscal), the declaration D406, is an XML file on the OECD SAF-T 2.0 version, with the rules of ANAF. The lesson about the accounts and SAF-T showed what the file asks of the chart of accounts. Here you see the whole file: which sections it has, where a usual operation goes, and what kind of declaration each file is.

The sections of the file

The ANAF order lists the sections and sub-sections that you report. They fall into four parts: the header, the master data (MasterFiles), the accounting entries and the documents.

The sections of the SAF-T file
SectionWhat it holds
HeaderThe company and the period declared
MasterFiles: GeneralLedgerAccountsThe accounts, with the balances at the start and at the end of the period
MasterFiles: Customers, SuppliersThe customers and the suppliers, with their balances
MasterFiles: TaxTableThe tax codes used
MasterFiles: UOMTable, ProductsThe units of measure and the products
MasterFiles: AnalysisTypeTableThe cost centres
MasterFiles: AssetsThe register of fixed assets
GeneralLedgerEntriesAll the accounting entries of the period, with their lines
SourceDocuments: SalesInvoicesThe issued invoices, with their lines
SourceDocuments: PurchaseInvoicesThe received invoices, with their lines
SourceDocuments: PaymentsThe receipts and the payments
SourceDocuments: MovementOfGoodsThe stock movements

The annex of the order also lists MovementTypeTable, PhysicalStock and Owners. They belong to the file for stocks.

An invoice in the file

On 10 February 2026, Carpatica Software SRL sells to Crișana Medical Distribuție SRL: 2 laptops x 5,500.00. The accounting entry of invoice CSA-2026-000005 is:

Invoice CSA-2026-000005
AccountNameDebitCredit
4111Customers13,310.00
707Sale of goods purchased for resale11,000.00
4427Output VAT2,310.00
Total13,310.0013,310.00
D4111 CustomersC
13,310.00
D707 Sale of goods purchased for resaleC
11,000.00
D4427 Output VATC
2,310.00

13,310.00 = 11,000.00 + 2,310.00

The same operation shows in several places of the D406 for the month of February:

  • GeneralLedgerEntries has the accounting entry, with its lines on 4111 Customers, 707 Sale of goods purchased for resale and 4427 Output VAT.
  • SourceDocuments: SalesInvoices has the invoice, with its lines.
  • MasterFiles: Customers has the customer, with the partner code: two digits for the kind of identifier, then the tax code.
  • MasterFiles: GeneralLedgerAccounts has the three accounts, with their balances.
  • MasterFiles: TaxTable has the VAT code for the supplies at the rate of 21%.

So ANAF sees the same invoice from three sides: as a document, as an accounting entry, and through the accounts and the partners. That is why they must match each other.

The VAT codes and the VAT return D300

You do not choose the VAT codes freely. They are in an official list of the ANAF workbook for the schema, separate for supplies and for purchases, by rate and by how much is deducted. For each code, the workbook shows the row of the VAT return D300 that matches it.

The declaration type and the accounting basis

The header of the file says what kind of declaration it is. The type shows the period and the content:

The type of the D406 declaration (HeaderComment)
TypeWhat you declare
LOne month
TOne quarter
AThe fixed assets, once a year
CThe stocks, at the request of ANAF
NL, NTA non-resident: one month, or one quarter

The header also gives the accounting basis. For double entry on the general chart of accounts, the basis is "A". Accounting on the basis of invoices has "I", and other bases are for IFRS, banks, insurers or non-profit entities.

Who files each type, and by which deadline, you see in the next lesson.

Version 1 · updated on 25 November 2026

Change history
  1. Version 1 · updated on 25 November 2026 · New lessonFirst version.