Zum Inhalt springen

API reference / Quittio \ Core \ Pdf \ Qr

EpcGiroCodeGenerator

final class in quittio/core · implements PaymentQrGenerator

Quittio\Core\Pdf\Qr\EpcGiroCodeGenerator · Source

EPC QR code ("GiroCode") for SEPA credit transfers, guideline EPC069-12 version 002.

Created when the currency is EUR, the payment means is a credit transfer with an IBAN and the amount due is positive; never for credit notes and self-billed invoices.

Options of payload(): "amount" (due|discounted), "value" (a BigDecimal that replaces the amount, e.g. the total of a payment reminder) and "remittance" (replaces BT-83).

Constants#

ConstantValueDescription
AMOUNT_DISCOUNTED'discounted'
AMOUNT_DUE'due'
MAX_BYTES331Maximum size of the payload in bytes (EPC069-12, section 5.2).

Methods#

MethodDescription
->amount()Amount due, or the amount after the first cash discount.
->discountedAmount()Amount due after the given cash discount (on its base amount, or on the amount due).
->key()
->payload()
->supports()

amount()#

public function amount(InvoiceData $invoice, bool $discounted = false): ?BigDecimal

Amount due, or the amount after the first cash discount.

ParameterTypeDescription
$invoiceInvoiceData
$discountedbool = false
Returns
?Brick\Math\BigDecimal

discountedAmount()#

public function discountedAmount(
    InvoiceData $invoice,
    CashDiscount $discount,
): ?BigDecimal

Amount due after the given cash discount (on its base amount, or on the amount due).

ParameterTypeDescription
$invoiceInvoiceData
$discountCashDiscount
Returns
?Brick\Math\BigDecimal

key()#

public function key(): string
Returns
string

payload()#

public function payload(InvoiceData $invoice, array $options = []): ?string
ParameterTypeDescription
$invoiceInvoiceData
$optionsarray = []
Returns
?string

supports()#

public function supports(InvoiceData $invoice): bool
ParameterTypeDescription
$invoiceInvoiceData
Returns
bool

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