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

# Proration Logic

> How Veles prorates recurring charges on quotes with short Phases, and how amendments value a change that takes effect mid-Phase.

Proration in Veles answers one question: how much of a year's price applies to a period that isn't exactly a year? It shows up in two places:

1. **On quotes**, when a Phase is shorter (or longer) than twelve months.
2. **On contracts**, when an amendment changes a line partway through a Phase.

Both use the same rule, described below.

***

## The rule: prices are annual, counted by days

Every recurring price in Veles is an **annual** price. Proration scales that annual price by how much of a year the period covers.

The **proration factor** is the number of years a period covers, counted like this:

1. Count whole **anniversary years** first. A year runs from the start date to the day before the same date next year. Jan 15, 2026 to Jan 14, 2027 is exactly one year.
2. Any days left over are divided by the length of the anniversary year they fall in: 365 days, or 366 if that year contains February 29.

Both the start and end dates count as days in the period. The factor is multiplied by the line's price, and the result is rounded to the cent for each line.

| Period | Factor | Annual price \$12,000 becomes |
| - | - | - |
| Jan 1, 2026 - Dec 31, 2026 | 1 | \$12,000.00 |
| Jan 1, 2026 - Jun 30, 2026 (181 days) | 181 / 365 = 0.4959 | \$5,950.68 |
| Dec 4, 2027 - Dec 3, 2028 (crosses Feb 29) | 1 | \$12,000.00 |

> [!NOTE]
>
> Billing cadence doesn't affect proration. A line billed monthly or quarterly is still priced and prorated from its annual price.

### What gets prorated

| Charge type | Prorated? |
| - | - |
| **Recurring** | Yes, by the factor above. |
| **One-time** | No. A one-time charge is always its full price, whatever the length of the Phase. |
| **Usage** | No. Usage charges depend on actual consumption, so they're left out of prorated totals entirely. |

***

## Proration on quotes

