> ## Documentation Index
> Fetch the complete documentation index at: https://docs.leadtobill.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Accounting export

> Export sent and cancelled invoices of a period as one file for your bookkeeping — as CSV or in DATEV, BMD, or Sage format

## Overview

The accounting export hands your invoices to your bookkeeping. You choose a
period, LeadToBill checks every sent and cancelled invoice in it, and you download
one file your accountant or tax advisor can import. Four formats are available:
**Generic CSV**, **DATEV Buchungsstapel (ASCII)**, **BMD NTCS (Buchungsimport)**,
and **Sage 50 Extra / Infoniqa ONE 50 (CH, TAF)**.

Before anything is written, a preview shows the invoices, their totals, and a list
of **Findings** — a missing account, a VAT rate without an export code, a customer
without a debtor account. You fix a finding without leaving the export, or skip
the invoice. Each export is kept in the **Export history**, and every invoice shows
in the invoice list whether it was exported.

> [card] [Open Accounting export](https://app.leadtobill.com/import-export/accounting-export)
>
> Go straight to the accounting export in LeadToBill.

## Before you start

**Controllers and Admins only.** The accounting export and its settings are not
offered to other roles — see [Roles](https://docs.leadtobill.com/guides/roles.md).

The export takes invoices that are **Sent** or **Cancelled**, including the credit
notes created by cancelling. Drafts are never exported. See
[Invoices](https://docs.leadtobill.com/features/invoices.md).

Set up once, ideally together with your accountant or tax advisor:

* **Accounts and the format**, under **Settings** on the **Accounting** tab — see
  the first step below.
* **An export code on each VAT rate.** The **Export code** of a
  [VAT rate](https://docs.leadtobill.com/settings/vat-rates.md) is the tax code your accounting system expects.
* **Revenue accounts on service types**, where a service should book to a
  different account than the default. Set **Revenue accounts** on the service type
  in the [service catalog](https://docs.leadtobill.com/settings/service-catalog.md).
* **A debtor account on customers** that have an account of their own in your
  accounting system. Set **Debtor account** on the customer under
  [Contacts](https://docs.leadtobill.com/features/contacts.md); left empty, the workspace default is used.

## Steps

**1. Set the accounts and the format**

Go to [**Import / export**](https://app.leadtobill.com/import-export/accounting-export),
open the **Accounting** tab, and select **Settings**.

* **Default revenue accounts** — one account per VAT treatment: **Domestic**,
  **EU**, and **Foreign**. A service type can override each of them; there is no
  fallback from one treatment to another.
* **Default debtor accounts** — one collective account per VAT treatment, for
  example separate receivables accounts for domestic, EU, and third-country
  customers. A customer with its own debtor account overrides all three.
* **Export format** — the format every export uses. The **?** beside it explains
  how the chosen format is imported and what it books.
* **Options for** the chosen format — for example delimiter, decimal separator,
  date format, encoding, and the columns for Generic CSV; the account length,
  fiscal year start, and consultant and client numbers for DATEV. Each option's
  **?** explains it.

Select **Save**.

**2. Choose the period**

Select **Export**. Under **Period**, choose **This month**, **Last month**,
**This quarter**, **Last quarter**, or **Custom** with **From** and **To**. The
period is matched against the invoice date.

Invoices that were part of an earlier export are left out. Switch on **Include
already exported invoices** to take them again. Select **Preview**.

**3. Check the preview**

The **Summary** shows the number of **Invoices** and **Booking lines** with the
**Net** and **VAT** totals. Below it, the table lists each invoice with its
**Number**, **Date**, **Customer**, **Debtor** account, **Net**, **VAT**, and the
number of **Findings**. A cancellation is marked **Credit note**. When the format
attaches the invoice PDFs, a **PDF** column shows whether each one is stored.

Select an invoice to see its findings. **No findings — everything can be
exported.** means you can go straight on.

**4. Fix or skip what is flagged**

Each finding says what is missing and offers the place to fix it — **Open
contact**, **Open service type**, **Open VAT rate**, **Open accounting settings**,
or **Open invoice**. Contacts, service types, VAT rates, and settings open on top
of the export; when you close them, the preview is checked again. For a missing
invoice PDF, **Reconstruct PDF** rebuilds it. **Admins only.**

Some findings are only notes and do not stop the export. Others have to be
resolved first: **Fix or skip the remaining errors before exporting.** Where an
invoice cannot be exported in the chosen format — a foreign currency, no
customer, a line without a VAT rate, a missing PDF, or inconsistent totals — a
**Skip** switch appears in its row. A skipped invoice is left out of the file and
recorded with its reason.

**5. Export and download**

Add a **Note (optional)** — for example "Q2 handed to the tax advisor" — and
select **Export & download**. The download starts at once: a single file, or a
ZIP archive when the export consists of several files.

If every invoice in the period is skipped, the button reads **Record skips**:
nothing is downloaded, and the skips are recorded so the period is cleared.

**6. Find an export again**

The **Export history** lists every export with its **Date**, **Period**,
**Format**, **Note**, number of **Invoices**, **Net**, and **Gross**. Use
**Download** or **Download all files (ZIP)** to get the files again.

Expand an export with skipped invoices to see each one with its **Reason**.
**Unskip** makes the invoice pending again for a later export.

## Good to know

**An invoice is exported once.** After an export, its invoices no longer appear in
later previews unless you switch on **Include already exported invoices**. Skipped
invoices are left out in the same way until you select **Unskip**.

**The invoice list shows the state.** In [Invoices](https://docs.leadtobill.com/features/invoices.md), the
**Accounting** column shows **Exported** or **Skipped**, and the **Accounting**
filter finds invoices by **Not exported**, **Exported**, or **Skipped**.

**Deleting an export makes its invoices pending again.** **Delete export** removes
the export file and returns its invoices to the next export. An accounting system
that already imported the file is not affected.

**Accounts are resolved in a fixed order.** A line's revenue account is the
service type's account for the invoice's VAT treatment, or else the workspace
default for that treatment. The debtor account is the customer's own, or else the
default for the treatment.

**The format is a setting, not a choice per export.** The export dialog names the
format in its description. To use another one, change **Export format** in
**Settings** first.

**One export holds at most 1,000 invoices.** Narrow the period if the preview says
it contains too many.

**Some formats want one fiscal year per export.** If the period crosses the start
of the fiscal year set in the format's options, the preview asks you to export one
period per fiscal year.

**Generic CSV is yours to shape.** One row per booking line, with the invoice and
customer details repeated on every row. Under **Columns**, drag to reorder, remove
columns, or add them back; **Reset to default** restores the original order. The
column headers in the file are always English.

**Some formats come with extra files.** Depending on the format's options, an
export can include a file with customer master data — to be imported before the
bookings — or the invoice PDFs. These exports download as a ZIP archive.

**Invoices sent in the meantime stay pending.** If invoices in the period are sent
while you are working in the preview, the export tells you how many were finalized
meanwhile and are still pending. Run the export again to take them.

**Codes and accounts are your accounting system's.** LeadToBill writes the account
numbers and tax codes you enter; it does not know your chart of accounts. Have
your accountant or tax advisor confirm them before the first import.

## FAQ

**Who can run the accounting export?**
Controllers and Admins. Other roles do not see the **Accounting** tab.

**Why is an invoice missing from the preview?**
It is still a draft, its invoice date lies outside the period, or it was already
exported or skipped. Switch on **Include already exported invoices** to see
exported ones again, or **Unskip** a skipped invoice in the **Export history**.

**Why does the preview say the period contains no exportable invoice?**
No sent or cancelled invoice with an invoice date in the period is still pending.

**Can I change the format for a single export?**
Not in the export dialog. Change **Export format** under **Settings**, then run the
export.

**What happens to a cancelled invoice?**
Both the original invoice and the credit note created by cancelling it are
exported. The credit note is marked **Credit note** in the preview.

**I exported the wrong period. Can I undo it?**
Select **Delete export** in the **Export history**. The invoices become pending
again and can be exported anew. This does not change anything in an accounting
system that already imported the file.

**Why can't I download an older export?**
If an invoice PDF or a file of that export is no longer stored, the archive cannot
be assembled. Delete the export and run it again — the affected invoice can then be
fixed or skipped.

**Where do I import contacts?**
On the **Contact import** tab of the same screen. **Admins only.** See
[Contact import](https://docs.leadtobill.com/features/contact-import.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.