# Locked periods and lock dates

> Filing a VAT return locks its period, and lock dates close your books, so the figures behind a return cannot change afterwards.

Source: /help/en/vat/period-locking

Once a VAT return is filed, the invoices behind it must not change. Alya Books locks a period in two ways: automatically when you file its VAT return, and up to a **lock date** you set, for example after closing the books or the annual audit.

1. **File the return.** On the **VAT Return** page, click **Mark as filed and lock period** and confirm. The period is locked straight away.
2. **Set lock dates (optional).** Go to **Settings → Tax & currency → Lock dates**:
- **Lock date for everyone**: nobody can change anything dated on or before it.
- **Lock date for other members**: only owners, admins and members allowed to reopen VAT periods can change documents dated on or before it. Each such change is logged.
- **Lock up to the end of the last fiscal year** fills in the end of your previous fiscal year (**Fiscal year starts in**, in **VAT return periods**).
3. **Reopen when needed.** On the **VAT Return** page, **Reopen** asks for the reason and confirmation that changes may need a voluntary disclosure. The period is open until you file the return again.

What a lock stops, for documents dated in the period:

| Document | Locked by a filed return | Locked by a lock date |
| --- | --- | --- |
| Invoices, credit and debit notes (issue date and date of supply) | Yes | Yes |
| Accepted supplier invoices | Yes | Yes |
| Payments (payment date) | No | Yes |
| Quotes, order confirmations, proformas | No | Only with **Apply to quotes, order confirmations and proformas** |

Good to know:

- Locked means no new document, no changes, no deletion, and drafts cannot be submitted or emailed. Payment status, categories, cost centres, projects and notes can still change.
- Correct an invoice in a locked period with a credit or debit note dated today. It counts in the current period.
- A supplier invoice dated in a locked period is still received. When you accept it, its input VAT goes to the first open period, and the invoice shows "Input VAT in the period of …".
- The lock date for everyone must be moved back before reopening a return it covers.
- Only owners and admins can change lock dates. Every filing, reopening and lock date change is recorded in the audit log, and the other owners and admins are notified of a reopen.
- Recurring invoices whose date is in a locked period are skipped, with the reason under the schedule's runs.
- Through the API, a write into a locked period returns `409 period_locked` with the first open date. API keys need the `periods:manage` scope to reopen returns, change lock dates or pass the lock date for other members.

Related:

- [VAT 201 worksheet](/help/en/vat/vat-201-worksheet)
- [Credit notes with VAT](/help/en/vat/credit-notes-with-vat)
- [Correct or cancel an invoice](/help/en/invoices/correct-or-cancel-an-invoice)
