---
title: "RenderInvoice – API-Referenz · Quittio"
description: "Renders an invoice in the queue and stores the main output on a disk."
canonical_url: "https://quittio.dev/docs/api/Quittio/Laravel/Jobs/RenderInvoice"
locale: de
meta:
  "og:description": "Renders an invoice in the queue and stores the main output on a disk."
  "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": "RenderInvoice – 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) \\ [Laravel](https://quittio.dev/docs/api/Quittio/Laravel) \\ [Jobs](https://quittio.dev/docs/api/Quittio/Laravel/Jobs)

# RenderInvoice

final class in quittio/laravel · implements `Illuminate\Contracts\Queue\ShouldQueue` · uses `Illuminate\Queue\InteractsWithQueue`, `Illuminate\Bus\Queueable`

`Quittio\Laravel\Jobs\RenderInvoice` · [Source](https://github.com/Quittio/quittio/blob/v0.7.1/packages/laravel/src/Laravel/Jobs/RenderInvoice.php#L39)

Renders an invoice in the queue and stores the main output on a disk.

The invoice travels as JSON snapshot with its version, so jobs queued before an update of the data model are brought up to date by the configured upcasters; the render options travel as versioned JSON as well (RenderOptions::toArray()). Errors that another attempt cannot fix (validation, invalid data, configuration) fail the job at once; others, e.g. a disk that is not reachable, are retried.

## Constants \#

| Constant | Value | Description |
| --- | --- | --- |
| `PERMANENT_ERRORS` | `[\Quittio\Core\Validation\ValidationException::class, \Quittio\Core\Exceptions\InvalidInvoiceData::class, \Quittio\Core\Calculation\CalculationException::class, …` | Exceptions that fail the job without a further attempt. |

## Properties \#

| Property | Type | Description |
| --- | --- | --- |
| `$backoff` | `list<int>` | |
| `$disk` readonly | `?string` | |
| `$invoice` readonly | `string` | |
| `$options` | `[RenderOptions](https://quittio.dev/docs/api/Quittio/Core/Rendering/RenderOptions)\|string` | JSON of RenderOptions::toArray(); a RenderOptions object in jobs queued by Quittio 0.1.0. |
| `$path` readonly | `?string` | |
| `$tries` | `int` | |

## Methods \#

| Method | Description |
| --- | --- |
| `->__construct()` | |
| `->data()` | |
| `->failed()` | Called by the queue worker when the job failed for good. |
| `->handle()` | |
| `->middleware()` | |
| `->renderOptions()` | |

### `__construct()`#

```
public function __construct(
    string $invoice,
    RenderOptions|string $options,
    ?string $disk = null,
    ?string $path = null,
)
```

| Parameter | Type | Description |
| --- | --- | --- |
| `$invoice` | `string` | |
| `$options` | `[RenderOptions](https://quittio.dev/docs/api/Quittio/Core/Rendering/RenderOptions)\|string` | |
| `$disk` | `?string` = `null` | |
| `$path` | `?string` = `null` | |

### `data()`#

```
public function data(?SnapshotUpcasterChain $upcasters = null): InvoiceData
```

| Parameter | Type | Description |
| --- | --- | --- |
| `$upcasters` | `? [SnapshotUpcasterChain](https://quittio.dev/docs/api/Quittio/Core/Serialization/Snapshots/SnapshotUpcasterChain)` = `null` | |

<dl><dt>Returns</dt>
<dd><code><a href="https://quittio.dev/docs/api/Quittio/Core/Data/InvoiceData">InvoiceData</a></code></dd>
</dl>

### `failed()`#

```
public function failed(Throwable $exception): void
```

Called by the queue worker when the job failed for good.

| Parameter | Type | Description |
| --- | --- | --- |
| `$exception` | `Throwable` | |

### `handle()`#

```
public function handle(
    QuittioManager $quittio,
    ?SnapshotUpcasterChain $upcasters = null,
): void
```

| Parameter | Type | Description |
| --- | --- | --- |
| `$quittio` | `[QuittioManager](https://quittio.dev/docs/api/Quittio/Laravel/QuittioManager)` | |
| `$upcasters` | `? [SnapshotUpcasterChain](https://quittio.dev/docs/api/Quittio/Core/Serialization/Snapshots/SnapshotUpcasterChain)` = `null` | |

### `middleware()`#

```
public function middleware(): list<object>
```

<dl><dt>Returns</dt>
<dd><code>list&lt;object&gt;</code></dd>
</dl>

### `renderOptions()`#

```
public function renderOptions(): RenderOptions
```

<dl><dt>Returns</dt>
<dd><code><a href="https://quittio.dev/docs/api/Quittio/Core/Rendering/RenderOptions">RenderOptions</a></code></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/Laravel/Jobs/RenderInvoice#webpage","@type":"WebPage","description":"Renders an invoice in the queue and stores the main output on a disk.","name":"RenderInvoice – API-Referenz","url":"https://quittio.dev/docs/api/Quittio/Laravel/Jobs/RenderInvoice","isPartOf":{"@id":"https://quittio.dev/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://quittio.dev/docs/api/Quittio/Laravel/Jobs/RenderInvoice"]}],"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"}]}
```