Every cost template can optionally apply only for a certain period. Typical examples:
- a **peak surcharge** from November to December,
- a **price change** from a fixed date: the old template gets a **Valid until** date, the new one a **Valid from** date.

The validity period is available in [Order costs](/billing/order-costs.md), [Unloading costs](/billing/unloading-costs.md), [Storage space costs](/billing/storage-space-costs.md), [Article costs](/billing/article-costs.md), [Material costs](/billing/material-costs.md), [Pallet costs](/billing/pallet-costs.md), the [Shipping cost matrix](/billing/shipping-cost-matrix.md) and [Invoice items](/billing/invoice-items.md).

![Screenshot: Cost template form with the "Valid from", "Valid until" and "Repeat every year" fields at the bottom](/billing/images/validity-period-form.png)

## Before you start
- You need permission for the cost template you want to change (see the page of the respective cost type).

## Step by step
1. Open the cost template you want to limit, or create a new one.
2. Set **Valid from** (*Gültig von*) and/or **Valid until** (*Gültig bis*). Both dates are inclusive. Leave a field empty for "unlimited".
3. Optional: switch on **Repeat every year** (*Jedes Jahr wiederholen*) if the period should come back every year (see below).
4. Click **Save** (*Speichern*).

In the template list, the period is shown below the **Active** (*Aktiv*) icon.

![Screenshot: Overview list of order cost templates with validity periods in grey, blue and red below the Active icon](/billing/images/validity-period-list.png)

## Fields and options
| Field | Meaning | Required |
|---|---|---|
| **Valid from** (*Gültig von*) | First day on which the template applies. Empty = unlimited. | no |
| **Valid until** (*Gültig bis*) | Last day on which the template applies. Empty = unlimited. | no |
| **Repeat every year** (*Jedes Jahr wiederholen*) | Only day and month count, the year is ignored. 01.11. to 31.12. then applies every year. A period such as 01.12. to 31.01. runs across the turn of the year. | no |

If you accidentally enter a "Valid from" date after the "Valid until" date, X-Sitter swaps the two dates when saving (not for yearly periods, where a period across the turn of the year is intended).

## Colours in the list
| Display | Meaning |
|---|---|
| grey | **Validity Period** (*Gültigkeitszeitraum*) – the template is currently valid. With "annually" (*jährlich*) it is a yearly recurring period; it never expires. |
| blue | **The validity period does not begin until** (*Gültigkeitszeitraum beginnt erst*) – the template becomes valid in the future. |
| red | **Validity period has expired** (*Gültigkeitszeitraum abgelaufen*) – the template is no longer charged. |

## How the period affects the statement
- If the validity period lies completely outside the billing period, the template is skipped.
- **Time-based costs** ([Storage space costs](/billing/storage-space-costs.md), time-based [Article costs](/billing/article-costs.md)) are only calculated for the overlapping days.
- **Event-based costs** (orders, advance notices, material movements, shipping labels, pallets) only count events whose date lies within the period.
- [Invoice items](/billing/invoice-items.md) with "Insert on each invoice" only appear if their validity period overlaps the billing period.
- [Recorded VAS](/billing/record-vas.md) have no validity period – the **Date of service** decides.

![Screenshot: Client statement for November showing a peak surcharge item that only counts orders from 1 November](/billing/images/validity-period-statement.png)

## Example: price change from 1 January
1. In the list, click **Duplicate** (*Duplizieren*) next to the current template. X-Sitter creates an inactive copy named "Copy - …" and opens it.
2. In the copy, enter the new price, set **Valid from** to 1 January and switch on **Active**. Save.
3. Open the old template, set **Valid until** to 31 December and save.

## Good to know
| Situation | Cause | Solution |
|---|---|---|
| An item is missing on the statement | The validity period does not overlap the billing period. | Check **Valid from** / **Valid until** in the template. |
| An item is charged twice | Old and new template are both valid on the same days. | Make sure the periods do not overlap. |
