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#
| Property | Type | Description |
|---|---|---|
$items readonly | list<OpenItem> | |
$openingBalance readonly | ?Brick\Money\Money | |
$period readonly | Period |
Methods#
| Method | Description |
|---|---|
->__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,
)| Parameter | Type | Description |
|---|---|---|
$period | Period | |
$items | list<OpenItem> | |
$openingBalance | ?Brick\Money\Money = null |
balance()#
public function balance(string $currency): MoneyOpening balance plus the open amounts of all listed items.
| Parameter | Type | Description |
|---|---|---|
$currency | string |
- Returns
Brick\Money\Money
openItems()#
public function openItems(): list<OpenItem>- Returns
list<OpenItem>