---
title: "InvoiceLine – API-Referenz · Quittio"
description: "Invoice line (BG-25)."
canonical_url: "https://quittio.dev/docs/api/Quittio/Core/Data/Lines/InvoiceLine"
locale: de
meta:
  "og:description": "Invoice line (BG-25)."
  "og:image": "https://quittio.dev/og/quittio-de.jpg"
  "og:image:alt": "Quittio: E-Rechnungen für PHP und Laravel. Rechtssicher, validiert, archiviert, mit geprüfter Beispielrechnung."
  "og:image:height": "630"
  "og:image:type": image/jpeg
  "og:image:width": "1200"
  "og:title": "InvoiceLine – API-Referenz · Quittio"
  "twitter:image": "https://quittio.dev/og/quittio-de.jpg"
  "twitter:image:alt": "Quittio: E-Rechnungen für PHP und Laravel. Rechtssicher, validiert, archiviert, mit geprüfter Beispielrechnung."
---

> Index of every page on this site: [llms.txt](https://quittio.dev/llms.txt)

[API reference](https://quittio.dev/docs/api) / [Quittio](https://quittio.dev/docs/api/Quittio) \\ [Core](https://quittio.dev/docs/api/Quittio/Core) \\ [Data](https://quittio.dev/docs/api/Quittio/Core/Data) \\ [Lines](https://quittio.dev/docs/api/Quittio/Core/Data/Lines)

# InvoiceLine

final readonly class in quittio/core · uses [`Immutable`](https://quittio.dev/docs/api/Quittio/Core/Data/Concerns/Immutable)

`Quittio\Core\Data\Lines\InvoiceLine` · [Source](https://github.com/Quittio/quittio/blob/v0.7.1/packages/core/src/Data/Lines/InvoiceLine.php#L27)

Invoice line (BG-25).

## Properties \#

| Property | Type | Description |
| --- | --- | --- |
| `$allowances` readonly | `list< [LineAllowance](https://quittio.dev/docs/api/Quittio/Core/Data/AllowanceCharge/LineAllowance)>` | |
| `$buyerAccountingReference` readonly | `?string` | |
| `$charges` readonly | `list< [LineCharge](https://quittio.dev/docs/api/Quittio/Core/Data/AllowanceCharge/LineCharge)>` | |
| `$extended` readonly | `? [LineExtendedData](https://quittio.dev/docs/api/Quittio/Core/Data/Extensions/LineExtendedData)` | |
| `$id` readonly | `string` | |
| `$item` readonly | `[Item](https://quittio.dev/docs/api/Quittio/Core/Data/Lines/Item)` | |
| `$lineReferences` readonly | `list< [DocumentReference](https://quittio.dev/docs/api/Quittio/Core/Data/References/DocumentReference)>` | |
| `$netAmount` readonly | `?Brick\Money\Money` | |
| `$note` readonly | `?string` | |
| `$objectId` readonly | `? [Identifier](https://quittio.dev/docs/api/Quittio/Core/Data/Identifier)` | |
| `$orderLineReference` readonly | `?string` | |
| `$period` readonly | `? [Period](https://quittio.dev/docs/api/Quittio/Core/Data/Delivery/Period)` | |
| `$presentation` readonly | `? [LinePresentation](https://quittio.dev/docs/api/Quittio/Core/Data/Presentation/LinePresentation)` | |
| `$price` readonly | `[Price](https://quittio.dev/docs/api/Quittio/Core/Data/Lines/Price)` | |
| `$quantity` readonly | `Brick\Math\BigDecimal` | |
| `$subLines` readonly | `list< [InvoiceLine](https://quittio.dev/docs/api/Quittio/Core/Data/Lines/InvoiceLine)>` | |
| `$unit` readonly | `[UnitCode](https://quittio.dev/docs/api/Quittio/Core/Enums/UnitCode)\| [RawCode](https://quittio.dev/docs/api/Quittio/Core/Codes/RawCode)` | |
| `$vat` readonly | `[LineVat](https://quittio.dev/docs/api/Quittio/Core/Data/Lines/LineVat)` | |

## Methods \#

| Method | Description |
| --- | --- |
| `->__construct()` | |
| `->hasSubLines()` | |
| `->with()` | Returns a copy with the given properties replaced. |
| `->withNetPrice()` | Copy with a new net price (BT-146); gross price and discount are dropped. |
| `->withPriceInclVat()` | Copy with a new price including VAT (gross price mode). The calculator derives the net price again. |

### `__construct()`#

```
public function __construct(
    string $id,
    BigDecimal $quantity,
    UnitCode|RawCode $unit,
    Price $price,
    LineVat $vat,
    Item $item,
    ?string $note = null,
    ?Identifier $objectId = null,
    ?Money $netAmount = null,
    ?string $orderLineReference = null,
    ?string $buyerAccountingReference = null,
    ?Period $period = null,
    list<LineAllowance> $allowances = [],
    list<LineCharge> $charges = [],
    list<InvoiceLine> $subLines = [],
    list<DocumentReference> $lineReferences = [],
    ?LineExtendedData $extended = null,
    ?LinePresentation $presentation = null,
)
```

| Parameter | Type | Description |
| --- | --- | --- |
| `$id` | `string` | |
| `$quantity` | `Brick\Math\BigDecimal` | |
| `$unit` | `[UnitCode](https://quittio.dev/docs/api/Quittio/Core/Enums/UnitCode)\| [RawCode](https://quittio.dev/docs/api/Quittio/Core/Codes/RawCode)` | |
| `$price` | `[Price](https://quittio.dev/docs/api/Quittio/Core/Data/Lines/Price)` | |
| `$vat` | `[LineVat](https://quittio.dev/docs/api/Quittio/Core/Data/Lines/LineVat)` | |
| `$item` | `[Item](https://quittio.dev/docs/api/Quittio/Core/Data/Lines/Item)` | |
| `$note` | `?string` = `null` | |
| `$objectId` | `? [Identifier](https://quittio.dev/docs/api/Quittio/Core/Data/Identifier)` = `null` | |
| `$netAmount` | `?Brick\Money\Money` = `null` | |
| `$orderLineReference` | `?string` = `null` | |
| `$buyerAccountingReference` | `?string` = `null` | |
| `$period` | `? [Period](https://quittio.dev/docs/api/Quittio/Core/Data/Delivery/Period)` = `null` | |
| `$allowances` | `list< [LineAllowance](https://quittio.dev/docs/api/Quittio/Core/Data/AllowanceCharge/LineAllowance)>` = `[]` | |
| `$charges` | `list< [LineCharge](https://quittio.dev/docs/api/Quittio/Core/Data/AllowanceCharge/LineCharge)>` = `[]` | |
| `$subLines` | `list< [InvoiceLine](https://quittio.dev/docs/api/Quittio/Core/Data/Lines/InvoiceLine)>` = `[]` | |
| `$lineReferences` | `list< [DocumentReference](https://quittio.dev/docs/api/Quittio/Core/Data/References/DocumentReference)>` = `[]` | |
| `$extended` | `? [LineExtendedData](https://quittio.dev/docs/api/Quittio/Core/Data/Extensions/LineExtendedData)` = `null` | |
| `$presentation` | `? [LinePresentation](https://quittio.dev/docs/api/Quittio/Core/Data/Presentation/LinePresentation)` = `null` | |

### `hasSubLines()`#

```
public function hasSubLines(): bool
```

<dl><dt>Returns</dt>
<dd><code>bool</code></dd>
</dl>

### `with()`#

```
public function with(array<string, mixed> $changes): static
```

Returns a copy with the given properties replaced.

| Parameter | Type | Description |
| --- | --- | --- |
| `$changes` | `array<string, mixed>` | |

<dl><dt>Returns</dt>
<dd><code>static</code></dd>
</dl>

### `withNetPrice()`#

```
public function withNetPrice(BigDecimal|int|float|string $price): self
```

Copy with a new net price (BT-146); gross price and discount are dropped.

| Parameter | Type | Description |
| --- | --- | --- |
| `$price` | `Brick\Math\BigDecimal\|int\|float\|string` | |

<dl><dt>Returns</dt>
<dd><code>self</code></dd>
<dt>Throws</dt>
<dd><code><a href="https://quittio.dev/docs/api/Quittio/Core/Exceptions/InvalidArgumentException">InvalidArgumentException</a></code> – for a line with a price including VAT: the gross price mode applies to all lines of an invoice, use withPriceInclVat()</dd></dl>

### `withPriceInclVat()`#

```
public function withPriceInclVat(BigDecimal|int|float|string $price): self
```

Copy with a new price including VAT (gross price mode). The calculator derives the net price again.

| Parameter | Type | Description |
| --- | --- | --- |
| `$price` | `Brick\Math\BigDecimal\|int\|float\|string` | |

<dl><dt>Returns</dt>
<dd><code>self</code></dd>
<dt>Throws</dt>
<dd><code><a href="https://quittio.dev/docs/api/Quittio/Core/Exceptions/InvalidArgumentException">InvalidArgumentException</a></code> – for a line with a net price, use withNetPrice()</dd></dl>

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://quittio.dev/#website","@type":"WebSite","description":"E-Rechnungen für PHP und Laravel: ZUGFeRD, XRechnung und Peppol erstellen, prüfen, lesen und archivieren.","inLanguage":"de-DE","name":"Quittio","url":"https://quittio.dev/","publisher":{"@id":"https://quittio.dev/#identity"},"workTranslation":{"@id":"https://quittio.dev/en#website"}},{"@id":"https://quittio.dev/docs/api/Quittio/Core/Data/Lines/InvoiceLine#webpage","@type":"WebPage","description":"Invoice line (BG-25).","name":"InvoiceLine – API-Referenz","url":"https://quittio.dev/docs/api/Quittio/Core/Data/Lines/InvoiceLine","isPartOf":{"@id":"https://quittio.dev/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://quittio.dev/docs/api/Quittio/Core/Data/Lines/InvoiceLine"]}],"primaryImageOfPage":{"@id":"https://quittio.dev/#logo"}},{"@id":"https://quittio.dev/#identity","@type":"Organization","description":"Open-Source-Bibliothek für E-Rechnungen in PHP und Laravel (ZUGFeRD, XRechnung, Peppol) und Quittio Managed.","email":"kontakt@niklasforst.de","legalName":"Niklas Forst – Softwareentwicklung","name":"Quittio","url":"https://quittio.dev","founder":{"@type":"Person","name":"Niklas Forst","url":"https://quittio.dev/ueber"},"logo":{"@id":"https://quittio.dev/#logo"},"sameAs":["https://github.com/Quittio/quittio","https://packagist.org/packages/quittio/quittio"]},{"@id":"https://quittio.dev/#logo","@type":"ImageObject","caption":"Quittio","contentUrl":"https://quittio.dev/logo.png","inLanguage":"de-DE","url":"https://quittio.dev/logo.png"}]}
```