Skip to content

API reference / Quittio \ Core \ Testing

Scenarios

final class in quittio/core

Quittio\Core\Testing\Scenarios · Source

Example invoices for previews, tests and the official validation runs.

The scenarios are country neutral and use VAT categories directly. Country packs may provide their own scenarios with tax presets.

Methods#

MethodDescription
::allowances()Invoice with line-level and document-level allowances and charges: price base quantity, list price with discount, a line allowance and charge, freight charge and a loyalty allowance.
::attachments()The simple() invoice with two supporting documents (BG-24): an embedded CSV timesheet and an external link to the terms and conditions.
::b2cGross()Invoice to a German consumer without a buyer reference whose lines are priced including VAT, at 19 % and 7 %.
::base()Base of all scenarios, without lines: invoice RE-2026-0042 of 2026-10-03 in EUR, locale de, German seller (Muster GmbH) and buyer (Kunde AG), buyer reference, delivery date, due in 14 days and SEPA credit transfer.
::cancellation()Credit note ST-2026-0007 (type 381) that cancels the simple() invoice RE-2026-0042, with a cancellation note and refund text as payment terms.
::export()Export invoice (category G, VATEX-EU-G) for one device to a US buyer without a VAT ID.
::foreignCurrency()Invoice in USD with EUR as VAT accounting currency (BT-6) at exchange rate 0.912345, one software licence line at 19 % and a plain credit transfer.
::intraEu()Intra-community supply (category K, VATEX-EU-IC) of goods to an Italian buyer, with deliver-to address, country of origin and an HS commodity classification on the line.
::longTexts()Domestic invoice with a long invoice note and one line with a long name, a description of six paragraphs and two item attributes, to test text wrapping.
::make()Returns the builder of the scenario $name, one of names(); throws InvalidArgumentException for an unknown name.
::manyLines()Domestic invoice with 60 article lines at 19 % and 7 %, to test page breaks and long tables.
::mixedVat()Domestic invoice with lines at 7 %, 19 % and zero rate (category Z) and a 10 % document-level discount split per VAT group.
::names()
::peppol()Reverse charge invoice to a Belgian buyer with Peppol electronic addresses (schemes 9930 and 0208) for seller and buyer.
::profile()Profile that suits the scenario best.
::reverseCharge()Reverse charge invoice (category AE, VATEX-EU-AE) for consulting hours to a French buyer with a VAT ID.
::simple()Domestic invoice with two lines at 19 %: 24 hours of web development and one month of hosting with an invoicing period, plus 2 % cash discount within 7 days.
::subLines()Invoice with a line made of three sub-lines plus a shipping line, an invoicee and delivery terms; these need the Extended profile.

allowances()#

public static function allowances(): InvoiceBuilder

static

Invoice with line-level and document-level allowances and charges: price base quantity, list price with discount, a line allowance and charge, freight charge and a loyalty allowance.

Returns
InvoiceBuilder

attachments()#

public static function attachments(): InvoiceBuilder

static

The simple() invoice with two supporting documents (BG-24): an embedded CSV timesheet and an external link to the terms and conditions.

Returns
InvoiceBuilder

b2cGross()#

public static function b2cGross(): InvoiceBuilder

static

Invoice to a German consumer without a buyer reference whose lines are priced including VAT, at 19 % and 7 %.

Returns
InvoiceBuilder

base()#

public static function base(): InvoiceBuilder

static

Base of all scenarios, without lines: invoice RE-2026-0042 of 2026-10-03 in EUR, locale de, German seller (Muster GmbH) and buyer (Kunde AG), buyer reference, delivery date, due in 14 days and SEPA credit transfer.

Returns
InvoiceBuilder

cancellation()#

public static function cancellation(): InvoiceBuilder

static

Credit note ST-2026-0007 (type 381) that cancels the simple() invoice RE-2026-0042, with a cancellation note and refund text as payment terms.

Returns
InvoiceBuilder

export()#

public static function export(): InvoiceBuilder

static

Export invoice (category G, VATEX-EU-G) for one device to a US buyer without a VAT ID.

Returns
InvoiceBuilder

foreignCurrency()#

public static function foreignCurrency(): InvoiceBuilder

static

Invoice in USD with EUR as VAT accounting currency (BT-6) at exchange rate 0.912345, one software licence line at 19 % and a plain credit transfer.

Returns
InvoiceBuilder

intraEu()#

public static function intraEu(): InvoiceBuilder

static

Intra-community supply (category K, VATEX-EU-IC) of goods to an Italian buyer, with deliver-to address, country of origin and an HS commodity classification on the line.

Returns
InvoiceBuilder

longTexts()#

public static function longTexts(): InvoiceBuilder

static

Domestic invoice with a long invoice note and one line with a long name, a description of six paragraphs and two item attributes, to test text wrapping.

Returns
InvoiceBuilder

make()#

public static function make(string $name): InvoiceBuilder

static

Returns the builder of the scenario $name, one of names(); throws InvalidArgumentException for an unknown name.

ParameterTypeDescription
$namestring
Returns
InvoiceBuilder

manyLines()#

public static function manyLines(): InvoiceBuilder

static

Domestic invoice with 60 article lines at 19 % and 7 %, to test page breaks and long tables.

Returns
InvoiceBuilder

mixedVat()#

public static function mixedVat(): InvoiceBuilder

static

Domestic invoice with lines at 7 %, 19 % and zero rate (category Z) and a 10 % document-level discount split per VAT group.

Returns
InvoiceBuilder

names()#

public static function names(): list<string>

static

Returns
list<string>

peppol()#

public static function peppol(): InvoiceBuilder

static

Reverse charge invoice to a Belgian buyer with Peppol electronic addresses (schemes 9930 and 0208) for seller and buyer.

Returns
InvoiceBuilder

profile()#

public static function profile(string $name): string

static

Profile that suits the scenario best.

ParameterTypeDescription
$namestring
Returns
string

reverseCharge()#

public static function reverseCharge(): InvoiceBuilder

static

Reverse charge invoice (category AE, VATEX-EU-AE) for consulting hours to a French buyer with a VAT ID.

Returns
InvoiceBuilder

simple()#

public static function simple(): InvoiceBuilder

static

Domestic invoice with two lines at 19 %: 24 hours of web development and one month of hosting with an invoicing period, plus 2 % cash discount within 7 days.

Returns
InvoiceBuilder

subLines()#

public static function subLines(): InvoiceBuilder

static

Invoice with a line made of three sub-lines plus a shipping line, an invoicee and delivery terms; these need the Extended profile.

Returns
InvoiceBuilder

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