Zum Inhalt springen

API reference / Quittio \ Core \ Tax

CustomTaxPreset

final readonly class in quittio/core · implements TaxPreset

Quittio\Core\Tax\CustomTaxPreset · Source

Ad-hoc tax preset, e.g. for an exemption with a specific legal reference.

Methods#

MethodDescription
->__construct()
->category()
->exemptionReason()The text of the locale, else of its language ("de" for "de_CH"), else the English or the first one.
->exemptionReasonCode()
->key()
::make()
->rate()

__construct()#

public function __construct(
    string $key,
    VatCategory $category,
    ?BigDecimal $rate = null,
    VatExemptionReasonCode|RawCode|null $code = null,
    array<string, string> $reasons = [],
)
ParameterTypeDescription
$keystring
$categoryVatCategory
$rate?Brick\Math\BigDecimal = null
$codeVatExemptionReasonCode|RawCode|null = null
$reasonsarray<string, string> = []exemption reason text per locale

category()#

public function category(): VatCategory
Returns
VatCategory

exemptionReason()#

public function exemptionReason(?string $locale = null): ?string

The text of the locale, else of its language ("de" for "de_CH"), else the English or the first one.

ParameterTypeDescription
$locale?string = null
Returns
?string

exemptionReasonCode()#

public function exemptionReasonCode(): VatExemptionReasonCode|RawCode|null
Returns
VatExemptionReasonCode|RawCode|null

key()#

public function key(): string
Returns
string

make()#

public static function make(
    string $key,
    VatCategory $category,
    BigDecimal|int|float|string|null $rate = null,
    VatExemptionReasonCode|RawCode|string|null $code = null,
    array<string, string>|string|null $reason = null,
): self

static

ParameterTypeDescription
$keystring
$categoryVatCategory
$rateBrick\Math\BigDecimal|int|float|string|null = null
$codeVatExemptionReasonCode|RawCode|string|null = null
$reasonarray<string, string>|string|null = null
Returns
self

rate()#

public function rate(): ?BigDecimal
Returns
?Brick\Math\BigDecimal

Die Open-Core-Pakete stehen unter der MIT-Lizenz. Die rechtlichen Formulierungen der Länderpakete sind mit einer Steuerberatung abzustimmen.