# Intrastat reporting

**URL:** https://discuss.tryton.org/t/intrastat-reporting/3456
**Category:** Ideas
**Created:** [November 13, 2020, 12:19pm UTC](https://discuss.tryton.org/t/intrastat-reporting/3456 "2020-11-13T12:19:55Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [November 13, 2020, 12:19pm UTC](https://discuss.tryton.org/t/intrastat-reporting/3456/1 "2020-11-13T12:19:55Z")

</div>

The [intrastat report](https://www.avalara.com/vatlive/en/eu-vat-rules/eu-vat-returns/intrastat-declarations.html) is mandatory for companies moving goods between European Comunity states over a [threshold specific to each country](https://www.avalara.com/vatlive/en/eu-vat-rules/eu-vat-returns/intrastat-reporting-thresholds.html).

This report should include the information of sales and purchases that enter or leave the company country. The information should be [based on the movement of goods but not on the invoices](https://tulli.fi/en/intrastat/what-data-is-declared-in-intrastat). We should include only moves from EU comunity members, so we need some way to determine if a country is EU member. Do you think this is something especific to the module or something that should be added to the country module?

The goods are identified by using the [CN8 classification](https://ec.europa.eu/taxation_customs/business/calculation-customs-duties/what-is-common-customs-tariff/combined-nomenclature_en). Not sure if this is the same as implemented on our customs module or a diferent classification.

In Spain we should at least the following data:

- Product Code
- From/To Country
- From/To sudvision
- Transaction type (can be determined from the shipment)
- Transport Mode: Air, Sea, train, etc.
- Delivery condition (Incoterm)
- Producs Weight
- Goods Amount

Each company should generate two reports for month: One for Imports and another for Exports.

Our tax authorities accepts a file format so you can upload all the records of the declaration using the file. Our objective is to generate this file from Tryton (like we do for other tax reports). So I think this feature should be implemented in the following way:

- A generic intrastat module that computes the common values for all intrastat declarations. This module should create a table\_query to easly compute the values for the reports.
- On the account\_es module we will include our custom fields and the report format to be able to export the files.

As this is common for europen countries I’m wondering if it makes sense to include it as part of account\_eu (with extra dependency on stock) or have a dedicated module for intrastat.

Does anyone have some sources of the fields required on other european countries so we can have a common fieldset to be used?

Toughts?

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [November 14, 2020, 11:48am UTC](https://discuss.tryton.org/t/intrastat-reporting/3456/2 "2020-11-14T11:48:06Z")

</div>

> [@pokoli](#):
>
> The information should be [based on the movement of goods but not on the invoices](https://tulli.fi/en/intrastat/what-data-is-declared-in-intrastat).

[In France and Italy, they include the services](https://en.wikipedia.org/wiki/Intrastat#Practicalities) and so it replace the EC Sale list.

> [@pokoli](#):
>
> Do you think this is something especific to the module or something that should be added to the country module?

As they are other supra-national group of countries like [Mercosur](https://en.wikipedia.org/wiki/Mercosur), [African Union](https://en.wikipedia.org/wiki/African_Union) etc.  
I think we could have a module `country_???` which permit to define group of countries. I think they should be based on date period.

> [@pokoli](#):
>
> The goods are identified by using the [CN8 classification](https://ec.europa.eu/taxation_customs/business/calculation-customs-duties/what-is-common-customs-tariff/combined-nomenclature_en). Not sure if this is the same as implemented on our customs module or a diferent classification.

For me it is the same code. The main difficulty is that the tariff code may depend on the country. I guess that inside the EU, the same code is always used. So I guess we will need to be able to match tariff code based on the EU group.

> [@pokoli](#):
>
> From/To sudvision

Not sure that the subdivision type to use is the same as the one enforced on the address.  
For example in Belgium the intrastat must use the region as subdivision but on postal address we use a lower level. So we will need to search the proper type on the parents.

> [@pokoli](#):
>
> Transaction type (can be determined from the shipment)

I’m wondering if the codes are the same for all countries.

> [@pokoli](#):
>
> - Transport Mode: Air, Sea, train, etc.
> - Delivery condition (Incoterm)

Those seem to be linked to the extended report. This seems to be linked to the amount per year. So I think we will need two reports.

> [@pokoli](#):
>
> Our tax authorities accepts a file format so you can upload all the records of the declaration using the file.

There is also a format for Belgium: [Declarations | National Bank of Belgium](https://www.nbb.be/en/statistics/foreign-trade/declarations)

> [@pokoli](#):
>
> A generic intrastat module that computes the common values for all intrastat declarations. This module should create a table\_query to easly compute the values for the reports.

I think the weight and tariff code should be stored on the move when it is done.

> [@pokoli](#):
>
> As this is common for europen countries I’m wondering if it makes sense to include it as part of account\_eu (with extra dependency on stock) or have a dedicated module for intrastat.

I think it is better to have a dedicated module, probably: `account_stock_eu`. Because not all companies need this if they do not sale goods or have an too small amount.  
And idem for specific countries like `account_stock_es`, `account_stock_be` etc.

---

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [January 12, 2021, 11:22am UTC](https://discuss.tryton.org/t/intrastat-reporting/3456/3 "2021-01-12T11:22:38Z")

</div>

> [@ced](#):
>
> > [@pokoli](#):
> >
> > Do you think this is something especific to the module or something that should be added to the country module?
> 
> As they are other supra-national group of countries like [Mercosur](https://en.wikipedia.org/wiki/Mercosur), [African Union](https://en.wikipedia.org/wiki/African_Union) etc.  
> I think we could have a module `country_???` which permit to define group of countries. I think they should be based on date period.

I’ve see that [python-stdnum now maintains a list of EU members](https://github.com/arthurdejong/python-stdnum/issues/238). Maybe we can use to populate such list in import country scripts.

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [January 12, 2021, 1:17pm UTC](https://discuss.tryton.org/t/intrastat-reporting/3456/4 "2021-01-12T13:17:28Z")

</div>

I do not think it is usable because it is missing the periods.  
As it is mainly to record the past, I do not see it as a problem to store them data in the module.

---

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [March 9, 2022, 8:55am UTC](https://discuss.tryton.org/t/intrastat-reporting/3456/5 "2022-03-09T08:55:31Z")

</div>

> [@ced](#):
>
> As they are other supra-national group of countries like [Mercosur](https://en.wikipedia.org/wiki/Mercosur), [African Union](https://en.wikipedia.org/wiki/African_Union) etc.  
> I think we could have a module `country_???` which permit to define group of countries. I think they should be based on date period.

A new discussion was created to implement such module: [Country grouping - #3 by maxx](https://discuss.tryton.org/t/country-grouping/5065/3)

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [October 19, 2022, 5:26pm UTC](https://discuss.tryton.org/t/intrastat-reporting/3456/6 "2022-10-19T17:26:10Z")

</div>

> [@pokoli](#):
>
> From/To sudvision

For me this is the subdivision where the warehouse is. But it is not clear what code should be used. In Belgium they define 1, 2, 3 (for Vlaams, Wallonia and Brussels) which are not the ISO code of those regions.  
Has anyone more information?

---

<div class="post-metadata">

### Author: ![bernat](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/b/9d8465/32.png) [@bernat](https://discuss.tryton.org/u/bernat)
#### Post date: [October 20, 2022, 6:48am UTC](https://discuss.tryton.org/t/intrastat-reporting/3456/7 "2022-10-20T06:48:07Z")

</div>

> [@ced](#):
>
> Has anyone more information?

In Spain is the same “the subdivision where the warehouse is” and has to use the locals code of the subdivision too (not ISO codes), that in our case is a code of our provinces composed by 2 digits [1]. In our case are the first 2 digits of ours postal codes.

The list presented at the beginning is missing some fields. The Incoterm code and the area in m2, since in some cases of codes (aranzel codes) it is mandatory to indicate the area in m2.

In Spain you can present the Intrastat in 2 formats:

- [EDIFACT](https://en.wikipedia.org/wiki/EDIFACT): it’s a standard and will be the best way for all.
- [CSV](https://www.ine.es/daco/daco42/codmun/cod_provincia_estandar.htm): special for Spain, I imagine. but allow more register per file.

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [October 20, 2022, 7:15am UTC](https://discuss.tryton.org/t/intrastat-reporting/3456/8 "2022-10-20T07:15:23Z")

</div>

> [@bernat](#):
>
> [EDIFACT](https://en.wikipedia.org/wiki/EDIFACT): it’s a standard and will be the best way for all.

For me it is not really a standard but only used in Spain: [https://sede.agenciatributaria.gob.es/static\_files/Sede/Procedimiento\_ayuda/DP01/intras03.pdf](https://sede.agenciatributaria.gob.es/static_files/Sede/Procedimiento_ayuda/DP01/intras03.pdf)  
They just got a standard document code.  
More over it is even not using the XML version of EDIFACT which is a pain to write.

---

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [October 20, 2022, 7:26am UTC](https://discuss.tryton.org/t/intrastat-reporting/3456/9 "2022-10-20T07:26:18Z")

</div>

> [@bernat](#):
>
> has to use the locals code of the subdivision too (not ISO codes), that in our case is a code of our provinces composed by 2 digits [1]. In our case are the first 2 digits of ours postal codes

We already have a [field to store such field for the parties](https://hg.tryton.org/modules/account_es/file/7db896752ed7/party.py#l10)

> [@bernat](#):
>
> [CSV](https://www.ine.es/daco/daco42/codmun/cod_provincia_estandar.htm): special for Spain, I imagine. but allow more register per file.

The CSV link points to a list of province codes. Could you please fix it?

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [October 20, 2022, 7:40am UTC](https://discuss.tryton.org/t/intrastat-reporting/3456/10 "2022-10-20T07:40:14Z")

</div>

> [@pokoli](#):
>
> We already have a [field to store such field for the parties](https://hg.tryton.org/modules/account_es/file/7db896752ed7/party.py#l10)

It will have to be removed for a more generic usage.  
Is it actually the same code as for Intrastat? Does it really need to be searchable?

I’m thinking about adding a “local code” to subdivision.

---

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [October 20, 2022, 8:17am UTC](https://discuss.tryton.org/t/intrastat-reporting/3456/11 "2022-10-20T08:17:19Z")

</div>

> [@ced](#):
>
> I’m thinking about adding a “local code” to subdivision.

Make sense but it should be a multivalue as in the case of multiple companies (one in belgium other in Spain) the value should be different depending on the company generating the report.

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [October 20, 2022, 8:43am UTC](https://discuss.tryton.org/t/intrastat-reporting/3456/12 "2022-10-20T08:43:59Z")

</div>

> [@pokoli](#):
>
> but it should be a multivalue as in the case of multiple companies (one in belgium other in Spain) the value should be different depending on the company generating the report.

No because we need only code for the country of the company and the code is the same for any company in the same country.

---

<div class="post-metadata">

### Author: ![bernat](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/b/9d8465/32.png) [@bernat](https://discuss.tryton.org/u/bernat)
#### Post date: [October 27, 2022, 12:27pm UTC](https://discuss.tryton.org/t/intrastat-reporting/3456/13 "2022-10-27T12:27:07Z")

</div>

Sorry for no answer before.

> [@ced](#):
>
> For me it is not really a standard but only used in Spain: [https://sede.agenciatributaria.gob.es/static\_files/Sede/Procedimiento\_ayuda/DP01/intras03.pdf](https://sede.agenciatributaria.gob.es/static_files/Sede/Procedimiento_ayuda/DP01/intras03.pdf)  
> They just got a standard document code.  
> More over it is even not using the XML version of EDIFACT which is a pain to write.

Oh, as I see they use the standard, I thought that it will be the same for all countries. In this case, I agree that it’s a pain. And, for Spain, it will better use the CSV that allow more registers.

> [@ced](#):
>
> I’m thinking about adding a “local code” to subdivision.

Will be a good solution. As you say, the value must be the same regardless of the company, because it depends on the party.

---

<div class="post-metadata">

### Author: ![bernat](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/b/9d8465/32.png) [@bernat](https://discuss.tryton.org/u/bernat)
#### Post date: [October 27, 2022, 12:29pm UTC](https://discuss.tryton.org/t/intrastat-reporting/3456/14 "2022-10-27T12:29:43Z")

</div>

> [@pokoli](#):
>
> The CSV link points to a list of province codes. Could you please fix it?

Sorry, I couldn’t edit the post.

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [October 27, 2022, 7:39pm UTC](https://discuss.tryton.org/t/intrastat-reporting/3456/15 "2022-10-27T19:39:51Z")

</div>

I have another question about the VAT number in the report. Of course it is needed only when it is linked to a business and not individual. But in the Belgium documentation, it is always filled with `QV999999999999`. This is also for the case where you do not know the VAT number at the time you received the goods. Is it also the case for other countries?

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [October 28, 2022, 7:19pm UTC](https://discuss.tryton.org/t/intrastat-reporting/3456/16 "2022-10-28T19:19:50Z")

</div>

Here is [Add Intrastat declaration (#11837) · Issues · Tryton / Tryton · GitLab](https://bugs.tryton.org/issue11837)

---

<div class="post-metadata">

### Author: ![bernat](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/b/9d8465/32.png) [@bernat](https://discuss.tryton.org/u/bernat)
#### Post date: [October 29, 2022, 7:59am UTC](https://discuss.tryton.org/t/intrastat-reporting/3456/17 "2022-10-29T07:59:22Z")

</div>

> [@ced](#):
>
> I have another question about the VAT number in the report. Of course it is needed only when it is linked to a business and not individual. But in the Belgium documentation, it is always filled with `QV999999999999`. This is also for the case where you do not know the VAT number at the time you received the goods. Is it also the case for other countries?

In Spain is something similar. We have 2 special prefix codes (QR and QV) but only used in special cases:

QR: Provisioning and fuel in the context of intra-Union trade. (Code for the supply to ships and aircraft)  
QV: Countries and territories not specified in the context of trade within the Union. (there are a list of the countries that don’t need the QV)

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [October 29, 2022, 8:03am UTC](https://discuss.tryton.org/t/intrastat-reporting/3456/18 "2022-10-29T08:03:17Z")

</div>

> [@bernat](#):
>
> QR: Provisioning and fuel in the context of intra-Union trade. (Code for the supply to ships and aircraft)  
> QV: Countries and territories not specified in the context of trade within the Union. (there are a list of the countries that don’t need the QV)

I do not understand what it means.

---

<div class="post-metadata">

### Author: ![bernat](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/b/9d8465/32.png) [@bernat](https://discuss.tryton.org/u/bernat)
#### Post date: [October 29, 2022, 9:26am UTC](https://discuss.tryton.org/t/intrastat-reporting/3456/19 "2022-10-29T09:26:29Z")

</div>

> [@ced](#):
>
> I do not understand what it means.

It’s means that de QV is only added to the VAT number in case that the country is not listed in a list. And it’s only added the QV, not the country code. The list, that we have in Spain, is titled as “Nomenclature of countries and territories for European statistics on the international trade of goods”, and says that it’s a list approved by the EU.

The QR is only used when the movement is a supply of provisioning or fuel in the Union. When is supplied to ships and planes.

The list that we have is extracted from [here](https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=uriserv:OJ.L_.2020.334.01.0002.01.ENG) in Annex I.

I don’t know if that explain better ¿?

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [October 29, 2022, 10:00am UTC](https://discuss.tryton.org/t/intrastat-reporting/3456/20 "2022-10-29T10:00:38Z")

</div>

> [@bernat](#):
>
> It’s means that de QV is only added to the VAT number in case that the country is not listed in a list.

It does not make sense to me. VAT number is only for companies inside the EU.

> [@bernat](#):
>
> The QR is only used

I do not understand what this means. Used for what? and how?
