Skip to content

API reference / Quittio \ Core \ Documents

AccountStatement

final readonly class in quittio/core

Quittio\Core\Documents\AccountStatement · Source

Account statement for a customer: open and paid invoices of a period.

The balance is the opening balance plus the open amounts of the listed items. The opening balance is the balance at the start of the period, so it already contains every invoice dated before the period: with an opening balance, only items dated within the period may be listed. Without an opening balance the statement is an open item list and may list older items. Items dated after the end of the period are never accepted.

Properties#

PropertyTypeDescription
$items readonlylist<OpenItem>
$openingBalance readonly?Brick\Money\Money
$period readonlyPeriod

Methods#

MethodDescription
->__construct()
->balance()Opening balance plus the open amounts of all listed items.
->openItems()

__construct()#

public function __construct(
    Period $period,
    list<OpenItem> $items,
    ?Money $openingBalance = null,
)
ParameterTypeDescription
$periodPeriod
$itemslist<OpenItem>
$openingBalance?Brick\Money\Money = null

balance()#

public function balance(string $currency): Money

Opening balance plus the open amounts of all listed items.

ParameterTypeDescription
$currencystring
Returns
Brick\Money\Money

openItems()#

public function openItems(): list<OpenItem>
Returns
list<OpenItem>

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