Quittio next API

DefaultFormatResolver
in package
implements FormatResolver

FinalYes

Format resolution in this order:

  1. explicit choice (handled by the caller),
  2. known Peppol participant of the buyer (optional lookup),
  3. domestic invoice: rules of the seller's country pack,
  4. cross-border to a business: rules of the buyer's country pack (also for sellers outside the EU, e.g. XRechnung for German public buyers), otherwise ZUGFeRD EN 16931 within the EU VAT territory,
  5. outside the EU VAT territory or to consumers: PDF,
  6. EXTENDED features used: profile EXTENDED (or an error without auto upgrade).

"Domestic" and "EU" refer to the VAT territory (see VatTerritory): Monaco counts as France, Northern Ireland as part of the EU, Büsingen and Heligoland are outside of it.

Table of Contents

Interfaces

FormatResolver
Chooses format and profile when none is given.

Constants

EU_COUNTRIES  : array<string|int, mixed> = \Quittio\Core\Countries\VatTerritory::EU_MEMBER...

Methods

__construct()  : mixed
resolve()  : FormatChoice

Constants

EU_COUNTRIES

use VatTerritory::EU_MEMBER_STATES

public array<string|int, mixed> EU_COUNTRIES = \Quittio\Core\Countries\VatTerritory::EU_MEMBER_STATES

Methods

__construct()

public __construct([string $defaultProfile = 'en16931' ][, bool $autoUpgradeProfile = true ][, callable(BuyerParty): bool|null $peppolLookup = null ]) : mixed
Parameters
$defaultProfile : string = 'en16931'
$autoUpgradeProfile : bool = true
$peppolLookup : callable(BuyerParty): bool|null = null

returns true if the buyer is reachable via Peppol

On this page

Search results