CoolCMS API

SellerTaxStatus extends SellerTaxStatus
in package

VAT status of a seller valid from a date (`cms_mod_invoicer_seller_tax_statuses`). A status applies from `validFrom` until the day before the next row of the same seller; the lookup lives in {@see \App\Core\Traits\Shared\Models\Entities\Collections\TaxStatusCollectionTrait::findTaxStatusOn()} (entity graph) and `SellerRepository::findTaxStatusHistory()` (raw DBAL, engine / generators).

Values mirror the Api enum App\UI\Api\System\Models\Enums\SellerVatStatus (Shared must not depend on the Api layer).

Attributes
#[Entity]
#[Table]
$name: 'cms_mod_invoicer_seller_tax_statuses'
#[TableAlias]
'sellerTaxStatus'

Table of Contents

Constants

STATUS_IDENTIFIED  : string = 'identified'
STATUS_NON_PAYER  : string = 'non_payer'
STATUS_PAYER  : string = 'payer'
STATUSES  : array<string|int, mixed> = [self::STATUS_PAYER, self::STATUS_IDENTIFIED, s...

Properties

$createdAt  : DateTime
$createdByUserId  : int|null
$id  : int|null
$note  : string|null
$seller  : Seller|null
$sellerId  : int|null
$validFrom  : DateTime
$vatStatus  : string

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.
getCreatedAt()  : DateTime
getCreatedByUserId()  : int|null
getId()  : int|null
getNote()  : string|null
getSeller()  : Seller|null
getSellerId()  : int|null
getValidFrom()  : DateTime
getVatStatus()  : string
isPayer()  : bool
isPersisted()  : bool
setCreatedAt()  : $this
setCreatedByUserId()  : $this
setId()  : $this
setNote()  : $this
setSeller()  : self
setSellerId()  : $this
setValidFrom()  : $this
setVatStatus()  : $this
getTraitsRecursive()  : array<string, string>
Walks the trait list recursively and collects nested traits too.

Constants

STATUSES

public array<string|int, mixed> STATUSES = [self::STATUS_PAYER, self::STATUS_IDENTIFIED, self::STATUS_NON_PAYER]

Properties

$createdAt

protected DateTime $createdAt = new DateTime()
Attributes
#[Column]
$name: 'created_at'
$type: 'datetime'

$createdByUserId

protected int|null $createdByUserId = null
Attributes
#[Column]
$name: 'created_by_user_id'
$type: 'integer'
$nullable: true
$options: ['unsigned' => true]

$id

protected int|null $id = null
Attributes
#[Column]
$name: 'seller_tax_status_id'
$type: 'integer'
$options: ['unsigned' => true]
#[GeneratedValue]
#[Id]

$note

protected string|null $note = null
Attributes
#[Column]
$name: 'note'
$type: 'string'
$length: 255
$nullable: true

$seller

protected Seller|null $seller = null
Attributes
#[JoinColumn]
$name: 'cms_mod_invoicer_sellers_seller_id'
$referencedColumnName: 'seller_id'
$onDelete: 'CASCADE'
#[ManyToOne]
$targetEntity: \App\UI\Api\Invoicer\Models\Entities\Seller::class
$inversedBy: 'taxStatuses'

$sellerId

protected int|null $sellerId = null
Attributes
#[Column]
$name: 'cms_mod_invoicer_sellers_seller_id'
$type: 'integer'
$insertable: false
$updatable: false
$nullable: true
$options: ['unsigned' => true]

$validFrom

protected DateTime $validFrom = new DateTime()
Attributes
#[Column]
$name: 'valid_from'
$type: 'date'

$vatStatus

protected string $vatStatus = self::STATUS_NON_PAYER
Attributes
#[Column]
$name: 'vat_status'
$type: 'string'
$length: 20

Methods

__construct()

public __construct([int|null $id = null ][, int|null $sellerId = null ][, string $vatStatus = self::STATUS_NON_PAYER ][, DateTime $validFrom = new DateTime() ][, string|null $note = null ][, int|null $createdByUserId = null ][, DateTime $createdAt = new DateTime() ]) : mixed
Parameters
$id : int|null = null
$sellerId : int|null = null
$vatStatus : string = self::STATUS_NON_PAYER
$validFrom : DateTime = new DateTime()
$note : string|null = null
$createdByUserId : int|null = null
$createdAt : DateTime = new DateTime()

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>

getCreatedAt()

public getCreatedAt() : DateTime
Return values
DateTime

getCreatedByUserId()

public getCreatedByUserId() : int|null
Return values
int|null

getSellerId()

public getSellerId() : int|null
Return values
int|null

getValidFrom()

public getValidFrom() : DateTime
Return values
DateTime

setCreatedAt()

public setCreatedAt(DateTime $createdAt) : $this
Parameters
$createdAt : DateTime
Return values
$this

setCreatedByUserId()

public setCreatedByUserId(int|null $createdByUserId) : $this
Parameters
$createdByUserId : int|null
Return values
$this

setId()

public setId(int|null $id) : $this
Parameters
$id : int|null
Return values
$this

setNote()

public setNote(string|null $note) : $this
Parameters
$note : string|null
Return values
$this

setSellerId()

public setSellerId(int|null $sellerId) : $this
Parameters
$sellerId : int|null
Return values
$this

setValidFrom()

public setValidFrom(DateTime $validFrom) : $this
Parameters
$validFrom : DateTime
Return values
$this

setVatStatus()

public setVatStatus(string $vatStatus) : $this
Parameters
$vatStatus : string
Return values
$this

getTraitsRecursive()

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>
Return values
array<string, string>
On this page

Search results