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

# Revenue rules

> The recognition rules that distribute a line item's amount across periods.

A **recognition rule** determines how an invoice line item's amount is spread
into revenue rows. The rule is configured per plan item
(`planItem.config.revenueRule`) and applied automatically during
[generation](/docs/revenue-recognition/automatic-generation).

***

## `immediate`

The full line-item amount is recognized in the **invoice month**.

> Example: a $1,200 line item on an invoice dated 15 Mar → one revenue row of **$1,200\*\* for March.

***

## `proportionate`

The amount is recognized **straight-line by day** across the line item's service
period (`fromDate` → `toDate`). Partial start/end months are prorated by the
number of days that fall in each month.

Revenue is never recognized before the invoice date — any portion that would
land in a month earlier than the invoice `date` is **carried forward** into the
invoice month.

> Example: a $1,200 line item for 1 Jan–31 Dec (daily rate ≈ $3.29) →
> \~$102 per 31-day month, ~$99 for 30-day months, invoiced in January. If the
> invoice were dated in March, Jan+Feb amounts fold into March.

***

## `milestones`

Revenue is recognized against **completed** `revenue_trigger` milestones on the
contract plan item. Each completed milestone recognizes:

```
amount × (milestone.percentage_of_revenue / 100)
```

in the month of the milestone's actual completion date. Milestones that are not
yet complete recognize nothing; if there are no milestones, no revenue is
generated until one completes.

> Example: a $1,000 line item with milestones 40% (completed Feb) and 60%
> (completed May) → **$400\*\* in February and **\$600** in May.

***

## Deferring recognition

A line item whose amount is not yet recognized by any rule remains **deferred** —
it shows up in the [Deferred report](/docs/revenue-recognition/reports) as
invoice value not yet recognized, and can be recognized later manually or via
[deferred revenue](/docs/revenue-recognition/deferred-revenue).
