CoolCMS API

TaxRuleTable
in package

FinalYes

The rule table of the VAT engine.

Pure function, no I/O: status × customer class × nature × EU B2C threshold → one row.

Every branch names its rule table row (row:) and is covered 1:1 by tests/Unit/System/TaxRuleTableTest.php. Rules still pending advisor confirmation are marked "pending advisor confirmation" in comments — a change is one place here plus one data-provider row in the test.

"Domestic" always means the seller's country (sellers.country_code), so the table is symmetric for a non-CZ seller.

Table of Contents

Methods

decide()  : TaxRuleRow
findNoteKey()  : string|null
Note key of a snapshotted code (the invoice generator re-translates the note in the document language): the same keys the table puts on its rows; `DOMESTIC` has none.
buildDomestic()  : TaxRuleRow
buildNonPayer()  : TaxRuleRow
buildNoteKey()  : string
`tax.note.<CODE>`; the non-payer code differs by seller status (`.identified` / `.non_payer`).
buildOutsideScope()  : TaxRuleRow
buildReverseCharge()  : TaxRuleRow
decideNotPayer()  : TaxRuleRow
decidePayer()  : TaxRuleRow

Methods

decide()

public decide(SellerVatStatus $status, CustomerClass $customerClass, SupplyNature $nature[, bool $euB2cThresholdExceeded = false ][, bool|null $supplyPlaceDomestic = null ]) : TaxRuleRow
Parameters
$status : SellerVatStatus
$customerClass : CustomerClass
$nature : SupplyNature
$euB2cThresholdExceeded : bool = false

T: limit EU_B2C_DISTANCE exceeded (previous year, or this year including this supply); without an active limit false

$supplyPlaceDomestic : bool|null = null

place of supply is in the seller's country — for immovable_service the property country, for goods the dispatch country; null = derive from the customer class (domestic class ⇒ true)

Return values
TaxRuleRow

buildOutsideScope()

private buildOutsideScope(int $row, bool $countsTurnover) : TaxRuleRow
Parameters
$row : int
$countsTurnover : bool
Return values
TaxRuleRow
On this page

Search results