Beispiel #1
0
 /**
  * get vat for user of a foreign country
  *
  * @param oxUser    $oUser    given user object
  * @param oxCountry $oCountry given country object
  *
  * @return mixed
  */
 protected function _getForeignCountryUserVat(oxUser $oUser, oxCountry $oCountry)
 {
     if ($oCountry->isInEU()) {
         if ($oUser->oxuser__oxustid->value) {
             return 0;
         }
         return false;
     }
     return 0;
 }
 /**
  * Compares country VAT identification number with it's prefix.
  *
  * @param array     $aInvAddress
  * @param oxCountry $oCountry
  *
  * @deprecated since v5.2 (2014-07-28); This logic was moved to oxCompanyVatInValidator
  *
  * @return bool
  */
 private function _isVATIdentificationNumberInvalid($aInvAddress, $oCountry)
 {
     return (bool) strncmp($aInvAddress['oxuser__oxustid'], $oCountry->getVATIdentificationNumberPrefix(), 2);
 }