Fix: not object error with option SERVICE_ARE_ECOMMERCE_200238EC
This commit is contained in:
parent
a30dd12cc0
commit
0f6506d457
@ -3181,19 +3181,19 @@ class Form
|
|||||||
//print "name=$name, selectedrate=$selectedrate, seller=".$societe_vendeuse->country_code." buyer=".$societe_acheteuse->country_code." buyer is company=".$societe_acheteuse->isACompany()." idprod=$idprod, info_bits=$info_bits type=$type";
|
//print "name=$name, selectedrate=$selectedrate, seller=".$societe_vendeuse->country_code." buyer=".$societe_acheteuse->country_code." buyer is company=".$societe_acheteuse->isACompany()." idprod=$idprod, info_bits=$info_bits type=$type";
|
||||||
//exit;
|
//exit;
|
||||||
|
|
||||||
// Get list of all VAT rates to show
|
// Define list of countries to use to search VAT rates to show
|
||||||
// First we defined code_pays to use to find list
|
// First we defined code_pays to use to find list
|
||||||
if (is_object($societe_vendeuse))
|
if (is_object($societe_vendeuse))
|
||||||
{
|
{
|
||||||
$code_pays="'".$societe_vendeuse->country_code."'";
|
$code_pays="'".$societe_vendeuse->country_code."'";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$code_pays="'".$mysoc->country_code."'"; // Pour compatibilite ascendente
|
$code_pays="'".$mysoc->country_code."'"; // Pour compatibilite ascendente
|
||||||
}
|
}
|
||||||
if (! empty($conf->global->SERVICE_ARE_ECOMMERCE_200238EC)) // If option to have vat for end customer for services is on
|
if (! empty($conf->global->SERVICE_ARE_ECOMMERCE_200238EC)) // If option to have vat for end customer for services is on
|
||||||
{
|
{
|
||||||
if (! $societe_vendeuse->isInEEC() && $societe_acheteuse->isInEEC() && ! $societe_acheteuse->isACompany())
|
if (! $societe_vendeuse->isInEEC() && (! is_object($societe_acheteuse) || ($societe_acheteuse->isInEEC() && ! $societe_acheteuse->isACompany())))
|
||||||
{
|
{
|
||||||
// We also add the buyer
|
// We also add the buyer
|
||||||
if (is_numeric($type))
|
if (is_numeric($type))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user