> ## Documentation Index
> Fetch the complete documentation index at: https://whalescorp.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Blling Period Assignment

`billing_period` stores the first day of the calendar month (e.g. `2026-03-01`). Added in migration 035. Pre-035 entries have `NULL` and are handled with a fallback in invoice generation:

```text theme={null}
WHERE (billing_period = $periodDate
   OR (billing_period IS NULL AND DATE_TRUNC('month', created_at) = $periodDate))
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.