Skip to content

API reference / Quittio \ Core \ Validation \ Rules

Inspect

final class in quittio/core

Quittio\Core\Validation\Rules\Inspect · Source

Helpers shared by the rule sets.

Methods#

MethodDescription
::categories()VAT categories used by lines, document allowances and charges.
::filled()
::isZero()
::linesIn()
::uses()
::vatPrefix()Country prefix of a VAT identifier; Greece uses "EL".
::withoutLinesByProfile()MINIMUM and BASIC WL carry no invoice lines (BG-25): line based rules do not apply to documents of these profiles without lines, e.g. when they are read.

categories()#

public static function categories(InvoiceData $invoice): list<VatCategory>

static

VAT categories used by lines, document allowances and charges.

ParameterTypeDescription
$invoiceInvoiceData
Returns
list<VatCategory>

filled()#

public static function filled(?string $value): bool

static

ParameterTypeDescription
$value?string
Returns
bool

isZero()#

public static function isZero(?BigDecimal $value): bool

static

ParameterTypeDescription
$value?Brick\Math\BigDecimal
Returns
bool

linesIn()#

public static function linesIn(
    InvoiceData $invoice,
    VatCategory $category,
): list<InvoiceLine>

static

ParameterTypeDescription
$invoiceInvoiceData
$categoryVatCategory
Returns
list<InvoiceLine>

uses()#

public static function uses(InvoiceData $invoice, VatCategory $category): bool

static

ParameterTypeDescription
$invoiceInvoiceData
$categoryVatCategory
Returns
bool

vatPrefix()#

public static function vatPrefix(string $vatId): string

static

Country prefix of a VAT identifier; Greece uses "EL".

ParameterTypeDescription
$vatIdstring
Returns
string

withoutLinesByProfile()#

public static function withoutLinesByProfile(
    InvoiceData $invoice,
    RuleReporter $report,
): bool

static

MINIMUM and BASIC WL carry no invoice lines (BG-25): line based rules do not apply to documents of these profiles without lines, e.g. when they are read.

ParameterTypeDescription
$invoiceInvoiceData
$reportRuleReporter
Returns
bool

The open core packages are MIT licensed. The legal wording of the country packs must be confirmed by a tax adviser.