diff --git a/local/modules/CustomerVatNumber/I18n/fr_FR.php b/local/modules/CustomerVatNumber/I18n/fr_FR.php index 5bc00198..df2d2555 100755 --- a/local/modules/CustomerVatNumber/I18n/fr_FR.php +++ b/local/modules/CustomerVatNumber/I18n/fr_FR.php @@ -1,7 +1,7 @@ 'Si vous êtres un professionnel, indiquez votre N° de TVA Intracommunautaire', + 'Please enter a valid VAT number.' => 'Si vous êtes un professionnel, indiquez votre N° de TVA Intracommunautaire', 'VAT Number' => 'N° de TVA Intracommunautaire', 'Your VAT Number' => 'Votre N° de TVA', ); diff --git a/local/modules/NoVatForCompanies/TaxType/PricePercentTaxType.php b/local/modules/NoVatForCompanies/TaxType/PricePercentTaxType.php index 9ae0cb83..26426ae8 100644 --- a/local/modules/NoVatForCompanies/TaxType/PricePercentTaxType.php +++ b/local/modules/NoVatForCompanies/TaxType/PricePercentTaxType.php @@ -49,7 +49,9 @@ class PricePercentTaxType extends BaseTaxType // Ne sont soumis à une TVA réduite que les pros en Europe (hors France) possédant une n° de TVA intracommunautaire if (null == $reseller && null == $company) return ($this->getRequirement("percent_france") * 0.01); - if (null == CustomerVatNumberQuery::create()->findOneById($customer->getId())) return ($this->getRequirement("percent_france") * 0.01); + + $customerVatNumber = CustomerVatNumberQuery::create()->findOneById($customer->getId())->getVatNumber(); + if ((null == $customerVatNumber) || !isset($customerVatNumber)) return ($this->getRequirement("percent_france") * 0.01); } return ($this->getRequirement("percent_zero") * 0.01);