CoolCMS API

TaxTreatment
in package

Read onlyYes
FinalYes

Resolved treatment of one line (or the document header).

Table of Contents

Properties

$chargeVat  : bool
$code  : TaxTreatmentCode
$countsDomesticTurnover  : bool
$countsEuB2cThreshold  : bool
$customerClass  : CustomerClass
$flags  : array<string|int, mixed>
$noteKey  : string|null
$rateCountryCode  : string|null
Whose rate was used; null = no rate.
$requireCustomerVatId  : bool
$ruleRow  : int
$summaryReport  : bool
$summaryReportCode  : string|null
$vatId  : VatIdVerification|null
$vatPercents  : string
'21.00'; '0.00' when VAT is not charged (or the rate is missing — see the line error).

Methods

__construct()  : mixed
toArray()  : array<string, mixed>
withFlags()  : self
Copy with additional flags (distinct) — header / display treatments carry the resolution-wide flags.

Properties

$countsDomesticTurnover

public bool $countsDomesticTurnover

$rateCountryCode

Whose rate was used; null = no rate.

public string|null $rateCountryCode

$summaryReportCode

public string|null $summaryReportCode

$vatPercents

'21.00'; '0.00' when VAT is not charged (or the rate is missing — see the line error).

public string $vatPercents

Methods

__construct()

public __construct(TaxTreatmentCode $code, bool $chargeVat, numeric-string $vatPercents, string|null $rateCountryCode, string|null $noteKey, bool $requireCustomerVatId, bool $summaryReport, string|null $summaryReportCode, bool $countsEuB2cThreshold, bool $countsDomesticTurnover, array<int, TaxFlag> $flags, VatIdVerification|null $vatId, CustomerClass $customerClass, int $ruleRow) : mixed
Parameters
$code : TaxTreatmentCode
$chargeVat : bool
$vatPercents : numeric-string
$rateCountryCode : string|null
$noteKey : string|null
$requireCustomerVatId : bool
$summaryReport : bool
$summaryReportCode : string|null
$countsEuB2cThreshold : bool
$countsDomesticTurnover : bool
$flags : array<int, TaxFlag>
$vatId : VatIdVerification|null
$customerClass : CustomerClass
$ruleRow : int

toArray()

public toArray() : array<string, mixed>
Return values
array<string, mixed>

withFlags()

Copy with additional flags (distinct) — header / display treatments carry the resolution-wide flags.

public withFlags(array<int, TaxFlag> $flags[, bool|null $chargeVat = null ][, VatIdVerification|null $vatId = null ]) : self
Parameters
$flags : array<int, TaxFlag>
$chargeVat : bool|null = null
$vatId : VatIdVerification|null = null
Return values
self
On this page

Search results