VatRate
extends VatRate
in package
VAT rate (`cms_system_vat_rates`) of a supply kind in a country for a validity period.
Lookup rule in VatRateLookup.
Scalar references only (supplyKindId, countryCode): the country is referenced by its
unique code, which Doctrine cannot map as an association (join columns must hit the PK).
Attributes
- #[Entity]
- #[Table]
- $name: 'cms_system_vat_rates'
- #[TableAlias]
- 'vatRate'
Table of Contents
Properties
- $countryCode : string
- $id : int|null
- $note : string|null
- $percents : string
- $supplyKindId : int
- $validFrom : DateTime
- $validTo : DateTime|null
Methods
- __construct() : mixed
- callInitMethods() : void
- Calls `init{TraitName}()` for every used trait that defines such a method.
- getAllTraits() : array<string, string>
- Returns all traits the class uses, including those used by parent classes and nested traits.
- getCountryCode() : string
- getId() : int|null
- getNote() : string|null
- getPercents() : string
- getSupplyKindId() : int
- getValidFrom() : DateTime
- getValidTo() : DateTime|null
- isPersisted() : bool
- setCountryCode() : $this
- setId() : $this
- setNote() : $this
- setPercents() : $this
- setSupplyKindId() : $this
- setValidFrom() : $this
- setValidTo() : $this
- getTraitsRecursive() : array<string, string>
- Walks the trait list recursively and collects nested traits too.
Properties
$countryCode
protected
string
$countryCode
= ''
Attributes
- #[Column]
- $name: 'country_code'
- $type: 'string'
- $length: 2
- $options: ['fixed' => true]
$id
protected
int|null
$id
= null
Attributes
- #[Column]
- $name: 'vat_rate_id'
- $type: 'integer'
- $options: ['unsigned' => true]
- #[GeneratedValue]
- #[Id]
$note
protected
string|null
$note
= null
Attributes
- #[Column]
- $name: 'note'
- $type: 'string'
- $length: 255
- $nullable: true
$percents
protected
string
$percents
= '0.00'
Attributes
- #[Column]
- $name: 'percents'
- $type: 'decimal'
- $precision: 5
- $scale: 2
$supplyKindId
protected
int
$supplyKindId
= 0
Attributes
- #[Column]
- $name: 'cms_system_supply_kinds_supply_kind_id'
- $type: 'integer'
- $options: ['unsigned' => true]
$validFrom
protected
DateTime
$validFrom
= new DateTime()
Attributes
- #[Column]
- $name: 'valid_from'
- $type: 'date'
$validTo
protected
DateTime|null
$validTo
= null
Attributes
- #[Column]
- $name: 'valid_to'
- $type: 'date'
- $nullable: true
Methods
__construct()
public
__construct([int|null $id = null ][, int $supplyKindId = 0 ][, string $countryCode = '' ][, string $percents = '0.00' ][, DateTime $validFrom = new DateTime() ][, DateTime|null $validTo = null ][, string|null $note = null ]) : mixed
Parameters
- $id : int|null = null
- $supplyKindId : int = 0
- $countryCode : string = ''
- $percents : string = '0.00'
- $validFrom : DateTime = new DateTime()
- $validTo : DateTime|null = null
- $note : string|null = null
callInitMethods()
Calls `init{TraitName}()` for every used trait that defines such a method.
public
callInitMethods() : void
getAllTraits()
Returns all traits the class uses, including those used by parent classes and nested traits.
public
getAllTraits() : array<string, string>
Return values
array<string, string>getCountryCode()
public
getCountryCode() : string
Return values
stringgetId()
public
getId() : int|null
Return values
int|nullgetNote()
public
getNote() : string|null
Return values
string|nullgetPercents()
public
getPercents() : string
Return values
stringgetSupplyKindId()
public
getSupplyKindId() : int
Return values
intgetValidFrom()
public
getValidFrom() : DateTime
Return values
DateTimegetValidTo()
public
getValidTo() : DateTime|null
Return values
DateTime|nullisPersisted()
public
isPersisted() : bool
Return values
boolsetCountryCode()
public
setCountryCode(string $countryCode) : $this
Parameters
- $countryCode : string
Return values
$thissetId()
public
setId(int|null $id) : $this
Parameters
- $id : int|null
Return values
$thissetNote()
public
setNote(string|null $note) : $this
Parameters
- $note : string|null
Return values
$thissetPercents()
public
setPercents(string $percents) : $this
Parameters
- $percents : string
Return values
$thissetSupplyKindId()
public
setSupplyKindId(int $supplyKindId) : $this
Parameters
- $supplyKindId : int
Return values
$thissetValidFrom()
public
setValidFrom(DateTime $validFrom) : $this
Parameters
- $validFrom : DateTime
Return values
$thissetValidTo()
public
setValidTo(DateTime|null $validTo) : $this
Parameters
- $validTo : DateTime|null
Return values
$thisgetTraitsRecursive()
Walks the trait list recursively and collects nested traits too.
private
static getTraitsRecursive(array<string, string> $traits) : array<string, string>
Parameters
- $traits : array<string, string>