Skip to content

API reference / Quittio \ Core \ Data \ Payment

CashDiscount

final readonly class in quittio/core · uses Immutable

Quittio\Core\Data\Payment\CashDiscount · Source

Cash discount ("Skonto") granted for payment within $days days.

Serialised into BT-20 for XRechnung (#SKONTO#TAGE=..#PROZENT=..#) and into structured elements in profile EXTENDED.

Properties#

PropertyTypeDescription
$baseAmount readonly?Brick\Money\Money
$days readonlyint
$percent readonlyBrick\Math\BigDecimal

Methods#

MethodDescription
->__construct()
->with()Returns a copy with the given properties replaced.

__construct()#

public function __construct(int $days, BigDecimal $percent, ?Money $baseAmount = null)
ParameterTypeDescription
$daysint
$percentBrick\Math\BigDecimal
$baseAmount?Brick\Money\Money = null

with()#

public function with(array<string, mixed> $changes): static

Returns a copy with the given properties replaced.

ParameterTypeDescription
$changesarray<string, mixed>
Returns
static

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