Each [Phase](https://docs.getveles.com/get-started/calculator/quote-phase.md) on a quote has a start and end date, or a length in months. Veles works out the factor for each Phase and applies it to every recurring line in it.

When a Phase is shorter than a year, the pricing table changes:

* The **Price** column is relabeled **Price (Annualized)**, because it still shows the full annual price.
* A **Prorated Price** column appears on the right. This is the amount that actually applies for the Phase.
* The totals show both an **Annualized Total** and a **Prorated Total**.

A Phase set by length rather than dates is prorated by months: a 6-month Phase has a factor of exactly 0.5. Once a Phase has real dates (because it has its own dates or follows a Phase that does), it's prorated by days.

A Phase longer than a year is scaled up the same way. An 18-month Phase counts as roughly 1.5 years.

### Example: a six-month first Phase

A customer starts mid-year on Jan 1, 2026, and the rep sets Phase 1 to end on Jun 30, 2026, so the deal co-terminates with the customer's fiscal year.

| Line | Type | Price (Annualized) | Prorated Price |
| - | - | - | - |
| Platform License | Recurring | \$12,000.00 | \$5,950.68 |
| Implementation | One-time | \$5,000.00 | \$5,000.00 |
| API Overage | Usage | \$0.01 / call | Not included |

The Phase covers 181 days of a 365-day year, so the factor is 0.4959. Platform License is prorated. Implementation is charged in full. API Overage is billed on usage and doesn't appear in the Prorated Total. The Prorated Total for the Phase is **\$10,950.68**.

### The Proration feature

Admins can turn on **Proration** in **Admin > Features**. With it on:

* Reps can set exact start and end dates for each Phase on a quote.
* Renewal quotes start the day after the contract ends and run for one year, using real dates.

With it off, reps work in whole months and renewal quotes default to a 12-month Phase. Proration still applies whenever a Phase is shorter or longer than twelve months, for example a 6-month Phase.

***

## Proration on amendments

When an [amendment](https://docs.getveles.com/get-started/contract-management/renewals-and-amendments.md) changes a contract partway through a Phase, Veles has to decide what the change is worth. It doesn't reprice the whole Phase. It values only the part of the Phase that's left, starting on the amendment's effective date.

### What's stored on the contract

The [Contract Line](https://docs.getveles.com/get-started/contract-management/contract-line.md) always holds the full, unprorated values after an amendment: the new quantity and the new annual price. It doesn't store a reduced price for the rest of the Phase. The prorated amounts are recorded alongside it, in the line's amendment history.

### How the change is valued

For each line an amendment touches, Veles compares the line before and after the change over the **proration window**: the days from the effective date to the end of the line's period.

```text theme={null}
Prior Prorated  = prior line total x factor for the window
New Prorated    = new line total x factor for the window
Payable Impact  = New Prorated - Prior Prorated
```

* **Payable Impact** is what the amendment adds to (or removes from) the contract's value for that line.
* **Contribution** is the running total of a line's value across the contract and all its amendments. The contract's total value is the sum of its lines' contributions.

What the window looks like depends on where the line sits:

| Line's period | Proration window | Effect |
| - | - | - |
| **Active**: the effective date falls inside it | From the effective date to the end of the period | Change is prorated for the time left. |
| **Future**: starts after the effective date | The whole period | Change counts in full. |
| **Past**: ended before the effective date | Empty | No effect. Past periods can't be changed. |

One-time charges aren't prorated here either. If an amendment changes a one-time charge in an active or future Phase, the full difference counts.

### Removing a line mid-Phase

* If the line's Phase hasn't started yet, the line is removed.
* If the Phase is active, the line is ended the day before the amendment's effective date. The rest of the Phase is worth nothing, so the Payable Impact is negative: the prorated value of the time that's left.

### Seeing the numbers

Select a line on the contract to open its detail panel. For any line an amendment changed, the panel shows:

* the **Prior** and **New** values, each with their **Line Total**, **Proration Window**, **Proration Factor**, and **Prorated Value**
* the **Payable Impact** (New Prorated - Prior Prorated)
* the **Contribution** (Prior Contribution + Payable Impact)

***

## Example: adding seats mid-year

A one-year contract runs Jan 1 to Dec 31, 2026, with 50 seats of Platform License at $480 per seat per year. That's $24,000.

An amendment effective **Jul 1, 2026** raises the quantity to 75.

**The window.** Jul 1 to Dec 31 is 184 days. The anniversary year starting Jul 1, 2026 has 365 days. The factor is 184 / 365 = 0.5041.

| | Quantity | Line Total | Prorated Value |
| - | - | - | - |
| **Prior** | 50 | \$24,000.00 | \$12,098.63 |
| **New** | 75 | \$36,000.00 | \$18,147.95 |
| **Payable Impact** | | | **\$6,049.32** |

**On the contract:**

* The Platform License line now shows 75 seats at \$480. The price isn't reduced for the half year.
* The line's Contribution goes from $24,000.00 to $30,049.32.

### The same amendment, with a price change and a removal

Say the amendment also:

* raises the price from $480 to $500 per seat
* removes a \$6,000 Analytics add-on

| Line | Prior Prorated | New Prorated | Payable Impact |
| - | - | - | - |
| Platform License (50 x $480 to 75 x $500) | \$12,098.63 | \$18,904.11 | \$6,805.48 |
| Analytics (removed) | \$3,024.66 | \$0.00 | -\$3,024.66 |

* The price change applies from Jul 1. It doesn't wait for the next Phase.
* The Analytics line is ended on Jun 30, so the last six months of it come off the contract's value.

### Multi-year contracts

Each Phase is valued on its own. For a three-year contract amended in the middle of Year 2:

* Year 1 is in the past, so it's untouched.
* Year 2 changes are prorated from the effective date.
* Year 3 changes count in full.

***

## Proration and renewals

Renewals don't prorate against the old contract. A renewal creates a new successor contract, and its value starts fresh.

The renewal quote's first Phase follows the same rule as any quote. With the Proration feature on, it runs exactly one year from the day after the old contract ends, so its factor is 1.

***

## What's next

> [card] [Renewals and Amendments](https://docs.getveles.com/get-started/contract-management/renewals-and-amendments.md)
>
> How amendments and renewals are created and applied to a contract.

> [card] [Quote Phases](https://docs.getveles.com/get-started/calculator/quote-phase.md)
>
> Set up Phases and their dates on a quote.

> [card] [Contract Line](https://docs.getveles.com/get-started/contract-management/contract-line.md)
>
> What each Contract Line stores and how it changes over time.

> [card] [Contract Phase](https://docs.getveles.com/get-started/contract-management/contract-phase.md)
>
> How Phases move from future to active to historical.


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