TaxResolution
in package
Read onlyYes
FinalYes
Result of {@see \App\UI\Api\System\Models\Managers\TaxManager::resolve()}.
header = treatment of the main supply (line with the highest base; first wins a tie) with
chargeVat = any line charges VAT and flags = union of all flags. Null only without lines.
Table of Contents
Properties
- $customerCountryCode : string
- $errors : array<string|int, mixed>
- $flags : array<string|int, mixed>
- $header : TaxTreatment|null
- $lines : array<string|int, mixed>
- $sellerCountryCode : string
- $sellerStatus : SellerVatStatus
- $taxDate : DateTimeImmutable
- $vatId : VatIdVerification|null
Methods
- __construct() : mixed
- hasErrors() : bool
- hasFlag() : bool
- toArray() : array<string, mixed>
Properties
$customerCountryCode
public
string
$customerCountryCode
$errors
public
array<string|int, mixed>
$errors
$flags
public
array<string|int, mixed>
$flags
$header
public
TaxTreatment|null
$header
$lines
public
array<string|int, mixed>
$lines
$sellerCountryCode
public
string
$sellerCountryCode
$sellerStatus
public
SellerVatStatus
$sellerStatus
$taxDate
public
DateTimeImmutable
$taxDate
$vatId
public
VatIdVerification|null
$vatId
Methods
__construct()
public
__construct(array<int, TaxLineResult> $lines, TaxTreatment|null $header, SellerVatStatus $sellerStatus, string $sellerCountryCode, string $customerCountryCode, DateTimeImmutable $taxDate, array<int, TaxFlag> $flags, array<int, TaxError> $errors, VatIdVerification|null $vatId) : mixed
Parameters
- $lines : array<int, TaxLineResult>
- $header : TaxTreatment|null
- $sellerStatus : SellerVatStatus
- $sellerCountryCode : string
- $customerCountryCode : string
- $taxDate : DateTimeImmutable
- $flags : array<int, TaxFlag>
- $errors : array<int, TaxError>
- $vatId : VatIdVerification|null
hasErrors()
public
hasErrors() : bool
Return values
boolhasFlag()
public
hasFlag(TaxFlag $flag) : bool
Parameters
- $flag : TaxFlag
Return values
booltoArray()
public
toArray() : array<string, mixed>