# The quotation & invoice editor

In a project's **Accounting** tab, work is billed in **cycles**: one quotation, its order
confirmation, and the invoices and delivery notes that follow from it. All of these documents
use the same editor.

## The document chain and its statuses

A cycle runs **quotation → order confirmation → invoice(s)**. Each document goes through these
statuses:

1. **Draft**: *only drafts are editable*. Once a document leaves draft, its content, discounts
   and totals are locked, and so is everything in the **Document** panel (date, texts, address,
   contacts, language, custom fields). The panel then shows them as they are on the PDF.
2. **Published**: final and ready to send. This is when an invoice gets its number.
3. **Confirmed** (quotations only): the customer accepted. docket creates the order confirmation
   from it; you never create one yourself. The projects dashboard shows a confirmed quotation as
   *awaiting invoice*.
4. **Paid** (invoices only): set it when the money arrives. Overdue invoices are flagged
   automatically.

A quotation the customer has (sent or confirmed) can be **canceled**; a draft is deleted instead.
Canceling an invoice creates a cancellation invoice that reverses it. For the whole flow as a diagram, see
[The billing cycle at a glance](https://docket.rocks/en/docs/billing-cycle).

Project Managers and Admins create, edit and publish documents and mark invoices paid, but only
an Admin publishes invoices. Project Managers and Admins delete a quotation while it's a draft or
canceled, and an invoice while it's a draft. Order confirmations and delivery notes are deleted
by an Admin.

## Phases, positions, services

A document has three levels:

- **Phases**: the big blocks ("Phase 1: Concept", "Phase 2: Implementation"), each with its own
  title, description and subtotal. The customer sees the same structure on the PDF.
- **Positions**: the deliverables inside a phase ("Design system", "CMS setup").
- **Services**: the price lines inside a position. Each has a service from your price list, a
  quantity in **days or hours**, and a rate (pre-filled from the project's rate cascade,
  adjustable per line).

An empty document first asks which structure it gets:

- **In phases**: as many phases as you need. A phase can hold your own work and external costs
  side by side; each price line says which it is. The right choice for anything bigger.
- **Agency and external services**: two fixed blocks instead of phases, **Agency service** (what
  your agency does itself) and **External service** (what you buy in and pass on). Meant for
  small, quick quotations and flat fees.

> **The structure is permanent.** A document is built either from phases or from the two fixed
> blocks, never a mix, and you can't switch later. The order confirmation and the invoices
> created from a quotation keep its structure. If you picked the wrong one, start a new document.

An empty quotation or invoice can also start **from a template** (see *Templates*) and then gets
the template's structure.

## Working in the editor

At the top of a document:

- **Edit** opens the editing panel on the document's left, **Comments** your team's comments on
  its right. Only one is open at a time.
- **More** holds **Save as template**, **Back to edit mode** (a published document becomes a
  draft again), **Last minute edit** (a published invoice your customer doesn't have yet goes
  back to edit mode and keeps its number), **Correct invoice** and **Cancel quote** /
  **Cancel invoice**. It only offers what the document allows right now.
- **Publish** finalizes the draft. docket keeps the PDF as it went out, whatever your letterhead,
  the address or the footers say later. A published invoice also keeps its figures and its due
  date (the invoice date plus the customer's or the workspace's payment term, printed on it).

The editing panel shows the document's settings (contact person, date, language, address, intro
and closing text, the customer's custom fields) until you click a phase, block, position or
price line, or add one with **+**. Then it edits that. The path at its top (e.g. *Document ›
Phase 1 › 1.2 Layout*) leads back up.

Also in the editor:

- **Optional items**: a phase, position or price line can be optional. The customer sees it, but
  it's **not included in the total**, which suits upsells and alternatives. For a phase, use
  **Optional phase** right under its title. The agency and external services blocks can't be
  optional as a whole.
- **Discount / surcharge** on the whole document.
- **VAT per line.** A document starts on your workspace's default rate, and every price line can
  pick another of your rates (print at 7 % next to design at 19 %, say). A service can carry its
  own starting rate, so "Druck" lines begin at 7 % without a click. On a mixed document every
  line names its rate, and the PDF lists the VAT per rate with the net it applies to, plus the
  gross. A quotation on one rate ends on the net total. Discounts, surcharges, advance payments
  and the final invoice's deductions are split over the rates the same way. Whether VAT is
  charged at all depends on the customer address (see *Customers: contacts, addresses & custom
  fields*). Rates and tax treatment are fixed once the document leaves draft.
- A free-text **footer** per document (terms, delivery notes).
- A **language** per document (German or English). Labels and the PDF follow it.
- The customer's **custom fields** (e.g. a PO number) are printed on the PDF (see *Customers:
  contacts, addresses & custom fields*).

The invoice editor shows quoted vs. **billed quantities** per line, i.e. how much of the
quotation each invoice uses.

## Templates

A template keeps a document's content for the next one: its phases (or the two fixed blocks)
with positions and price lines, the intro and closing text, and the "Show subtotal for
positions" setting. Discounts and surcharges aren't included. A template saved from a quotation
is offered for quotations, one saved from an invoice for invoices.

- **Save:** **More → Save as template**. Give it a name and an optional note, and choose whether
  it's offered for **every customer** or **only this document's customer**.
- **Use in a document:** an empty quotation or invoice lists the templates for every customer and
  the customer's own under **Or start from a template**. Click one to fill the document. An
  invoice to an order confirmation takes its lines from it, so only invoices without one start
  from a template.
