Quittio 0.3 API

ViewModelFactory
in package

FinalYes

Builds the template view model from calculated invoice data.

Table of Contents

Constants

CONTINUATION_MARGIN_TOP  : float = 40.0
Top page margin of the following pages, below their header (logo, title, number and buyer).
PAGE_MARGIN_TOP  : float = 15.0
Top page margin of the first page of the default templates in millimetres (the letterhead starts here).
PAYMENT_QR_MODES  : array<string|int, mixed> = [\Quittio\Core\Data\Presentation\Presentation::...
SPECIAL_SCHEME_CODES  : array<string|int, mixed> = ['VATEX-EU-D', 'VATEX-EU-F', 'VATEX-EU-I', 'VAT...
Margin schemes and travel agents (section 25, 25a UStG): no separate VAT statement.

Methods

build()  : InvoiceViewModel
The view model of an invoice.
buildDocument()  : InvoiceViewModel
View model for quotes, delivery notes, reminders and other documents.
legalNoteTexts()  : array<int, string>
The "legalNotes" of the view model: exemption reasons (BT-120) and regulatory, legal and tax notes (BT-22), in this order and without duplicates.
mergePresentation()  : Presentation
$own over $defaults, property by property: values of $own that equal the defaults of an empty Presentation count as not set and keep the value of $defaults, unless $own names the property in $explicit (e.g. false, [] or "A4" over a configured value).
otherNotes()  : array<int, Note>
The notes outside "legalNotes" in the order of the view model's "notes".
remittance()  : string
Remittance information (BT-83), otherwise the invoice number.

Constants

CONTINUATION_MARGIN_TOP

Top page margin of the following pages, below their header (logo, title, number and buyer).

public float CONTINUATION_MARGIN_TOP = 40.0

PAGE_MARGIN_TOP

Top page margin of the first page of the default templates in millimetres (the letterhead starts here).

public float PAGE_MARGIN_TOP = 15.0

PAYMENT_QR_MODES

public array<string|int, mixed> PAYMENT_QR_MODES = [\Quittio\Core\Data\Presentation\Presentation::PAYMENT_QR_AUTO, \Quittio\Core\Data\Presentation\Presentation::PAYMENT_QR_GIROCODE, \Quittio\Core\Data\Presentation\Presentation::PAYMENT_QR_SWISS, \Quittio\Core\Data\Presentation\Presentation::PAYMENT_QR_NONE]

SPECIAL_SCHEME_CODES

Margin schemes and travel agents (section 25, 25a UStG): no separate VAT statement.

public array<string|int, mixed> SPECIAL_SCHEME_CODES = ['VATEX-EU-D', 'VATEX-EU-F', 'VATEX-EU-I', 'VATEX-EU-J']

Methods

legalNoteTexts()

The "legalNotes" of the view model: exemption reasons (BT-120) and regulatory, legal and tax notes (BT-22), in this order and without duplicates.

public static legalNoteTexts(InvoiceData $invoice) : array<int, string>
Parameters
$invoice : InvoiceData
Return values
array<int, string>

mergePresentation()

$own over $defaults, property by property: values of $own that equal the defaults of an empty Presentation count as not set and keep the value of $defaults, unless $own names the property in $explicit (e.g. false, [] or "A4" over a configured value).

public static mergePresentation(Presentation $own, Presentation $defaults) : Presentation

Labels are merged key by key.

Parameters
$own : Presentation
$defaults : Presentation
Return values
Presentation

remittance()

Remittance information (BT-83), otherwise the invoice number.

public static remittance(InvoiceData $invoice) : string
Parameters
$invoice : InvoiceData
Return values
string
On this page

Search results