Mpociot\VatCalculator\VatCalculator::getTaxRateForCountry PHP Method

getTaxRateForCountry() public method

This method is used to allow backwards compatibility.
public getTaxRateForCountry ( $countryCode, boolean $company = false ) : float
$countryCode
$company boolean
return float
    public function getTaxRateForCountry($countryCode, $company = false)
    {
        return $this->getTaxRateForLocation($countryCode, null, $company);
    }

Usage Example

Example #1
0
 /**
  * Get the tax percentage to apply to the subscription.
  *
  * @return int
  */
 public function taxPercentage()
 {
     if (!Spark::collectsEuropeanVat()) {
         return 0;
     }
     $vatCalculator = new VatCalculator();
     $vatCalculator->setBusinessCountryCode(Spark::homeCountry());
     return $vatCalculator->getTaxRateForCountry($this->card_country, !empty($this->vat_id)) * 100;
 }
All Usage Examples Of Mpociot\VatCalculator\VatCalculator::getTaxRateForCountry