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#
| Method | Description |
|---|---|
->__construct() | |
->__invoke() |
__construct()#
public function __construct(CountryRegistry $countries, TaxPreset|null $preset = null)| Parameter | Type | Description |
|---|---|---|
$countries | CountryRegistry | |
$preset | TaxPreset|null = null | the configured default (Laravel: quittio.defaults.vat) |
__invoke()#
public function __invoke(?string $sellerCountry, bool $smallBusiness): ?TaxPreset| Parameter | Type | Description |
|---|---|---|
$sellerCountry | ?string | |
$smallBusiness | bool |
- Returns
?TaxPreset