Dunning
in package
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.
Table of Contents
Properties
- $deadline : Date|null
- $fees : array<string|int, mixed>
- $interest : array<string|int, mixed>
- $level : int
- $openItems : array<string|int, mixed>
Methods
- __construct() : mixed
- feeTotal() : Money
- interestTotal() : Money
- openInvoiceNumbers() : array<int, string>
- Invoice numbers of the items that are still open, e.g. for the remittance information.
- openTotal() : Money
- remittanceText() : 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).
- total() : Money
- Amount to pay: open items plus fees plus interest (no VAT on fees and interest).
Properties
$deadline
public
Date|null
$deadline
= null
$fees
public
array<string|int, mixed>
$fees
= []
Attributes
- #[ListOf]
- DunningFee::class
$interest
public
array<string|int, mixed>
$interest
= []
Attributes
- #[ListOf]
- InterestCharge::class
$level
public
int
$level
$openItems
public
array<string|int, mixed>
$openItems
Attributes
- #[ListOf]
- OpenItem::class
Methods
__construct()
public
__construct(int $level, array<int, OpenItem> $openItems[, Date|null $deadline = null ][, array<int, DunningFee> $fees = [] ][, array<int, InterestCharge> $interest = [] ]) : mixed
Parameters
- $level : int
- $openItems : array<int, OpenItem>
- $deadline : Date|null = null
- $fees : array<int, DunningFee> = []
- $interest : array<int, InterestCharge> = []
feeTotal()
public
feeTotal(string $currency) : Money
Parameters
- $currency : string
Return values
MoneyinterestTotal()
public
interestTotal(string $currency) : Money
Parameters
- $currency : string
Return values
MoneyopenInvoiceNumbers()
Invoice numbers of the items that are still open, e.g. for the remittance information.
public
openInvoiceNumbers() : array<int, string>
Return values
array<int, string>openTotal()
public
openTotal(string $currency) : Money
Parameters
- $currency : string
Return values
MoneyremittanceText()
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).
public
remittanceText([int $maxLength = 140 ]) : string
Parameters
- $maxLength : int = 140
Return values
stringtotal()
Amount to pay: open items plus fees plus interest (no VAT on fees and interest).
public
total(string $currency) : Money
This is the amount for a payment QR code of the reminder.
Parameters
- $currency : string