LineVat
in package
uses
Immutable
Read onlyYes
FinalYes
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.
Table of Contents
Properties
- $category : VatCategory
- $exemptionReason : string|null
- $exemptionReasonCode : VatExemptionReasonCode|RawCode|null
- $presetKey : string|null
- $rate : BigDecimal|null
Methods
- __construct() : mixed
- groupKey() : string
- Key of the VAT group (category and rate) this line belongs to.
- key() : string
- with() : static
- Returns a copy with the given properties replaced.
Properties
$category
public
VatCategory
$category
Attributes
- #[Bt]
- 'BT-151'
- #[Cardinality]
- '1'
- #[Cii]
- 'ram:ApplicableTradeTax/ram:CategoryCode'
- #[Level]
- ProfileLevel::Basic
- #[Ubl]
- 'cac:ClassifiedTaxCategory/cbc:ID'
$exemptionReason
public
string|null
$exemptionReason
= null
Attributes
- #[Internal]
$exemptionReasonCode
public
VatExemptionReasonCode|RawCode|null
$exemptionReasonCode
= null
Attributes
- #[Internal]
$presetKey
public
string|null
$presetKey
= null
Attributes
- #[Internal]
$rate
public
BigDecimal|null
$rate
= null
Attributes
- #[Bt]
- 'BT-152'
- #[Cardinality]
- '0..1'
- #[Cii]
- 'ram:ApplicableTradeTax/ram:RateApplicablePercent'
- #[Level]
- ProfileLevel::Basic
- #[Ubl]
- 'cac:ClassifiedTaxCategory/cbc:Percent'
Methods
__construct()
public
__construct(VatCategory $category[, BigDecimal|null $rate = null ][, string|null $exemptionReason = null ][, VatExemptionReasonCode|RawCode|null $exemptionReasonCode = null ][, string|null $presetKey = null ]) : mixed
Parameters
- $category : VatCategory
- $rate : BigDecimal|null = null
- $exemptionReason : string|null = null
- $exemptionReasonCode : VatExemptionReasonCode|RawCode|null = null
- $presetKey : string|null = null
groupKey()
Key of the VAT group (category and rate) this line belongs to.
public
groupKey() : string
Return values
stringkey()
public
static key(VatCategory $category, BigDecimal|null $rate) : string
Parameters
- $category : VatCategory
- $rate : BigDecimal|null
Return values
stringwith()
Returns a copy with the given properties replaced.
public
with(array<string, mixed> $changes) : static
Parameters
- $changes : array<string, mixed>