Zum Inhalt springen

API reference / Quittio \ Core \ Builder

Line

final class in quittio/core

Quittio\Core\Builder\Line · Source

Starts an invoice line for InvoiceBuilder::line() and lines() without a callback: ->line(Line::make('Consulting', netPrice: '120.00')->sellerId('C-1')). Simple lines need no builder: ->line('Consulting', netPrice: '120.00', quantity: 4, unit: UnitCode::Hour).

Methods#

MethodDescription
::fromArray()A line from an array whose keys are methods of the LineBuilder (LineBuilder::ARRAY_KEYS): ['name' => 'Consulting', 'quantity' => 4, 'netPrice' => '120.00'].
::make()A line builder with the name and, optionally, the most common values: the net price (BT-146) or the price including VAT (gross price mode), the quantity (default 1) and unit, the VAT treatment (default: the default VAT of the invoice) and the description.

fromArray()#

public static function fromArray(array<array-key, mixed> $line): LineBuilder

static

A line from an array whose keys are methods of the LineBuilder (LineBuilder::ARRAY_KEYS): ['name' => 'Consulting', 'quantity' => 4, 'netPrice' => '120.00'].

ParameterTypeDescription
$linearray<array-key, mixed>
Returns
LineBuilder

make()#

public static function make(
    string $name,
    BigDecimal|int|float|string|null $netPrice = null,
    BigDecimal|int|float|string|null $quantity = null,
    UnitCode|RawCode|string|null $unit = null,
    TaxPreset|VatCategory|null $vat = null,
    ?string $description = null,
    BigDecimal|int|float|string|null $priceInclVat = null,
): LineBuilder

static

A line builder with the name and, optionally, the most common values: the net price (BT-146) or the price including VAT (gross price mode), the quantity (default 1) and unit, the VAT treatment (default: the default VAT of the invoice) and the description.

ParameterTypeDescription
$namestring
$netPriceBrick\Math\BigDecimal|int|float|string|null = null
$quantityBrick\Math\BigDecimal|int|float|string|null = null
$unitUnitCode|RawCode|string|null = null
$vatTaxPreset|VatCategory|null = null
$description?string = null
$priceInclVatBrick\Math\BigDecimal|int|float|string|null = null
Returns
LineBuilder

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