Returns whether the vat rate is a 0 vat rate.

@param int|array $vatRate
An integer (or numeric string), an array possibly containing an entry
with key Tag::VatRate entry

@return bool
True if the vat rate is a 0 vat rate, false otherwise.
184595
protected function is0VatRate($vatRate)
    {
        if (is_array($vatRate) && isset($vatRate)) {
            $vatRate = isset($vatRate[Tag::VatRate]) ? $vatRate[Tag::VatRate] : null;
        }
        return isset($vatRate) && (Number::isZero($vatRate) || Number::floatsAreEqual($vatRate, -1.0));
    }
397057
public function detect($userAgent = null, $validate = false) {
		$this->report = $this->_report;
		
		if($userAgent === null) {
			$userAgent =  $_SERVER['HTTP_USER_AGENT'];
		}
		
		if (!is_string($userAgent)) {
			return false;	
		}
		$this->report['ua'] = $userAgent;
		preg_match_all($this->_patterns['parser'],$userAgent,$this->data);
		
		$this->data = (isset($this->data[0])) ? $this->data[0] : false;
		
		//$this->isValid == false;
		if ($this->data === false) {
			return false;
		}
		
		try {
			$this->checkProduct();
			$this->checkOs();
			
		} catch (Exception $e) {
			
		}
		
	
		return $this->report;
	}
565648
public function checkRequired()
    {
        if (is_array($this->value)) {
            return (bool) $this->value;
        }

        $value = (string) $this->value;

        return $this->value || $value === '0';
    }
663861
public function taxTotal($formatted = true)
    {
        $taxTotal = 0.00;
        $cartProducts = $this->getSession();
        foreach ($cartProducts as $product) {
            $taxTotal += $product->tax();
        }

        if ($formatted == true) {
            $symbol = Session::get('currency_symbol');
            return  $symbol . number_format($taxTotal, 2);
        }

        return $taxTotal;
    }
30738
public function validateCreatedAt($createdAt)
    {
        if (empty($createdAt)) {
            $this->addError('createdAt', 'Creation date and time cannot be empty');
            return false;
        }

        if (!$createdAt instanceof \DateTime) {
            $this->addError('createdAt', 'The creation date has to be and instance of \DateTime');
            return false;
        }

        return true;
    }
841525
public boolean isZeroVATAllowed (@Nonnull final Locale aCountry, final boolean bUndefinedValue)
  {
    ValueEnforcer.notNull (aCountry, "Country");

    // first get locale specific VAT types
    final VATCountryData aVATCountryData = getVATCountryData (aCountry);
    return aVATCountryData != null ? aVATCountryData.isZeroVATAllowed () : bUndefinedValue;
  }
1336862
private function validateNew(string $vatNumber): bool
    {
        $multiplier = 34;
        $substractor = 100;
        if (ctype_digit($vatNumber[0])) {
            $multiplier = 24;
            $substractor = 10;
        }

        $checkCharacter = array_flip(str_split($this->alphabet));
        $checkval = ($checkCharacter[$vatNumber[0]] * $multiplier) + $checkCharacter[$vatNumber[1]] - $substractor;

        return (((intval(substr($vatNumber, 2)) + ($checkval / 11) + 1) % 11) == $checkval % 11);
    }
156544
public function validateVatNumber(string $vatNumber) : bool
    {
       return $this->validateVatNumberFormat($vatNumber) && $this->validateVatNumberExistence($vatNumber);
    }
650354
public static function TtcToHt($price, $tax, bool $taxIsPercent = false)
    {
        if ($taxIsPercent) {
            $tax = $tax / 100;
        }
        return $price / (1 + $tax);
    }
796169
public function validateVatNumberFormat(string $vatNumber) : bool
    {
        if ($vatNumber === '') {
            return false;
        }

        $vatNumber = strtoupper($vatNumber);
        $country = substr($vatNumber, 0, 2);
        $number = substr($vatNumber, 2);

        if (! isset($this->patterns[$country]) ) {
            return false;
        }

        $matches = preg_match('/^' . $this->patterns[$country] . '$/', $number) > 0;
        return $matches;
    }
341832
private function validateNational(string $vatNumber): int
    {
        $checkval = 0;

        for ($i = 2; $i <= 8; $i++) {
            $checkval += $this->crossSum((int)$vatNumber[9 - $i] * ($this->isEven($i) ? 2 : 1));
        }

        $checkval = 10 - ($checkval % 10);

        return $checkval % 10;
    }
1020648
public function validate(array $data)
    {
        $validator = $this->getValidator();
        if (!$validator->count()) {
            //@codingStandardsIgnoreStart
            $validator = @$this->validator();
        }
        $this->_errors = $validator->errors($data);

        return count($this->_errors) === 0;
    }
395836
public function expired()
    {
        if (empty($this->expiresOn)) {
            return false;
        }

        return AnDomainAttributeDate::getInstance()->toDate()->compare($this->expiresOn) > 0;
    }
110813
public function getVat() : ?float 
    {
        if ( ! $this->hasVat()) {
            $this->setVat($this->getDefaultVat());
        }
        return $this->vat;
    }
118501
def total_vat(self):
        """"""
        q = Vat.objects.filter(receipt=self).aggregate(total=Sum('amount'))
        return q['total'] or 0
1297868
public function isEmptyDate($sDate)
    {
        if (!empty($sDate)) {
            $sDate = preg_replace("/[^0-9a-z]/i", "", $sDate);
            if (!is_numeric($sDate) || $sDate != 0) {
                return false;
            }
        }

        return true;
    }
563862
static function fetchCountByVatType( $vatID )
    {
        $rows = eZPersistentObject::fetchObjectList( eZVatRule::definition(),
                                                     array(),
                                                     array( 'vat_type' => (int) $vatID ),
                                                     false,
                                                     null,
                                                     false,
                                                     false,
                                                     array( array( 'operation' => 'count( * )',
                                                                   'name' => 'count' ) ) );
        return $rows[0]['count'];
    }