Contract Term Calculation

This section shows how the Software Vertical Contract Renewals SuiteApp calculates the contract term based on the start and end dates that you enter on a sales order. For information about creating a contract, see Creating a New Contract.

The following variables are used to calculate the contract term:

Variable

Description

DD

Day of the month

MM

Month number

YYYY

Year

n

Number of full months between start date and end date, integer component of the contract term

f

Decimal component of the contract term

To show how the SuiteApp calculates the contract term, use the following start and end dates as an example.

Start Date

End Date

Term

14 March 2016

Start Date DD = 14

Start Date MM = 03

Start Date YYYY = 2016

31 December 2017

End Date DD = 31

End Date MM = 12

End Date YYYY = 2017

n + f

The SuiteApp uses the following logic to compute for the integer component (n) and the decimal component (f) of the term.

Steps to Calculate Contract Term

Sample calculation

Step 1: Get the number of months between the contract’s start date and end date (n). This is the integer component of the term.

n = ((End Date YYYY - Start Date YYYY) * 12) - Start Date MM + End Date MM

n = ((2017 – 2016) * 12) — 03 + 12

n = 21 months

n = 21

Step 2: Based on the start date, get the date of the last full month before the end date (x). To get x, add the number of months (n) to the start date.

  1. If x is later than the end date, subtract 1 month until x becomes earlier than or equal to the end date.

  2. If both x and the start date have the same value for DD, subtract 1 day.

  3. If x is equal to the end date, then the term is equal to n (from Step 1). Otherwise, continue with Step 3 to calculate the decimal component (f) of the term.

x = Start Date + n

x = 14 March 2016 + 21 months

x = 14 December 2017

This example falls under condition 2.2, both x and the start date have the same value for DD, which is 14. Therefore, 1 day is subtracted from the initially calculated x value.

x = 14 December 2017 — 1 day

x = 13 December 2017

x = 13 December 2017

Step 3: Get the date of the start of the month following x (y).

y = x + 1 day

y = 13 December 2017 + 1 day

y = 14 December 2017

y = 14 December 2017

Step 4: Based on the start date, get the date of the last full month after the end date (z).

If both z and the start date have the same value for DD, subtract 1 day.

z = Start Date + n + 1 month

z = 14 March 2016 + 21 months + 1 month

z = 14 January 2018

For this example, both z and the start date have the same value for DD, which is 14. Therefore, 1 day is subtracted from the initially calculated z value.

z = 14 January 2018 — 1 day

z = 13 January 2018

z = 13 January 2018

Step 5: Get the number of days between the end date and y, and add 1 day (d1).

d1 = (End Date – y) + 1 day

d1 = (31 December 2017 – 14 December 2017) + 1 day

d1 = 17 + 1 = 18

d1 = 18

Step 6: Get the number of days between the last full month after the end date (z) and the start of the month following the last full month before end date (y), and add 1 day (d2).

d2 = (z – y) + 1 day

d2 = (13 January 2018 – 14 December 2017) + 1 day

d2 = 30 + 1 = 31

d2 = 31

Step 7: Get the decimal component (f) by dividing d1 by d2. Round off to the nearest three decimal places.

f = d1/d2

f = 18/31 = 0.581

f = 0.581

Step 8: Calculate the term by adding the integer component (n, from Step 1) and decimal component (f, from Step 7).

Term = n + f

Term = 21 + 0.581 = 21.581

Term = 21.581

Related Topics

General Notices