Ejemplo n.º 1
0
 /**
  * Checks whether provided customer needs to be taxed.
  *
  * @param Entity $customer Customer to check.
  *
  * @return boolean Whether customer needs to be taxed.
  */
 public function isTaxable(Entity $customer)
 {
     $country = $this->options->get('general.country');
     $customerCountry = $customer->getTaxAddress()->getCountry();
     if (Country::isEU($country)) {
         return Country::isEU($customerCountry);
     }
     return $country == $customerCountry;
 }