The most frequent reason a D390 is rejected is not a filling-in mistake. It is that it does not match the D300.
The same intra-Community operations appear in two returns filed on the same day, with different totals. ANAF compares automatically, the difference jumps out, and you are the one who explains it — a month later, when you no longer remember what happened.
The difference usually comes from small things: an invoice recorded with a tax that is close but not identical, a triangular operation treated as an ordinary supply, a partner whose VAT number is written with the country prefix stuck to the national part.
The l10n_ro_declaration_D390 module from the NextERP localization puts the check before generation.
1. The D300 cross-check, as a precondition
Before writing the file, the return recomputes the totals for types L, A, P and S from the D300 VAT tags, for the same period, and compares them with what came out in the D390.
If they differ beyond the rounding tolerance, you do not get the file. You get an error naming the partners on which they differ.
That turns the usual order of things upside down. Instead of filing and finding out two weeks later, you find out now, with the list in front of you, while there is still time to look into the invoices.
2. Operation types, derived from the tags
Every posted invoice line classifies itself, across six types:
| Type | What it means |
|---|---|
| L | intra-Community supplies of goods |
| A | intra-Community acquisitions of goods |
| P | intra-Community supplies of services |
| S | intra-Community acquisitions of services |
| T | triangular operations |
| R | non-transfers — own goods sent to another member state |
The classification starts from the line's VAT tag, from the triangular flag and from the product's ANAF code. It is not picked from a dropdown on each invoice, so it does not get wrong on the thirtieth one.
3. Triangular operations, and why they matter at comparison time
A triangular operation — where you are the middleman in a chain of three — is reported differently from an ordinary one.
The module reclassifies them automatically as T on sales and excludes them on purchases. But the subtler part is elsewhere: at the cross-check, their amounts are subtracted from the D300 totals.
Without that step, the comparison would fail on precisely the case handled correctly — and you would be hunting a mistake that does not exist. It is the kind of detail that separates a useful check from one you switch off after the second month.
4. Call-off stock, built from pickings
The call-off stock section is not filled in by hand. It is built from the stock moves, across three scenarios:
- the transfer of goods to the customer's warehouse in another member state;
- the return of what was not sold;
- the replacement of the partner, when the goods stay there but pass to another buyer.
For the third case, the module adds the fields that capture the event on the picking: the new partner and the date the change happened. It is the only one that needs an intervention, because it is the only one that cannot be derived.
If you also read the article on custody and call-off stock, this is the other end of the same flow: what you tracked as stock now appears as reporting.
5. The interactive report, before the XML
Alongside the wizard that generates the file there is an interactive report: every aggregated operation, by partner and type, with the ability to drill into the invoices and pickings it comes from.
That is where the real checking happens. A total that looks odd breaks down into documents in two clicks, not into an export.
6. The formal details that get files rejected
Three things the module does without you needing to know, but worth knowing because they are classic rejection causes:
- the VAT number is split: the country prefix goes in its own field, and only the national part stays in the partner code. Stuck together, the file fails;
- the schema version is picked by period — two are shipped, and an old corrective return goes on the schema of that time;
- XSD validation happens before download, not after filing.
What to check the first time
- One invoice of each type — a supply, an acquisition, a service supplied, a service acquired — and where each one landed.
- A triangular operation, if you have one: it appears as T, and the comparison with the D300 passes.
- A partner with a badly written VAT number on their record. See whether the check catches it or lets it through.
- The D300 cross-check, run deliberately on a month with a wrong invoice, so you see what the error looks like.
- The call-off section, if you work under that regime: the three scenarios, on real pickings.
Why it is worth it
Because the D390 is not a hard return. It is one that gets compared automatically against another, and the real work is not the filling in, it is reconciling the two.
When the reconciliation is done by the system, before generation, on a list of diverging partners, that work takes a quarter of an hour. When it is done after filing, out of two exports, it takes a day — and repeats the following month.
The module is on Odoo Apps, for Odoo 19 and 20: Romania - Accounting Declarations.
If D390s come back at you over mismatches with the VAT return, let's talk.