Skip to content

API reference / Quittio \ Country \ DE \ Dunning

BaseRateTable

final readonly class in quittio/country-de · implements ReferenceRates

Quittio\Country\DE\Dunning\BaseRateTable · Source

Basiszinssatz according to section 247 BGB, published by the Deutsche Bundesbank and changed on 1 January and 1 July. Rates after the last entry are added with withRate(), BaseRates::register() or, in Laravel, the configuration quittio.countries.de.base_rates and the command quittio:base-rate:update (BundesbankBaseRates).

Constants#

ConstantValueDescription
PUBLISHED['2023-01-01' => '1.62', '2023-07-01' => '3.12', '2024-01-01' => '3.62', '2024-07-01' => '3.37', '2025-01-01' => '2.27', '2025-07-01' => '1.27', '2026-01-01' => …Known rates in percent, keyed by the first day of validity.

Methods#

MethodDescription
->__construct()
->lastChange()Date of the most recent known rate, e.g. to warn when the table is outdated.
->periods()Periods with a constant rate between two dates (inclusive start, exclusive end). A table entry that keeps the rate (e.g. 2026-01-01) does not start a new period.
->rateOn()The base rate changes on 1 January and 1 July (section 247 (1) sentence 2 BGB). Dates from the next scheduled change after the last known rate on are unknown and rejected.
->validUntil()First day for which the table has no rate: the next 1 January or 1 July after the last change.
->withRate()A copy with a rate in percent from $from on, e.g. a newly published rate.

__construct()#

public function __construct(array<string, string> $rates = self::PUBLISHED)
ParameterTypeDescription
$ratesarray<string, string> = self::PUBLISHEDISO date => rate in percent

lastChange()#

public function lastChange(): Date

Date of the most recent known rate, e.g. to warn when the table is outdated.

Returns
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). A table entry that keeps the rate (e.g. 2026-01-01) does not start a new period.

ParameterTypeDescription
$fromDate
$untilDate
Returns
list<array{from: Date, until: Date, rate: Brick\Math\BigDecimal}>

rateOn()#

public function rateOn(Date $date): BigDecimal

The base rate changes on 1 January and 1 July (section 247 (1) sentence 2 BGB). Dates from the next scheduled change after the last known rate on are unknown and rejected.

ParameterTypeDescription
$dateDate
Returns
Brick\Math\BigDecimal

validUntil()#

public function validUntil(): Date

First day for which the table has no rate: the next 1 January or 1 July after the last change.

Returns
Date

withRate()#

public function withRate(Date|string $from, string $rate): self

A copy with a rate in percent from $from on, e.g. a newly published rate.

ParameterTypeDescription
$fromDate|string
$ratestring
Returns
self

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