Skip to content

API reference / Quittio \ Core \ Documents

Dunning

final readonly class in quittio/core

Quittio\Core\Documents\Dunning · Source

Data of a payment reminder: open items, fees, interest and the new deadline.

Level 0 is a friendly payment reminder (Zahlungserinnerung), level 1 the first formal reminder (1. Mahnung), level 2 the second and so on.

Fees and default interest are damages, not consideration for a supply: they carry no VAT, and total() adds them without VAT.

Properties#

PropertyTypeDescription
$deadline readonly?Date
$fees readonlylist<DunningFee>
$interest readonlylist<InterestCharge>
$level readonlyint
$openItems readonlylist<OpenItem>

Methods#

MethodDescription
->__construct()
->feeTotal()Sum of the dunning fees in $currency (no VAT).
->interestTotal()Sum of the default interest charges in $currency (no VAT).
->openInvoiceNumbers()Invoice numbers of the items that are still open, e.g. for the remittance information.
->openTotal()Sum of the amounts still open of all open items in $currency; overpaid items and credits reduce it.
->remittanceText()Remittance information for a payment of the reminder: the open invoice numbers, separated by commas, with as many complete numbers as fit into $maxLength (140 characters for SEPA and the EPC QR code).
->total()Amount to pay: open items plus fees plus interest (no VAT on fees and interest). This is the amount for a payment QR code of the reminder.

__construct()#

public function __construct(
    int $level,
    list<OpenItem> $openItems,
    ?Date $deadline = null,
    list<DunningFee> $fees = [],
    list<InterestCharge> $interest = [],
)
ParameterTypeDescription
$levelint
$openItemslist<OpenItem>
$deadline?Date = null
$feeslist<DunningFee> = []
$interestlist<InterestCharge> = []

feeTotal()#

public function feeTotal(string $currency): Money

Sum of the dunning fees in $currency (no VAT).

ParameterTypeDescription
$currencystring
Returns
Brick\Money\Money
Throws
InvalidArgumentException – when a fee is in another currency

interestTotal()#

public function interestTotal(string $currency): Money

Sum of the default interest charges in $currency (no VAT).

ParameterTypeDescription
$currencystring
Returns
Brick\Money\Money
Throws
InvalidArgumentException – when an interest charge is in another currency

openInvoiceNumbers()#

public function openInvoiceNumbers(): list<string>

Invoice numbers of the items that are still open, e.g. for the remittance information.

Returns
list<string>

openTotal()#

public function openTotal(string $currency): Money

Sum of the amounts still open of all open items in $currency; overpaid items and credits reduce it.

ParameterTypeDescription
$currencystring
Returns
Brick\Money\Money
Throws
InvalidArgumentException – when an open item is in another currency

remittanceText()#

public function remittanceText(int $maxLength = 140): string

Remittance information for a payment of the reminder: the open invoice numbers, separated by commas, with as many complete numbers as fit into $maxLength (140 characters for SEPA and the EPC QR code).

ParameterTypeDescription
$maxLengthint = 140
Returns
string

total()#

public function total(string $currency): Money

Amount to pay: open items plus fees plus interest (no VAT on fees and interest). This is the amount for a payment QR code of the reminder.

ParameterTypeDescription
$currencystring
Returns
Brick\Money\Money

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