API reference / Quittio \ Core \ Data \ AllowanceCharge
DocumentCharge
final readonly class in quittio/core · extends DocumentAllowanceCharge
Quittio\Core\Data\AllowanceCharge\DocumentCharge · Source
Document level charge (BG-21).
Properties#
| Property | Type | Description |
|---|---|---|
$amount readonly | ?Brick\Money\Money | from DocumentAllowanceCharge |
$baseAmount readonly | ?Brick\Money\Money | from DocumentAllowanceCharge |
$exemptionReason readonly | ?string | from DocumentAllowanceCharge |
$exemptionReasonCode readonly | VatExemptionReasonCode|RawCode|null | from DocumentAllowanceCharge |
$percent readonly | ?Brick\Math\BigDecimal | from DocumentAllowanceCharge |
$reason readonly | ?string | from DocumentAllowanceCharge |
$reasonCode readonly | BackedEnum|RawCode|null | from DocumentAllowanceCharge |
$vatCategory readonly | VatCategory | from DocumentAllowanceCharge |
$vatRate readonly | ?Brick\Math\BigDecimal | from DocumentAllowanceCharge |
Methods#
| Method | Description |
|---|---|
->__construct() | |
->isCharge() | |
->reasonCodeValue() | |
->with() | Returns a copy with the given properties replaced. |
__construct()#
public function __construct(
?Money $amount,
VatCategory $vatCategory,
?BigDecimal $vatRate = null,
?Money $baseAmount = null,
?BigDecimal $percent = null,
?string $reason = null,
ChargeReasonCode|RawCode|null $reasonCode = null,
?string $exemptionReason = null,
VatExemptionReasonCode|RawCode|null $exemptionReasonCode = null,
)| Parameter | Type | Description |
|---|---|---|
$amount | ?Brick\Money\Money | |
$vatCategory | VatCategory | |
$vatRate | ?Brick\Math\BigDecimal = null | |
$baseAmount | ?Brick\Money\Money = null | |
$percent | ?Brick\Math\BigDecimal = null | |
$reason | ?string = null | |
$reasonCode | ChargeReasonCode|RawCode|null = null | |
$exemptionReason | ?string = null | |
$exemptionReasonCode | VatExemptionReasonCode|RawCode|null = null |
isCharge()#
public function isCharge(): bool- Returns
bool
reasonCodeValue()#
public function reasonCodeValue(): ?string- Returns
?string
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