Skip to content

API reference / Quittio \ Core \ Data \ Lines

LineVat

final readonly class in quittio/core · uses Immutable

Quittio\Core\Data\Lines\LineVat · Source

Line VAT information (BG-30).

The exemption reason and code are package-internal inputs: EN 16931 carries them on the VAT breakdown (BT-120, BT-121), the calculator copies them there.

Properties#

PropertyTypeDescription
$category readonlyVatCategory
$exemptionReason readonly?string
$exemptionReasonCode readonlyVatExemptionReasonCode|RawCode|null
$presetKey readonly?string
$rate readonly?Brick\Math\BigDecimal

Methods#

MethodDescription
->__construct()
->groupKey()Key of the VAT group (category and rate) this line belongs to.
::key()
->with()Returns a copy with the given properties replaced.

__construct()#

public function __construct(
    VatCategory $category,
    ?BigDecimal $rate = null,
    ?string $exemptionReason = null,
    VatExemptionReasonCode|RawCode|null $exemptionReasonCode = null,
    ?string $presetKey = null,
)
ParameterTypeDescription
$categoryVatCategory
$rate?Brick\Math\BigDecimal = null
$exemptionReason?string = null
$exemptionReasonCodeVatExemptionReasonCode|RawCode|null = null
$presetKey?string = null

groupKey()#

public function groupKey(): string

Key of the VAT group (category and rate) this line belongs to.

Returns
string

key()#

public static function key(VatCategory $category, ?BigDecimal $rate): string

static

ParameterTypeDescription
$categoryVatCategory
$rate?Brick\Math\BigDecimal
Returns
string

with()#

public function with(array<string, mixed> $changes): static

Returns a copy with the given properties replaced.

ParameterTypeDescription
$changesarray<string, mixed>
Returns
static

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