From b68523b9c1333504fbc851c22accb167efca2451 Mon Sep 17 00:00:00 2001 From: gauthier Date: Thu, 13 Sep 2018 14:12:31 +0200 Subject: [PATCH] FIX : According to french law, if seller is in France and buyer isn't in UE and isn't a company, TVA used = TVA product --- htdocs/core/lib/functions.lib.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index f27c1fbf0a0..26a34af374b 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -4744,6 +4744,11 @@ function get_default_tva(Societe $thirdparty_seller, Societe $thirdparty_buyer, } } + // Si (vendeur en France et acheteur hors Communaute europeenne et acheteur particulier) alors TVA par defaut=TVA du produit vendu. Fin de regle + if($seller_country_code === 'FR' && empty($buyer_in_cee) && !$thirdparty_buyer->isACompany()) { + return get_product_vat_for_country($idprod,$thirdparty_seller,$idprodfournprice); + } + // Sinon la TVA proposee par defaut=0. Fin de regle. // Rem: Cela signifie qu'au moins un des 2 est hors Communaute europeenne et que le pays differe //print 'VATRULE 5';