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#
| Property | Type | Description |
|---|---|---|
$baseAmount readonly | ?Brick\Money\Money | |
$days readonly | int | |
$percent readonly | Brick\Math\BigDecimal |
Methods#
| Method | Description |
|---|---|
->__construct() | |
->with() | Returns a copy with the given properties replaced. |
__construct()#
public function __construct(int $days, BigDecimal $percent, ?Money $baseAmount = null)| Parameter | Type | Description |
|---|---|---|
$days | int | |
$percent | Brick\Math\BigDecimal | |
$baseAmount | ?Brick\Money\Money = null |
with()#
public function with(array<string, mixed> $changes): staticReturns a copy with the given properties replaced.
| Parameter | Type | Description |
|---|---|---|
$changes | array<string, mixed> |
- Returns
static