CoolCMS API

TaxSnapshotTrait

Tax snapshot: the lean column set of the VAT engine.

The columns have the same names on the payment (cms_system_payments) and the invoice (cms_mod_invoicer_invoices), so the invoice generator copies them 1:1. The snapshot is not recomputed after creation: what the customer saw at payment is what the invoice shows. A null tax_treatment marks a record from before the engine (legacy).

IMPORTANT: all fields are #[ExternalReadonly]. The engine determines them on the server (payment form through the internal bridge, invoice generator); an external Api client must not write them.

Table of Contents

Properties

$customerVatIdCheckId  : int|null
Applied VAT id check (`cms_system_vat_id_checks`): consultation number or manual proof.
$customerVatIdOutageCheckId  : int|null
Record of a VIES outage on the supply date.
$customerVatIdVerified  : bool|null
Null means the VAT id does not matter (empty or domestic); false is unverified; true is verified.
$customerVatIdVerifiedAt  : DateTime|null
$summaryReportCode  : string|null
Supply code for the summary report (`3` services, `0` goods); null means it is not reported.
$taxCountryCode  : string|null
Country of the applied rate (null without VAT).
$taxDate  : DateTime|null
Date of the rate and of the seller status.
$taxFlags  : array<int, string>|null
$taxNote  : string|null
Note in the document language (plus Czech), resolved at creation.
$taxTreatment  : string|null
Treatment code; on a payment also the markers `INTERMEDIARY` and `CREDIT_REDEMPTION`.

Methods

getCustomerVatIdCheckId()  : int|null
getCustomerVatIdOutageCheckId()  : int|null
getCustomerVatIdVerified()  : bool|null
getCustomerVatIdVerifiedAt()  : DateTime|null
getSummaryReportCode()  : string|null
getTaxCountryCode()  : string|null
getTaxDate()  : DateTime|null
getTaxFlags()  : array<int, string>|null
getTaxNote()  : string|null
getTaxTreatment()  : string|null
hasTaxFlag()  : bool
setCustomerVatIdCheckId()  : static
setCustomerVatIdOutageCheckId()  : static
setCustomerVatIdVerified()  : static
setCustomerVatIdVerifiedAt()  : static
setSummaryReportCode()  : static
setTaxCountryCode()  : static
setTaxDate()  : static
setTaxFlags()  : static
setTaxNote()  : static
setTaxTreatment()  : static

Properties

$customerVatIdCheckId

Applied VAT id check (`cms_system_vat_id_checks`): consultation number or manual proof.

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

$customerVatIdOutageCheckId

Record of a VIES outage on the supply date.

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

$customerVatIdVerified

Null means the VAT id does not matter (empty or domestic); false is unverified; true is verified.

protected bool|null $customerVatIdVerified = null
Attributes
#[Column]
$name: 'customer_vat_id_verified'
$type: 'boolean'
$nullable: true
#[ExternalReadonly]

$customerVatIdVerifiedAt

protected DateTime|null $customerVatIdVerifiedAt = null
Attributes
#[Column]
$name: 'customer_vat_id_verified_at'
$type: 'datetime'
$nullable: true
#[ExternalReadonly]

$summaryReportCode

Supply code for the summary report (`3` services, `0` goods); null means it is not reported.

protected string|null $summaryReportCode = null
Attributes
#[Column]
$name: 'summary_report_code'
$type: 'string'
$length: 1
$nullable: true
$options: ['fixed' => true]
#[ExternalReadonly]

$taxCountryCode

Country of the applied rate (null without VAT).

protected string|null $taxCountryCode = null
Attributes
#[Column]
$name: 'tax_country_code'
$type: 'string'
$length: 2
$nullable: true
$options: ['fixed' => true]
#[ExternalReadonly]

$taxDate

Date of the rate and of the seller status.

protected DateTime|null $taxDate = null
Attributes
#[Column]
$name: 'tax_date'
$type: 'date'
$nullable: true
#[ExternalReadonly]

$taxFlags

protected array<int, string>|null $taxFlags = null

TaxFlag codes

Attributes
#[Column]
$name: 'tax_flags'
$type: 'json'
$nullable: true
#[ExternalReadonly]

$taxNote

Note in the document language (plus Czech), resolved at creation.

protected string|null $taxNote = null
Attributes
#[Column]
$name: 'tax_note'
$type: 'text'
$nullable: true
#[ExternalReadonly]

$taxTreatment

Treatment code; on a payment also the markers `INTERMEDIARY` and `CREDIT_REDEMPTION`.

protected string|null $taxTreatment = null
Attributes
#[Column]
$name: 'tax_treatment'
$type: 'string'
$length: 24
$nullable: true
#[ExternalReadonly]

Methods

getCustomerVatIdCheckId()

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

getCustomerVatIdOutageCheckId()

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

getCustomerVatIdVerified()

public getCustomerVatIdVerified() : bool|null
Return values
bool|null

getCustomerVatIdVerifiedAt()

public getCustomerVatIdVerifiedAt() : DateTime|null
Return values
DateTime|null

getSummaryReportCode()

public getSummaryReportCode() : string|null
Return values
string|null

getTaxCountryCode()

public getTaxCountryCode() : string|null
Return values
string|null

getTaxDate()

public getTaxDate() : DateTime|null
Return values
DateTime|null

getTaxFlags()

public getTaxFlags() : array<int, string>|null
Return values
array<int, string>|null

getTaxNote()

public getTaxNote() : string|null
Return values
string|null

getTaxTreatment()

public getTaxTreatment() : string|null
Return values
string|null

hasTaxFlag()

public hasTaxFlag(string $flag) : bool
Parameters
$flag : string
Return values
bool

setCustomerVatIdCheckId()

public setCustomerVatIdCheckId(int|null $customerVatIdCheckId) : static
Parameters
$customerVatIdCheckId : int|null
Return values
static

setCustomerVatIdOutageCheckId()

public setCustomerVatIdOutageCheckId(int|null $customerVatIdOutageCheckId) : static
Parameters
$customerVatIdOutageCheckId : int|null
Return values
static

setCustomerVatIdVerified()

public setCustomerVatIdVerified(bool|null $customerVatIdVerified) : static
Parameters
$customerVatIdVerified : bool|null
Return values
static

setCustomerVatIdVerifiedAt()

public setCustomerVatIdVerifiedAt(DateTime|null $customerVatIdVerifiedAt) : static
Parameters
$customerVatIdVerifiedAt : DateTime|null
Return values
static

setSummaryReportCode()

public setSummaryReportCode(string|null $summaryReportCode) : static
Parameters
$summaryReportCode : string|null
Return values
static

setTaxCountryCode()

public setTaxCountryCode(string|null $taxCountryCode) : static
Parameters
$taxCountryCode : string|null
Return values
static

setTaxDate()

public setTaxDate(DateTime|null $taxDate) : static
Parameters
$taxDate : DateTime|null
Return values
static

setTaxFlags()

public setTaxFlags(array<int, string>|null $taxFlags) : static
Parameters
$taxFlags : array<int, string>|null
Return values
static

setTaxNote()

public setTaxNote(string|null $taxNote) : static
Parameters
$taxNote : string|null
Return values
static

setTaxTreatment()

public setTaxTreatment(string|null $taxTreatment) : static
Parameters
$taxTreatment : string|null
Return values
static
On this page

Search results