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#
| Method | Description |
|---|---|
::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>VAT categories used by lines, document allowances and charges.
| Parameter | Type | Description |
|---|---|---|
$invoice | InvoiceData |
- Returns
list<VatCategory>
filled()#
public static function filled(?string $value): bool| Parameter | Type | Description |
|---|---|---|
$value | ?string |
- Returns
bool
isZero()#
public static function isZero(?BigDecimal $value): bool| Parameter | Type | Description |
|---|---|---|
$value | ?Brick\Math\BigDecimal |
- Returns
bool
linesIn()#
public static function linesIn(
InvoiceData $invoice,
VatCategory $category,
): list<InvoiceLine>| Parameter | Type | Description |
|---|---|---|
$invoice | InvoiceData | |
$category | VatCategory |
- Returns
list<InvoiceLine>
uses()#
public static function uses(InvoiceData $invoice, VatCategory $category): bool| Parameter | Type | Description |
|---|---|---|
$invoice | InvoiceData | |
$category | VatCategory |
- Returns
bool
vatPrefix()#
public static function vatPrefix(string $vatId): stringCountry prefix of a VAT identifier; Greece uses "EL".
| Parameter | Type | Description |
|---|---|---|
$vatId | string |
- Returns
string
withoutLinesByProfile()#
public static function withoutLinesByProfile(
InvoiceData $invoice,
RuleReporter $report,
): boolMINIMUM 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.
| Parameter | Type | Description |
|---|---|---|
$invoice | InvoiceData | |
$report | RuleReporter |
- Returns
bool