API reference / Quittio \ Core \ Builder
PaymentTermsBuilder
final class in quittio/core
Quittio\Core\Builder\PaymentTermsBuilder · Source
Fluent builder for structured payment terms (BT-20, BT-9).
Methods#
| Method | Description |
|---|---|
->build() | |
->cashDiscount() | Cash discount ("Skonto") for payment within $days days. |
->dueInDays() | Sets the payment target. The due date (BT-9) is derived from the issue date if not given explicitly. |
::fromTerms() | Continues existing terms (InvoiceBuilder::paymentTerms() with a callable after from()). |
->lateFee() | |
->text() |
build()#
public function build(string $currency): PaymentTerms| Parameter | Type | Description |
|---|---|---|
$currency | string |
- Returns
PaymentTerms
cashDiscount()#
public function cashDiscount(int $days, string $percent, ?string $baseAmount = null): selfCash discount ("Skonto") for payment within $days days.
| Parameter | Type | Description |
|---|---|---|
$days | int | |
$percent | string | |
$baseAmount | ?string = null |
- Returns
self
dueInDays()#
public function dueInDays(int $days): selfSets the payment target. The due date (BT-9) is derived from the issue date if not given explicitly.
| Parameter | Type | Description |
|---|---|---|
$days | int |
- Returns
self
fromTerms()#
public static function fromTerms(PaymentTerms $terms): selfContinues existing terms (InvoiceBuilder::paymentTerms() with a callable after from()).
| Parameter | Type | Description |
|---|---|---|
$terms | PaymentTerms |
- Returns
self
lateFee()#
public function lateFee(
?int $days = null,
?string $percent = null,
?string $text = null,
): self| Parameter | Type | Description |
|---|---|---|
$days | ?int = null | |
$percent | ?string = null | |
$text | ?string = null |
- Returns
self
text()#
public function text(?string $text): self| Parameter | Type | Description |
|---|---|---|
$text | ?string |
- Returns
self