Skip to main content

ChapterTax & Returns

Chapter 13 — DGI files: the check before filing

A file refused by the DGI does not say why, and an empty field declares something other than what you typed. Before producing each file, the module checks it: if it blocks, a report names what must be corrected, and one click takes you to the field.

In this chapter

  • The five files the module produces
  • Reading the check report
  • What each file requires
  • Accents, Arabic letters, lengths
  1. Entry
  2. Check
  3. Report
  4. File
Book contents

The files concerned

FileReturnButton
FAC_qq_yy.txtList of the quarter's suspended salesGenerate .txt
BCD_qq_yy.txtList of the quarter's suspended purchasesGenerate .txt
DECEMP_yySummary of the employer returnDGI files › Summary (DECEMP)
ANXEMP_1_yy_1Annex I of the employer returnDGI files › Annex I (ANXEMP_1)
F6001-(tax ID)-(fiscal year).xml, and so onOne statement of the tax bundle: the one of the open tab, except the notesGenerate F6001.xml on the assets balance sheet, Generate F6002.xml on the liabilities balance sheet…

In the file names, qq is the quarter and yy the year in two digits: FAC_03_26.txt holds the sales of the third quarter of 2026. The two employer files have no extension, as the specification requires.

Reading the report

  1. Open the return and click its file button.
  2. If everything conforms, the file downloads, with a message: « .txt file generated. » for a suspension list, « DECEMP file generated. » or « ANXEMP_1 file generated. » for the employer.
  3. Otherwise, « File not generated: 8 field(s) to correct — see the check report. » shows, and the report opens above the form.
  4. Read each line: the place, the field, the value read between quotation marks, then the reason.
  5. Click a field's name: the cursor goes to the field, or to the annex's tab. Correct it: the report follows what you type, and the corrected field leaves it.
  6. When nothing blocks any more, the report says so, and a button generates the file.
A saved declaration of suspended sales after « Generate .txt »: the check report says no field blocks FAC_03_26.txt and keeps one « To check » point on the header.

The file button is never greyed out because of a wrong field: greyed out, it would not say why. You click, and the report answers.

The « To check » points block nothing: the file is produced, and the report stays open to show them. The report shows at most thirty points per list, followed by « … and N more not shown. ». Once everything is corrected, the report looks like this:

The report with no blocking field, with one point to check
  1. 1. No blocking field: the file can be generated.
  2. 2. Generate FAC_03_26.txt: the file goes out in one click.
  3. 3. A point to check: the activity will be cut to 40 characters.

What the check requires

PartRequirements
Declarant's header (sales, purchases)Seven-digit tax ID, the check letter that matches it (the report gives the right one), category (M, P, C, N or E), company name, activity, city, street and four-digit postcode; the street number and the establishment are optional. These fields are corrected on the page itself.
Clients and suppliersFull thirteen-character tax ID, such as 1234567RAM000; eight-digit identity card.
SalesAt least one invoice; invoice date within the quarter; authorisation (number and date); price excluding tax above zero; rates between 0 and 100.
PurchasesPurchase order number in digits only, suspended VAT filled in.
EmployerFor DECEMP: tax ID, key, category, establishment, fiscal year, and every annex line corrected. For ANXEMP_1: the full header (activity included), at least one employee and the annex I lines corrected. The header is corrected on the client record.
Tax bundleTax ID and check letter from the client record, fiscal year, Filing nature, Type, and a statement that holds at least one value.

Accents, Arabic letters, lengths

  • The .txt files are written without accents: the module removes them without flagging anything. Any other character outside the Latin alphabet (œ, €, quotation marks…) becomes a space and is flagged « to check ».
  • A text typed only in Arabic letters would therefore go out empty: it blocks. Type it in Latin letters.
  • A label that is too long is cut and flagged without blocking: 40 characters for a company name, an activity or a city, 72 for the street.
  • A number that is too long, on the other hand, blocks (20 characters for an invoice number or a sales authorisation number): it cannot be cut without changing what it designates.

There is no file for annexes II to VII of the employer return: they are exported to Excel or printed.