Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

International invoice VAT for EU seller with EU customers #20788

Open
xabitrigo opened this issue May 6, 2022 · 4 comments
Open

International invoice VAT for EU seller with EU customers #20788

xabitrigo opened this issue May 6, 2022 · 4 comments
Labels
Bug This is a bug (something does not work as expected)

Comments

@xabitrigo
Copy link
Contributor

Bug

International buys should allow VAT types for both the origin and destination countries. According to this: https://ec.europa.eu/taxation_customs/business/vat/vat-e-commerce_en both cases are possible.

This can be activated via the option SERVICE_ARE_ECOMMERCE_200238EC (https://wiki.dolibarr.org/index.php/Setup_Other#Services_Module) , but it only seems to be working for predefined items, and not for free text products or services.

I think the problem may be in the line 5903 of tile htdocs/core/class/html.form.class.php

if (!isInEEC($societe_vendeuse) && (!is_object($societe_acheteuse) || (isInEEC($societe_acheteuse) && !$societe_acheteuse->isACompany()))) {

if I remove the "not" from the first isInEEC I can see the VAT for both countries

This is related to issue #12557

Environment Version

15.0.1

Environment OS

Ubuntu 20.04

Environment Web server

Apache

Environment PHP

7.4.29 FPM/FastCGI

Environment Database

PostgreSQL 12.10 (Ubuntu 12.10-0ubuntu0.20.04.1)

Environment URL(s)

No response

Expected and actual behavior

To see the VAT for both countries

Steps to reproduce the behavior

  • Install dolibarr
  • Set up the company as a Spanish company
  • Add a client from Italy
  • Create an Invoice
  • You should be able to use Italy 22% VAT, but it's not visible

Attached files

No response

@xabitrigo xabitrigo added the Bug This is a bug (something does not work as expected) label May 6, 2022
@lemathou
Copy link

lemathou commented Jun 21, 2022

I'm working on it at the moment... The conditions seems to be bugged.
First, it should also work for products and it is not, and second this prevents the main enterprise configured in Dolibarr (sender/seller) to be in EEC, which is nonsense... !isInEEC($societe_vendeuse).

I think we should replace :
if (!isInEEC($societe_vendeuse) && (!is_object($societe_acheteuse) || (isInEEC($societe_acheteuse) && !$societe_acheteuse->isACompany()))) {
with
if (isInEEC($societe_vendeuse) && (is_object($societe_acheteuse) && (isInEEC($societe_acheteuse) && !$societe_acheteuse->isACompany()))) {

and after :
if ($type == 1)
with
if ($type == 1 || $type == 0)

Or, better make it work with every product line, and some services (except shipping, and any others if I understood well the rules)

@Ludovicode42
Copy link

Informations:

Dolibarr 15.0.3
SERVICE_ARE_ECOMMERCE_200238EC = 1

On Sales Order, Sales Proposal and Invoice, when modifying a line with VAT outside of France (e.g. Germany), the VAT goes from 19% to 0% .

Example with a German third party,

Product added with good VAT :

image

If you click on the pencil, the VAT is set to 0 and the German VAT is not proposed :

image

If you don't make any changes and validate the order, everything is fine (VAT at 19%). If you want to create an invoice for a fixed amount on account, the VAT will also appear at 0% :

image

image

@ErikRakhorst
Copy link

any progress on this?
I still see the same behavior as described above with 17.0.0

@ksar-ksar
Copy link
Contributor

Hello,

Is it still the case on V18 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is a bug (something does not work as expected)
Projects
None yet
Development

No branches or pull requests

5 participants