API reference / Quittio \ Country \ DE \ Dunning
DefaultInterest
final readonly class in quittio/country-de
Quittio\Country\DE\Dunning\DefaultInterest · Source
Default interest according to section 288 BGB: base rate plus 9 points (business) or 5 points (consumer), split at every change of the base rate. Points, flat rate and day count basis come from the dunning law, by default CountryDE::germanDunningLaw(); the calculation is that of Quittio\Core\Dunning\DefaultInterest. The base rates are those shipped with Quittio plus the rates registered with BaseRates (configured or fetched from the Bundesbank), unless a table is given.
Methods#
| Method | Description |
|---|---|
->__construct() | |
->calculate() | Interest charges for an open amount from the first day of default until $until. |
->flatRate() | Flat rate for business debtors (section 288 (5) BGB), once per claim. |
__construct()#
public function __construct(BaseRateTable|null $rates = null, DunningLaw|null $law = null)| Parameter | Type | Description |
|---|---|---|
$rates | BaseRateTable|null = null | base rates; null = BaseRates::table() |
$law | DunningLaw|null = null | null = CountryDE::germanDunningLaw() |
calculate()#
public function calculate(
Money $amount,
Date $from,
Date $until,
bool $consumer = false,
string $locale = 'de',
): list<InterestCharge>Interest charges for an open amount from the first day of default until $until.
| Parameter | Type | Description |
|---|---|---|
$amount | Brick\Money\Money | |
$from | Date | |
$until | Date | |
$consumer | bool = false | |
$locale | string = 'de' |
- Returns
list<InterestCharge>
flatRate()#
public function flatRate(string $currency = 'EUR'): ?MoneyFlat rate for business debtors (section 288 (5) BGB), once per claim.
| Parameter | Type | Description |
|---|---|---|
$currency | string = 'EUR' |
- Returns
?Brick\Money\Money