Inspect
in package
FinalYes
Helpers shared by the rule sets.
Table of Contents
Methods
- categories() : array<int, VatCategory>
- VAT categories used by lines, document allowances and charges.
- filled() : bool
- isZero() : bool
- linesIn() : array<int, InvoiceLine>
- uses() : bool
- vatPrefix() : string
- Country prefix of a VAT identifier; Greece uses "EL".
- withoutLinesByProfile() : bool
- 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.
Methods
categories()
VAT categories used by lines, document allowances and charges.
public
static categories(InvoiceData $invoice) : array<int, VatCategory>
Parameters
- $invoice : InvoiceData
Return values
array<int, VatCategory>filled()
public
static filled(string|null $value) : bool
Parameters
- $value : string|null
Return values
boolisZero()
public
static isZero(BigDecimal|null $value) : bool
Parameters
- $value : BigDecimal|null
Return values
boollinesIn()
public
static linesIn(InvoiceData $invoice, VatCategory $category) : array<int, InvoiceLine>
Parameters
- $invoice : InvoiceData
- $category : VatCategory
Return values
array<int, InvoiceLine>uses()
public
static uses(InvoiceData $invoice, VatCategory $category) : bool
Parameters
- $invoice : InvoiceData
- $category : VatCategory
Return values
boolvatPrefix()
Country prefix of a VAT identifier; Greece uses "EL".
public
static vatPrefix(string $vatId) : string
Parameters
- $vatId : string
Return values
stringwithoutLinesByProfile()
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.
public
static withoutLinesByProfile(InvoiceData $invoice, RuleReporter $report) : bool
Parameters
- $invoice : InvoiceData
- $report : RuleReporter