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#
| Constant | Value | Description |
|---|---|---|
AMOUNT_DISCOUNTED | 'discounted' | |
AMOUNT_DUE | 'due' | |
MAX_BYTES | 331 | Maximum size of the payload in bytes (EPC069-12, section 5.2). |
Methods#
| Method | Description |
|---|---|
->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): ?BigDecimalAmount due, or the amount after the first cash discount.
| Parameter | Type | Description |
|---|---|---|
$invoice | InvoiceData | |
$discounted | bool = false |
- Returns
?Brick\Math\BigDecimal
discountedAmount()#
public function discountedAmount(
InvoiceData $invoice,
CashDiscount $discount,
): ?BigDecimalAmount due after the given cash discount (on its base amount, or on the amount due).
| Parameter | Type | Description |
|---|---|---|
$invoice | InvoiceData | |
$discount | CashDiscount |
- Returns
?Brick\Math\BigDecimal
key()#
public function key(): string- Returns
string
payload()#
public function payload(InvoiceData $invoice, array $options = []): ?string| Parameter | Type | Description |
|---|---|---|
$invoice | InvoiceData | |
$options | array = [] |
- Returns
?string
supports()#
public function supports(InvoiceData $invoice): bool| Parameter | Type | Description |
|---|---|---|
$invoice | InvoiceData |
- Returns
bool