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#
| Property | Type | Description |
|---|---|---|
$category readonly | VatCategory | |
$exemptionReason readonly | ?string | |
$exemptionReasonCode readonly | VatExemptionReasonCode|RawCode|null | |
$presetKey readonly | ?string | |
$rate readonly | ?Brick\Math\BigDecimal |
Methods#
| Method | Description |
|---|---|
->__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,
)| Parameter | Type | Description |
|---|---|---|
$category | VatCategory | |
$rate | ?Brick\Math\BigDecimal = null | |
$exemptionReason | ?string = null | |
$exemptionReasonCode | VatExemptionReasonCode|RawCode|null = null | |
$presetKey | ?string = null |
groupKey()#
public function groupKey(): stringKey of the VAT group (category and rate) this line belongs to.
- Returns
string
key()#
public static function key(VatCategory $category, ?BigDecimal $rate): string| Parameter | Type | Description |
|---|---|---|
$category | VatCategory | |
$rate | ?Brick\Math\BigDecimal |
- Returns
string
with()#
public function with(array<string, mixed> $changes): staticReturns a copy with the given properties replaced.
| Parameter | Type | Description |
|---|---|---|
$changes | array<string, mixed> |
- Returns
static