Skip to content

API reference / Quittio \ Core \ Tax

CountryDefaultVat

final readonly class in quittio/core

Quittio\Core\Tax\CountryDefaultVat · Source

Default VAT of lines without VAT treatment, for InvoiceBuilder::useDefaultVat():

  • invoices of small businesses (Meta::FLAG_SMALL_BUSINESS): the small business preset of the seller's country pack (CountryDefaults::$smallBusinessVatPreset, Germany: de.small_business), otherwise $preset;
  • all other invoices: $preset, otherwise the preset of the seller's country pack (CountryDefaults::$vatPreset, Germany: de.standard).

InvoiceBuilder::useDefaultVat(new CountryDefaultVat($quittio->countries()));

Methods#

MethodDescription
->__construct()
->__invoke()

__construct()#

public function __construct(CountryRegistry $countries, TaxPreset|null $preset = null)
ParameterTypeDescription
$countriesCountryRegistry
$presetTaxPreset|null = nullthe configured default (Laravel: quittio.defaults.vat)

__invoke()#

public function __invoke(?string $sellerCountry, bool $smallBusiness): ?TaxPreset
ParameterTypeDescription
$sellerCountry?string
$smallBusinessbool
Returns
?TaxPreset

The open core packages are MIT licensed. The legal wording of the country packs must be confirmed by a tax adviser.