Issue 9834

Title
Wrong VAT list identifier when using non eu_vat type
Priority
bug
Status
testing
Nosy list
ced, pokoli, reviewbot
Assigned to
pokoli
Keywords
review

Created on 2020-11-14.20:09:35 by pokoli, last changed 2 days ago by reviewbot.

Messages

Author: [hidden] (pokoli) Tryton committer Tryton translator
Date: 2020-11-30.14:38:52

Makes sense for me. I'm updated the review to match latests comments.

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2020-11-27.22:19:06
On 2020-11-27 20:39, Sergi Almacellas Abellana wrote:
> Indeed is the other way around, you have to declare some operation with a company or individual that has a tax number out of Spain but may have a residence in Spain. So I think we should use the country from the identifier.
> 
> >> Thanks why we do not include 'ES' for Spanish NIF nor ES European tax identifiers.
> >
> > I do not understand this.
> When the country is Spain (code 'ES') we should not include it on the declaration but leave it blank as the tax authority understands that it is a Spanish Number.

So the query should extract country only from eu_vat identifier and
leave blank in all other cases.
Author: [hidden] (pokoli) Tryton committer Tryton translator
Date: 2020-11-27.20:39:23

El 27/11/20 a les 18:55, C├ędric Krier ha escrit:

After diging into both documentation (VAT List and SII) I found the law which determines the country code that should be used:

https://www.boe.es/boe/dias/2011/12/26/pdfs/BOE-A-2011-20179.pdf (sorry spanish)

This law talks about the usage of non Spanish identifiers for parties, and states that we should use the "country of fiscal residence of the party".

But what is the "fiscal residence"? It is the "fiscal" for what?
For example if a EU company has requested a Spanish VAT number (because
it does a lot of sale in Spain). What is its "fiscal residence"? Because
its paid VAT in Spain but also VAT and income taxes in its own country.

In this case the fiscal residence is Spain because they have a Spanish VAT Number.
Indeed is the other way around, you have to declare some operation with a company or individual that has a tax number out of Spain but may have a residence in Spain. So I think we should use the country from the identifier.

Thanks why we do not include 'ES' for Spanish NIF nor ES European tax identifiers.

I do not understand this.
When the country is Spain (code 'ES') we should not include it on the declaration but leave it blank as the tax authority understands that it is a Spanish Number.

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2020-11-27.18:55:02
On 2020-11-27 18:21, Sergi Almacellas Abellana wrote:
> After diging into both documentation (VAT List and SII) I found the law which determines the country code that should be used:
> 
> https://www.boe.es/boe/dias/2011/12/26/pdfs/BOE-A-2011-20179.pdf (sorry spanish)
> 
> This law talks about the usage of non Spanish identifiers for parties, and states that we should use the "country of fiscal residence of the party".

But what is the "fiscal residence"? It is the "fiscal" for what?
For example if a EU company has requested a Spanish VAT number (because
it does a lot of sale in Spain). What is its "fiscal residence"? Because
its paid VAT in Spain but also VAT and income taxes in its own country.

> Thanks why we do not include 'ES' for Spanish NIF nor ES European tax identifiers.

I do not understand this.
Author: [hidden] (pokoli) Tryton committer Tryton translator
Date: 2020-11-27.18:21:18

After diging into both documentation (VAT List and SII) I found the law which determines the country code that should be used:

https://www.boe.es/boe/dias/2011/12/26/pdfs/BOE-A-2011-20179.pdf (sorry spanish)

This law talks about the usage of non Spanish identifiers for parties, and states that we should use the "country of fiscal residence of the party". Thanks why we do not include 'ES' for Spanish NIF nor ES European tax identifiers.

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2020-11-27.16:54:39

I do not know. It really depends on the exact definition of this country code.
If it is the country of the invoice address then of course it should be taken there. If it is the country of the tax identifier registration than it should be taken from the tax identifier.
This is two different information and we can not make any shortcut.

Author: [hidden] (pokoli) Tryton committer Tryton translator
Date: 2020-11-27.16:46:07

Indeed it is also require for issue9128 which does not depen on the vat_list_es but also linked to the invoice.
So instead of being a property of the tax_identifier it make be included as a property of the invoice which should work in both cases.

If we go this way, I think we can use the country code of the invoice_address to compute it.

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2020-11-27.16:35:19

I think the country code should be computed by the query of account.reporting.vat_list_es because it applied only for this use case and only for tax identifier linked on an invoice.

Author: [hidden] (pokoli) Tryton committer Tryton translator
Date: 2020-11-14.20:09:35

The VAT List report removes the first two digits from the identifier.

This is not correct when using a es_cif or es_nif identifier as this identifiers does not contain the country prefix.

issue9128 and issue8701 also require to manage both identifiers so I think we find a common solution for the problem. I think the best option is too add the three properties that we use in issue8701 on account_es module and use them on all reports.

History
Date User Action Args
2020-11-30 14:54:39reviewbotsetmessages: + msg62306
2020-11-30 14:38:52pokolisetmessages: + msg62304
2020-11-27 22:19:06cedsetmessages: + msg62255
2020-11-27 20:39:23pokolisetmessages: + msg62249
2020-11-27 18:55:02cedsetmessages: + msg62248
2020-11-27 18:21:18pokolisetmessages: + msg62247
2020-11-27 16:54:39cedsetmessages: + msg62244
2020-11-27 16:46:07pokolisetmessages: + msg62243
2020-11-27 16:35:19cedsetmessages: + msg62242
nosy: + ced
2020-11-21 13:16:15reviewbotsetmessages: + msg62082

Showing 10 items. Show all history (warning: this could be VERY long)