Open comaiteseb opened 5 days ago
I think so. Can you check if this patch is ok for you: 61e83828696823219c636d756ef1178a60df1699
Hi @eldy , It seems to be ok.
Thank's
Hi, @eldy Can you make a MR on 19.0 branch please ? (version where I create this issue) Thank's
Bug
When you are in the mode SERVICE_ARE_ECOMMERCE_200238EC activated, you must vetiled TVA on account spécified here : /admin/dict.php?id=10&from=accountancy&search_country_id=1&mainmenu=accountancy&leftmenu=accountancy_admin
But it doesn't work and return the seller country account.
I think we need to add condition on the SERVICE_ARE_ECOMMERCE_200238EC in the getTaxedFromId function in core/lib/functions.lib.php line 6597. And use
$buyer->country_code rather than seller->country_code
And when this function is called line 227 in accountancy/journal/sellsjournal.php, change :
$vatdata = getTaxesFromId($tax_id, $mysoc, $mysoc, 0);
by$vatdata = getTaxesFromId($tax_id, $mysoc, $thirdparty, 0);
we need to create a $thirdparty object just before.
In fact if we want to respect UE legacy, we need to use delivery country address linked into the invoice contact and if not, use the thirdparty country.
see : https://www.impots.gouv.fr/professionnel/achatvente-de-biens
Dolibarr Version
19.3
Environment PHP
No response
Environment Database
No response
Steps to reproduce the behavior and expected behavior
No response
Attached files
No response