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
staticcashDiscount()
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
staticcreditTransfer()
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
staticdirectDebit()
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
staticdueInDays()
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
staticlateFee()
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
staticpayment()
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
staticpaymentCard()
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
Return values
staticpaymentTerms()
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
staticprepaid()
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
staticrounding()
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