Quittio 0.3 API

BuildsPayment

Payment instructions (BG-16 to BG-19), payment terms and the prepaid and rounding amounts (BT-113, BT-114).

Part of InvoiceBuilder, which holds the state; use the builder, not the trait.

Table of Contents

Methods

addPrepaid()  : static
Adds to the amount already paid (BT-113), e.g. one of several advance payments.
cashDiscount()  : static
Cash discount ("Skonto") of $percent for payment within $days days after the issue date, optionally on a base amount; repeatable for several tiers. Continues the payment terms.
creditTransfer()  : static
Adds a further bank account (BG-17).
directDebit()  : static
SEPA direct debit (BG-19): mandate reference (BT-89), creditor identifier (BT-90) and the debited IBAN (BT-91, spaces removed). Without payment instructions it starts them with SepaDirectDebit (59).
dueInDays()  : static
Payment target: the due date (BT-9) is the issue date plus $days unless dueDate() is set, and the payment terms say "Payable within … days without deduction." Continues the payment terms set before.
lateFee()  : static
Late payment terms: days, percentage and text. Continues the payment terms.
payment()  : static
Payment instructions (BG-16) with an optional credit transfer account (BG-17).
paymentCard()  : static
Payment card (BG-18): the last 4 to 6 digits of the card number (BT-87) and the holder (BT-88). Without payment instructions it starts them with BankCard (48).
paymentTerms()  : static
Payment terms (BT-20): a PaymentTerms object or a text replace earlier terms; a callable receives a PaymentTermsBuilder that continues the earlier terms, also those of a PaymentTerms object or of from(), like seller() and buyer().
prepaid()  : static
Amount already paid (BT-113), e.g. received advance payments.
rounding()  : static
Rounding amount (BT-114), e.g. cash rounding. Never use it to fix wrong totals.

Methods

addPrepaid()

Adds to the amount already paid (BT-113), e.g. one of several advance payments.

public addPrepaid(BigDecimal|int|float|string $amount) : static
Parameters
$amount : BigDecimal|int|float|string
Return values
static

cashDiscount()

Cash discount ("Skonto") of $percent for payment within $days days after the issue date, optionally on a base amount; repeatable for several tiers. Continues the payment terms.

public cashDiscount(int $days, string $percent[, string|null $baseAmount = null ]) : static
Parameters
$days : int
$percent : string
$baseAmount : string|null = null
Return values
static

creditTransfer()

Adds a further bank account (BG-17).

public creditTransfer(string $accountId[, string|null $bic = null ][, string|null $accountName = null ]) : static
Parameters
$accountId : string
$bic : string|null = null
$accountName : string|null = null
Return values
static

directDebit()

SEPA direct debit (BG-19): mandate reference (BT-89), creditor identifier (BT-90) and the debited IBAN (BT-91, spaces removed). Without payment instructions it starts them with SepaDirectDebit (59).

public directDebit(string|null $mandateReference[, string|null $creditorId = null ][, string|null $debitedIban = null ]) : static
Parameters
$mandateReference : string|null
$creditorId : string|null = null
$debitedIban : string|null = null
Return values
static

dueInDays()

Payment target: the due date (BT-9) is the issue date plus $days unless dueDate() is set, and the payment terms say "Payable within … days without deduction." Continues the payment terms set before.

public dueInDays(int $days) : static
Parameters
$days : int
Return values
static

lateFee()

Late payment terms: days, percentage and text. Continues the payment terms.

public lateFee([int|null $days = null ][, string|null $percent = null ][, string|null $text = null ]) : static
Parameters
$days : int|null = null
$percent : string|null = null
$text : string|null = null
Return values
static

payment()

Payment instructions (BG-16) with an optional credit transfer account (BG-17).

public payment(PaymentMeansCode|RawCode|string $means[, string|null $iban = null ][, string|null $bic = null ][, string|null $accountName = null ][, string|null $remittanceInformation = null ][, string|null $meansText = null ]) : static

A second call replaces the payment instructions: an account given here replaces the accounts, and data of other payment means is dropped (e.g. bank accounts when switching to direct debit). Without an account, existing accounts are kept for credit transfers (e.g. a seller default account); likewise card (BG-18) and direct debit (BG-19) data for card payments and direct debits. The remittance information (BT-83) is kept unless a new one is given. Further accounts are added with creditTransfer().

Parameters
$means : PaymentMeansCode|RawCode|string
$iban : string|null = null
$bic : string|null = null
$accountName : string|null = null
$remittanceInformation : string|null = null
$meansText : string|null = null
Return values
static

paymentCard()

Payment card (BG-18): the last 4 to 6 digits of the card number (BT-87) and the holder (BT-88). Without payment instructions it starts them with BankCard (48).

public paymentCard(string $lastDigits[, string|null $holderName = null ]) : static
Parameters
$lastDigits : string
$holderName : string|null = null
Tags
throws
InvalidArgumentException

for more or fewer digits

Return values
static

paymentTerms()

Payment terms (BT-20): a PaymentTerms object or a text replace earlier terms; a callable receives a PaymentTermsBuilder that continues the earlier terms, also those of a PaymentTerms object or of from(), like seller() and buyer().

public paymentTerms(PaymentTerms|string|callable(PaymentTermsBuilder): mixed $terms) : static
Parameters
$terms : PaymentTerms|string|callable(PaymentTermsBuilder): mixed
Return values
static

prepaid()

Amount already paid (BT-113), e.g. received advance payments.

public prepaid(BigDecimal|int|float|string $amount) : static
Parameters
$amount : BigDecimal|int|float|string
Return values
static

rounding()

Rounding amount (BT-114), e.g. cash rounding. Never use it to fix wrong totals.

public rounding(BigDecimal|int|float|string $amount) : static
Parameters
$amount : BigDecimal|int|float|string
Return values
static
On this page

Search results