- **Use from the list:** **Accounting → Templates** shows all templates, grouped into *All
  customers* and one group per customer. **Use** asks for the project (for a customer's
  template, one of that customer's projects), creates a draft there and opens it. An invoice
  created this way starts a billing cycle of its own.
- **Prices:** service lines keep only the service and the quantity. They're priced at the rates
  of the project you use the template in, so a template never carries an old rate or another
  customer's. Custom lines and flat rates keep their amounts. If a service in a template has
  been deleted, the list says so: its lines would cost nothing.
- **Change:** start a document from the template, adjust it, then choose **More → Save as
  template** and **Update "…" with this quotation** (or invoice). Name, note and customer are
  changed under **Accounting → Templates**, where you also delete templates. Documents already
  started from a template don't change.

Advance payments and cancellation invoices take no template: their content comes from the
quotation or from the invoice they cancel.

Project Managers and Admins save, change and delete templates, including a colleague's.

## Invoice numbers

- A draft has **no number**. Its PDF shows a placeholder and is marked as draft.
- The number is assigned **at publish**, sequentially and gap-free per workspace. Deleting
  drafts never uses up a number.
- An optional, date-based **prefix** comes from your account settings: a year prefix turns 20034
  into `2026-20034`.
- If your numbers must come from elsewhere (an existing ERP sequence, say), enable **custom
  invoice numbers** under Administration → Settings → Invoicing. docket's own numbering is then
  off: publishing asks you for the number, and docket only checks that it's unused.

## Company-wide document settings

Under **Administration → Settings → Invoicing** you set what every PDF carries (letterhead, bank
details, VAT id, logo) and the **VAT rates** a line can pick. One rate is the default that new
documents and lines start on. Removing a rate changes no document: issued documents keep their
rates, and a draft line already on it keeps it (shown as "no longer offered") until you pick
another one.

When a rate changes by law, add the new one and make it the default on the day it applies. Remove
the old rate once nothing is billed at it any more. Check drafts for work after the change.

**Country**: Germany, Austria or Switzerland, where your company is based. You pick it at signup,
and the setup asks once more. It decides what your tax ids are called on documents ("UID-Nr." in
Austria, "MWST-Nr." in Switzerland), the notes on documents without VAT and how numbers are written
(CHF 1'234.50 in Switzerland). An Austrian invoice over 400 € gross can only be published with your
UID-Nr., and over 10,000 € gross with the customer's too. A Swiss workspace has no EU reverse
charge: customers abroad are "Abroad". A new country brings its VAT rates, unless you changed them.
Like the currency, the country is fixed once the first document or external cost exists.

**Swiss QR-bill**: a Swiss workspace enters its IBAN or QR-IBAN and the account holder's address
there. Every invoice then gets the QR-bill as its last page once it has its number, with the amount
due and the customer's address as payer. With a QR-IBAN the reference is a QR reference made from
the invoice number, otherwise a creditor reference (RF…).

**Currency**: euros, and in Switzerland Swiss francs or euros, for every amount in the workspace.
Set it before the first document or external cost; after that it is fixed.

**VAT status**: when you were a small business (Kleinunternehmer; in Switzerland: not registered
for VAT) and when you charged VAT, each from a date; the first one also stands for everything
before it. On the dates you are a small business, documents to customers in your country charge no
VAT and open their footer with the note your country's law asks for. A Swiss document then doesn't
mention VAT at all. Customers abroad keep their treatment. Outgrew the limit? **Add** "Regular VAT"
from the day you started charging it, and the same the other way round. A new status starts after
your latest issued document and external cost, and one with documents or costs in its period can't
be deleted (the lock says why): issued documents never change. Drafts follow at once.

- **Settings → Wording**: the texts a document shows in its own language, i.e. the footers for
  quotes and invoices and the document titles ("Rechnung", "Final Invoice", …), German and
  English side by side.
- **Settings → Font**: Inter by default, or your own font (TrueType or OpenType, uploaded per
  style). Only upload a font whose license allows embedding it in the PDFs you send; docket
  can't license fonts for you.

## Invoice types

When you create an invoice in a cycle, you pick its type. docket keeps the types consistent
within a cycle (advance payments and partial invoices don't mix, for example).

An invoice to a quotation shows how it differs from it: **blue** is not in the quotation, **yellow**
is changed from it; a line above the document says which colours are in use. An invoice without a
quotation marks nothing.

### Advance payment (Abschlagsrechnung)

Bills **part of the quotation total** before or during the work, as a percentage or a fixed
amount. Use it for arrangements like "50 % upon order".

### Partial invoice (Teilrechnung)

Bills **selected positions** of the quotation that are done, at their real value. It starts with
every position ticked that no earlier invoice billed; untick what isn't due yet. Billed
quantities are tracked, so the next partial invoice starts where the last one stopped.

A position you add to an invoice comes ticked. An invoice without a quotation bills everything
it has, so it shows no ticks at all.

### Final invoice (Schlussrechnung)

Closes the cycle. It contains the full quotation, **including positions added along the way**,
and lists all previous advance and partial invoices as deductions, so the customer sees what
remains to pay. After it, the cycle takes no more invoices.

### Cancellation invoice (Stornorechnung)

Voids a published invoice: it references the **original invoice**, mirrors its content and gets
its own number. The original is marked canceled; nothing is deleted or renumbered.

## Where the money side connects

- A **confirmed quotation** counts in the revenue forecast. It reaches the project's budget through
  the dialog after **Confirm quote**: **Set as budget** or **Add to budget**.
- The **projects list** shows in its **Billed** column how far a project's cycles are billed (see
  *Billing cycle*).
- **External costs** assigned to the quotation can be exported as a PDF bundle for the customer
  (see *External costs*).