CustomTaxPreset
in package
implements
TaxPreset
Read onlyYes
FinalYes
Ad-hoc tax preset, e.g. for an exemption with a specific legal reference.
Table of Contents
Interfaces
- TaxPreset
- A named VAT treatment provided by a country pack, e.g. "standard rate 19 %" or "small business exemption". Presets set category, rate, VATEX code and legal note text.
Methods
- __construct() : mixed
- category() : VatCategory
- VAT category (BT-151).
- exemptionReason() : string|null
- Exemption reason text (BT-120), shown in XML and PDF.
- exemptionReasonCode() : VatExemptionReasonCode|RawCode|null
- VATEX code of the exemption reason (BT-121); null for taxed supplies.
- key() : string
- Stable key, prefixed with the country code, e.g. "de.standard".
- make() : self
- rate() : BigDecimal|null
- VAT rate in percent (BT-152); null for categories without a rate (e.g. O).
Methods
__construct()
public
__construct(string $key, VatCategory $category[, BigDecimal|null $rate = null ][, VatExemptionReasonCode|RawCode|null $code = null ][, array<string, string> $reasons = [] ]) : mixed
Parameters
- $key : string
- $category : VatCategory
- $rate : BigDecimal|null = null
- $code : VatExemptionReasonCode|RawCode|null = null
- $reasons : array<string, string> = []
-
exemption reason text per locale
category()
VAT category (BT-151).
public
category() : VatCategory
Return values
VatCategoryexemptionReason()
Exemption reason text (BT-120), shown in XML and PDF.
public
exemptionReason([string|null $locale = null ]) : string|null
Parameters
- $locale : string|null = null
Return values
string|nullexemptionReasonCode()
VATEX code of the exemption reason (BT-121); null for taxed supplies.
public
exemptionReasonCode() : VatExemptionReasonCode|RawCode|null
Return values
VatExemptionReasonCode|RawCode|nullkey()
Stable key, prefixed with the country code, e.g. "de.standard".
public
key() : string
Return values
stringmake()
public
static 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
Parameters
- $key : string
- $category : VatCategory
- $rate : BigDecimal|int|float|string|null = null
- $code : VatExemptionReasonCode|RawCode|string|null = null
- $reason : array<string, string>|string|null = null
Return values
selfrate()
VAT rate in percent (BT-152); null for categories without a rate (e.g. O).
public
rate() : BigDecimal|null