API reference / Quittio \ Core \ Countries \ Capabilities
CompletesInvoices
interface in quittio/core
Quittio\Core\Countries\Capabilities\CompletesInvoices · Source
A country pack that completes an invoice before it is calculated, validated and rendered, e.g. with a notice the law of the country expects for some buyers. The render pipeline calls it for the leading pack of the invoice; what it adds is part of the rendered data.
Methods#
| Method | Description |
|---|---|
->complete() | The invoice with what the pack adds; the invoice itself if nothing is missing. |
complete()#
public function complete(
InvoiceData $invoice,
array<string, mixed> $settings,
): InvoiceDataThe invoice with what the pack adds; the invoice itself if nothing is missing.
| Parameter | Type | Description |
|---|---|---|
$invoice | InvoiceData | |
$settings | array<string, mixed> | the settings of the pack (Config::$countrySettings, e.g. quittio.countries.de) |
- Returns
InvoiceData