Fix option SERVICE_ARE_ECOMMERCE_200238EC (#35372)

This commit is contained in:
Francis Appels 2025-09-17 18:19:52 +02:00 committed by GitHub
parent c5451242e7
commit 7920cf8596
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -6440,7 +6440,7 @@ class Form
}
if (!empty($conf->global->SERVICE_ARE_ECOMMERCE_200238EC)) { // If option to have vat for end customer for services is on
require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php';
if (!isInEEC($societe_vendeuse) && (!is_object($societe_acheteuse) || (isInEEC($societe_acheteuse) && !$societe_acheteuse->isACompany()))) {
if (is_object($societe_vendeuse) && is_object($societe_acheteuse) && isInEEC($societe_vendeuse) && isInEEC($societe_acheteuse) && !$societe_acheteuse->isACompany()) {
// We also add the buyer country code
if (is_numeric($type)) {
if ($type == 1) { // We know product is a service