TaxLineResult
in package
Read onlyYes
FinalYes
Resolved line: treatment + base. The engine does no line arithmetic except the gross price split: `grossPrice` line โ `base = money(gross รท (1 + rate))`, `vat = gross โ base`; base line โ `base = amount`, `vat = null` (the consumer multiplies by the PD rounding rules).
Table of Contents
Properties
- $base : numeric-string
- $error : TaxError|null
- $index : int
- $line : TaxLine
- $treatment : TaxTreatment|null
- Null only when the supply kind is unknown (error SUPPLY_KIND_MISSING).
- $vat : numeric-string|null
Methods
- __construct() : mixed
- toArray() : array<string, mixed>
Properties
$base
public
numeric-string
$base
$error
public
TaxError|null
$error
= null
$index
public
int
$index
$line
public
TaxLine
$line
$treatment
Null only when the supply kind is unknown (error SUPPLY_KIND_MISSING).
public
TaxTreatment|null
$treatment
$vat
public
numeric-string|null
$vat
Methods
__construct()
public
__construct(int $index, TaxLine $line, TaxTreatment|null $treatment, string $base, string|null $vat[, TaxError|null $error = null ]) : mixed
Parameters
- $index : int
- $line : TaxLine
- $treatment : TaxTreatment|null
- $base : string
- $vat : string|null
- $error : TaxError|null = null
toArray()
public
toArray() : array<string, mixed>