# Documents

> Drafts change freely; a finalized Document is numbered, never changes, and posts what it records to the ledger.

A quote, an order, an invoice, a payment, and a journal entry are **Documents**: records the
business and others rely on as final. One rule covers all of them: a draft changes freely; a
finalized Document is numbered and never changes.

## How a Document moves

An invoice moves like every Document:

1. **You draft it.** A draft changes freely, has no number, and can be deleted. It shows its title,
   its type in place of a number, and the status **Draft**.
2. **You finalize it** with its own Action, **Issue invoice**. In one step, it gets the next number,
   such as `INV-US-12`, becomes final, and posts to the general ledger.
3. **It never changes again.** Nobody edits or deletes it. Only its own Actions move it, such as
   **Void invoice**.

Each Document has its own Action that finalizes it, named as accountants and sales teams name it:

| Document      | Finalized by           | Number      | Posts to the ledger |
| ------------- | ---------------------- | ----------- | ------------------- |
| Quote         | **Send quote**         | `Q-12`      | No                  |
| Order         | **Confirm order**      | `SO-7`      | No                  |
| Invoice       | **Issue invoice**      | `INV-US-12` | Yes                 |
| Payment       | **Receive payment**    | `PAY-US-3`  | Yes                 |
| Journal entry | **Post journal entry** | `JE-40`     | Yes                 |

A quote or an order binds the business to a customer, but moves no money, so it posts nothing.

## How numbers are assigned

A Document gets its number in the same step that finalizes it. If finalizing fails, no number is
used. So each series runs in order with no gaps.

Invoices and payments are numbered per legal entity: `INV-US-12` is the twelfth invoice of the
entity coded `US`. Each entity's series stays complete on its own, as tax authorities expect.

## Correct a final Document

To change a final Document, you correct it with a new step, never an edit. The original stays as it
was, so what the customer saw and what was posted stay on record.

| To fix                 | Do this                                                  |
| ---------------------- | -------------------------------------------------------- |
| A sent quote           | Draft a new quote with the new terms                     |
| A confirmed order      | **Cancel order**; it stays on record, canceled           |
| An issued invoice      | **Void invoice**; it reverses what the invoice posted    |
| A received payment     | **Void payment**; the invoices it paid fall due again    |
| A posted journal entry | **Reverse journal entry**; it posts the opposite entries |

A **reversal** posts entries equal and opposite to the original ones, so the books net to zero and
both stay in the history. A voided invoice keeps its number, so the series still has no gaps.

## Lines, and Documents drafted from others

A Document has **lines**, such as the items on an order. An order drafted from an accepted quote
copies the quote's lines, and an invoice drafted from a confirmed order copies the order's lines.

## Records that aren't Documents

Deals, tasks, projects, to-dos, companies, and people are **Objects**: they have no draft and are
never finalized. You change them whenever the facts change, and their
[Activity](/docs/concepts/activity) keeps every earlier value. Those with numbers, such as `DEAL-7`,
get one when they are created, and a deleted one leaves a gap in its series, which doesn't matter for
work.

## Next steps

<Cards cols={3}>
  <Card title="Ledgers and money" href="/docs/concepts/ledgers" icon="book">
    What finalizing posts, and why it balances.
  </Card>
  <Card title="Invoices" href="/docs/apps/finance/invoices" icon="receipt">
    Issue an invoice, and void one.
  </Card>
  <Card title="Send a quote" href="/docs/guides/send-a-quote" icon="handshake">
    Draft a quote, send it, and record the answer.
  </Card>
</Cards>
