Skip to content

API reference / Quittio \ Core \ Documents

DocumentCalculator

final class in quittio/core

Quittio\Core\Documents\DocumentCalculator · Source

Calculates documents with the invoice calculator. Optional and alternative lines get their line amounts but are excluded from the totals.

Methods#

MethodDescription
->__construct()
->calculate()

__construct()#

public function __construct(
    TotalsCalculator $calculator = new \Quittio\Core\Calculation\En16931Calculator(),
)
ParameterTypeDescription
$calculatorTotalsCalculator = new \Quittio\Core\Calculation\En16931Calculator()

calculate()#

public function calculate(DocumentData $document): DocumentData
ParameterTypeDescription
$documentDocumentData
Returns
DocumentData

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