Zum Inhalt springen

API reference / Quittio \ Core \ Calculation

CalculationPolicy

final readonly class in quittio/core

Quittio\Core\Calculation\CalculationPolicy · Source

Decisions of the calculator that are not fixed by EN 16931. The policy is configuration of the run and not stored with the invoice: the same data calculated under another policy can give other amounts.

Properties#

PropertyTypeDescription
$declaredAmounts readonlyDeclaredAmountsMode

Methods#

MethodDescription
->__construct()
::fromArray()From the configuration key declared_amounts (keep, recalculate or reject).

__construct()#

public function __construct(
    DeclaredAmountsMode $declaredAmounts = \Quittio\Core\Calculation\DeclaredAmountsMode::Keep,
)
ParameterTypeDescription
$declaredAmountsDeclaredAmountsMode = \Quittio\Core\Calculation\DeclaredAmountsMode::Keep

fromArray()#

public static function fromArray(array<array-key, mixed> $config): self

static

From the configuration key declared_amounts (keep, recalculate or reject).

ParameterTypeDescription
$configarray<array-key, mixed>
Returns
self
Throws
ConfigurationException – for an unknown mode

Die Open-Core-Pakete stehen unter der MIT-Lizenz. Die rechtlichen Formulierungen der Länderpakete sind mit einer Steuerberatung abzustimmen.