# External costs

When you buy something for a project (a freelancer, stock photos, printing, hosting), the
supplier invoice is an **external cost**. Recorded in docket, it shows up in the project's
Controlling next to the booked hours, so margins stay honest.

External costs live under **Accounting → External costs**. Only Project Managers and Admins can
see and delete them.

## Recording a supplier invoice

Every external cost needs:

- a **supplier** (pick one or type a new name to create it); the invoice number must be unique per
  supplier and VAT rate, so the same bill can't be entered twice,
- the **invoice number** and **invoice date**,
- the **net amount**, the **VAT rate** and the **VAT** as the invoice states it (docket works it
  out from amount and rate until you enter it),
- the **invoice file (PDF)**, which is required.

Optionally set a **responsible person**. They get an email when the cost is assigned to them, and
whenever responsibility changes hands.

### Invoices in another currency

Choose the invoice's **currency** and enter its net amount as it says. docket works out the net
amount in your workspace's currency at the ECB reference rate of the invoice date (on a weekend or
holiday, the last working day's). Your bank or card may have charged a little more or less: if you
know that amount, enter it instead and docket keeps it. Controlling and budgets always count the
amount in your workspace's currency.

### Filled in from the invoice

If the PDF contains an **e-invoice** (ZUGFeRD, Factur-X or XRechnung), docket fills in supplier,
invoice number, date, net amount and VAT rate as soon as you choose the file. A supplier docket
doesn't know yet is added. Fields you've already filled stay as they are.

For other invoices an Admin can turn on **Read supplier invoices with AI** under **Administration →
Integrations → AI**. **Read with AI** under the file then has the AI read the invoice and fill in the
details. Check them before saving. Optionally, every upload is read this way.

Which AI reads is set in the same place. By default it's Mistral, an AI provider in the EU, through
docket, within the workspace's monthly AI quota (shared with [booking time with AI](https://docket.rocks/en/docs/time-entries-with-ai); need more?
Write to info@docket.rocks). With your own API key from Mistral, OpenAI or Anthropic,
invoices go to your account there instead, under your contract with that provider, and without a
monthly limit in docket. docket checks the key when you save it and stores it encrypted.
Any other service with an OpenAI-compatible API works too (your own server, Azure OpenAI, IONOS …):
choose **Another OpenAI-compatible service** and enter its address (up to `/v1`) and the model.
Such a service reads a PDF's text, so a scan without a text layer can't be read that way.

An invoice that charges several VAT rates is entered once per rate, each time with that rate's net
amount and VAT. docket then only fills in supplier, number and date.

### Small business

A small business (Kleinunternehmer) can't reclaim the VAT it pays, so in such a workspace a cost
counts **with its VAT**, in the project and when passed on to the customer. The form shows this as
**Input VAT deductible**, set from your workspace's VAT status on the invoice date (Administration
→ Settings → Invoicing); change it for a single cost if needed. A cost keeps what it was saved with.

### KSK

If a supplier is subject to the German **Künstlersozialkasse**, flag it on the supplier. docket
then shows the KSK levy on each of their invoices, using the official rate for the invoice year.
Austria and Switzerland have no such levy, so workspaces there don't see the option.

## Assigning costs to projects and quotes

Assign each cost to a **project and quotation**. Only then does it appear in the project's
Controlling and count in its budget: within an amount budget, and beside an hour budget against the
quoted external services.

- A cost can be split across **several projects/quotes**.
- With **partial amounts** you assign only part of the invoice to each target and mark the
  matching region on the PDF, so it's clear later which line items went where. docket shows the
  **unassigned remainder**.
- Per assignment you decide whether the cost is **chargeable**, i.e. passed on to the customer.
- **Partial bill** marks an invoice that is one of several from the supplier for the same job.
  Under it, **Belongs with** links it to another of the supplier's invoices: each then shows the
  others and what the job has cost in all.

A cost can stay unassigned only as a **draft**. Every other status requires at least one
assignment.

If you delete a quotation that has external costs assigned, docket asks what to do with them:
**move** them to another quotation of the same project, or **unassign** them, which puts them
back to draft. Costs never stay on a deleted quotation.

## Statuses

1. **Draft:** just captured, not yet checked or assigned.
2. **To clarify:** something's off (wrong amount, unclear project) and needs a decision.
3. **OK:** checked and correctly assigned.
4. **Processed:** handled downstream (e.g. paid or passed on).

docket records when the status last changed. The list can be filtered by status, supplier,
project, quote, responsible person and date.

## Where the costs show up

**Project → Controlling** lists the project's external costs and their total next to the booked
time.

### More than the quote sold

docket compares the supplier invoices booked on a confirmed quotation, **chargeable or not**, with
the **external services** that quotation sold (optional items left out). A quote that sold none
and has costs booked counts as over.

- **Project → Controlling** shows **External costs**, e.g. "1.500,00 € of 800,00 € quoted, of
  which 300,00 € not passed on", red once they're over.
- **Accounting** lists the **running jobs** whose external costs are over, the furthest over
  first: confirmed quotations without an issued final invoice, whatever year they're from.
- The **Forecast** shows each confirmed quote's booked external costs in **Ext. costs booked**,
  marked in red when they're over. **External services** next to it is what the quote or invoice
  itself lists.

## External-costs PDF for the customer

In the project's **Accounting** tab, every quotation offers an **external-costs PDF** to send
along with your invoice as proof. It contains:

- a **summary page**: one line per supplier invoice (date, invoice number, supplier, amount
  assigned to this quote), KSK levies where they apply, and the **total**;
- the **supplier invoices** themselves. For costs with partial amounts, only the **relevant
  pages** are included, with the assigned regions marked.

Only costs that are **chargeable**, assigned to **this quotation** and no longer a draft are
included. The PDF is in the quotation's language (German or English).

## Suppliers

Suppliers are managed under **Administration → Suppliers**: a name, plus the KSK flag where it
applies. You can also add one on the spot by typing its name in the supplier field of an external
cost. A supplier that has invoices can't be deleted.