Skip to content

API reference / Quittio \ Core \ Dunning

ReferenceRates

interface in quittio/core

Quittio\Core\Dunning\ReferenceRates · Source

The reference interest rate of a country's late payment law, e.g. the German Basiszinssatz (section 247 BGB) or the ECB main refinancing rate. Default interest is the reference rate plus the points of the DunningLaw.

Methods#

MethodDescription
->periods()Periods with a constant rate between two dates (inclusive start, exclusive end).
->rateOn()The rate in percent on the date.

periods()#

public function periods(
    Date $from,
    Date $until,
): list<array{from: Date, until: Date, rate: BigDecimal}>

Periods with a constant rate between two dates (inclusive start, exclusive end).

ParameterTypeDescription
$fromDate
$untilDate
Returns
list<array{from: Date, until: Date, rate: Brick\Math\BigDecimal}>
Throws
InvalidArgumentException – when no rate is known for part of the time

rateOn()#

public function rateOn(Date $date): BigDecimal

The rate in percent on the date.

ParameterTypeDescription
$dateDate
Returns
Brick\Math\BigDecimal
Throws
InvalidArgumentException – when no rate is known for the date

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