Zum Inhalt springen

API reference / Quittio \ Core \ Pdf \ Qr

PaymentSlip

final readonly class in quittio/core

Quittio\Core\Pdf\Qr\PaymentSlip · Source

The texts of a payment slip with receipt (ProvidesPaymentSlip), laid out by the templates after the Swiss QR bill: receipt (62 mm) and payment part (148 mm) in a strip of 210 × 105 mm at the bottom of the page, with the code at 46 × 46 mm.

A section is a heading with its lines; a section without lines is printed as an empty field to be filled in by hand, as is a missing amount.

Properties#

PropertyTypeDescription
$acceptancePoint readonlystring
$amount readonlystring|nullformatted amount, null for an empty amount field
$amountHeading readonlystring
$currency readonlystring
$currencyHeading readonlystring
$mark readonlystring|nullimage (data URI) printed in the middle of the code, e.g. the Swiss cross
$receiptSections readonlylist<array{heading: string, lines: list<string>}>information section of the receipt
$receiptTitle readonlystring
$sections readonlylist<array{heading: string, lines: list<string>}>information section of the payment part, in order
$separationNote readonlystring
$title readonlystring

Methods#

MethodDescription
->__construct()
->toArray()

__construct()#

public function __construct(
    string $title,
    string $receiptTitle,
    list<array{heading: string, lines: list<string>}> $sections,
    list<array{heading: string, lines: list<string>}> $receiptSections,
    string $currencyHeading,
    string $amountHeading,
    string $currency,
    string|null $amount,
    string $acceptancePoint,
    string $separationNote,
    string|null $mark = null,
)
ParameterTypeDescription
$titlestring
$receiptTitlestring
$sectionslist<array{heading: string, lines: list<string>}>information section of the payment part, in order
$receiptSectionslist<array{heading: string, lines: list<string>}>information section of the receipt
$currencyHeadingstring
$amountHeadingstring
$currencystring
$amountstring|nullformatted amount, null for an empty amount field
$acceptancePointstring
$separationNotestring
$markstring|null = nullimage (data URI) printed in the middle of the code, e.g. the Swiss cross

toArray()#

public function toArray(): array{title: string, receiptTitle: string, sections: list<array{heading: string, lines: list<string>}>, receiptSections: list<array{heading: string, lines: list<string>}>, currencyHeading: string, amountHeading: string, currency: string, amount: ?string, acceptancePoint: string, separationNote: string, mark: ?string}
Returns
array{title: string, receiptTitle: string, sections: list<array{heading: string, lines: list<string>}>, receiptSections: list<array{heading: string, lines: list<string>}>, currencyHeading: string, amountHeading: string, currency: string, amount: ?string, acceptancePoint: string, separationNote: string, mark: ?string}

Die Open-Core-Pakete stehen unter der MIT-Lizenz. Die rechtlichen Formulierungen der Länderpakete sind mit einer Steuerberatung abzustimmen.