Skip to main content

Period Calculation

The Period Calculation controls how a period is determined for invoicing. Billing for a period length of one month works smoothly with DYCE Subscription & Recurring Billing. However, if the start of the billing period is within the last three days of a month, the length of the month and the following month are not taken into account.

A contract invoice issued for one month from February 28th (no leap year) ends with the Business Central standard calculation on March 27th (+ 1M - 1D). However, a recurring billing from the last day of a month should extend to the penultimate day of the following month to actually represent a full month.

To accommodate this, there is a choice to calculate periods using the Business Central standard method or the DYCE Subscription & Recurring Billing method. The Period Calculation with the option Align to Start of Month uses the Business Central standard method, whereas Align to End of Month uses a different method.

For all recurring billings, the option Align to End of Month is generally recommended. It can be set as a default in the Service & Contracts Setup.

Align to Start of Month

The calculation of a month with the option Align to Start of Month as Period Calculation in the contract line uses the Business Central standard date calculation.

Calculation of the period

When calculating a whole month, the start date plus one month minus one day (CM-1D) is used to calculate the end of the period. For the calculation of two months, the start date plus two months minus one day (CM+1M-1D) is used to calculate the end of the period.

1M - 1T2M - 1T1Q - 1T1Y - 1T
28.01.24 - 27.02.2428.01.24 - 27.03.2428.01.24 - 27.04.2428.01.24 - 27.01.25
29.01.24 - 28.02.2429.01.24 - 28.03.2429.01.24 - 28.04.2429.01.24 - 28.01.25
30.01.24 - 28.02.2430.01.24 - 29.03.2430.01.24 - 29.04.2430.01.24 - 29.01.25
31.01.24 - 28.02.2431.01.24 - 30.03.2431.01.24 - 29.04.2431.01.24 - 30.01.25
29.02.24 - 28.03.2429.02.24 - 28.04.2429.02.24 - 28.05.2429.02.24 - 27.02.25

Price calculation

The Billing Rhythm is not taken into account when calculating the price. The Billing Rhythm determines the cycle in which a contract line is invoiced (billing period) if no manual intervention is made. The price of a Billing line is calculated on the basis of Price and Billing Base Period in the Service Commitment or Contract line and the Billed Base Period. If the invoiced period is a multiple of the Billing Base Period, the price is multiplied accordingly.

Monthly price = 100,- (Price = 100,- Calculation Base Period = 1M)

1M - 1TPrice2M - 1TPrice1Q - 1TPrice1Y - 1TPrice
28.01.24 - 27.02.2410028.01.24 - 27.03.2420028.01.24 - 27.04.2430028.01.24 - 27.01.251200
29.01.24 - 28.02.2410029.01.24 - 28.03.2420029.01.24 - 28.04.2430029.01.24 - 28.01.251200
30.01.24 - 28.02.2410030.01.24 - 29.03.2420030.01.24 - 29.04.2430030.01.24 - 29.01.251200
31.01.24 - 28.02.2410031.01.24 - 30.03.2420031.01.24 - 29.04.2430031.01.24 - 30.01.251200
29.02.24 - 28.03.2410029.02.24 - 28.04.2420029.02.24 - 28.05.2430029.02.24 - 27.02.251200

If periods are invoiced, that do not correspond to a multiple of the Billing Base Period, days (as the next smaller unit) are always used for the price calculation. Depending on the calendar month and the Billing Base Period, a different number of days is used as the basis. In a calendar year that is not a leap year, the number of days is 31 in January, 28 in February and 90 in the first quarter (01.01.25 - 31.03.25).

Price of the Billing lines=1nPrice of Contract linesNumber of days in the started periodDays to be invoiced in the started periodPrice \ of \ the \ Billing \ lines = \sum\limits_1^n \frac{Price \ of \ Contract \ lines}{Number \ of \ days \ in \ the \ started \ period} * Days \ to \ be \ invoiced \ in \ the \ started \ period
Start - EndPriceBilling Base PeriodBilling RhythmInvoiced PeriodPrice of the Billing Lines
01.01.2023 - 15.01.2023100,-1M1J15 von 31 Tagen100/ 31 * 15 = 48,387
01.02.2023 - 14.02.2023100,-1M1J14 von 28 Tagen100 * 14 / 28 = 50,-
01.01.2023 - 14.02.2023100,-1M1J1M + 14 Tage100/ 31 * 31 + 100 * 14 / 28 = 150,-
31.01.2023 - 01.03.2023100,-1M1J1M + 2 Tage100,- + 100,- * 2/ 28 = 107,143
01.01.2023 - 14.01.2023100,-1Q1J14 von 90 Tagen100/ 90 * 14 = 15,556
01.01.2023 - 14.04.2023100,-1Q1J1Q + 14 von 91 Tagen100/ 90 * 90 + 100 * 14 / 91
28.02.2023 - 14.06.2023100,-1Q1J1Q + 18 von 92 Tagen100/ 92 * 92 + 100 * 18 / 92 = 119,565

The price of a contract line is based on the period length in Billing Base Period (e.g. 1 month). n corresponds to the number of periods included. In the third example, one and a half months are invoiced (whole of January + half of February). Accordingly, the price for January and February is calculated separately and then added up.
01.01.2023 - 31.01.2023 is a whole month. The price is 100,- for the month.
01.02.2023 - 14.02.2023 are 14 days. A whole month would be 28 days (01.02.2023 - 28.02.2023). The price for the second month is therefore calculated pro rata: 14 / 28 * 100 = 50,-.
The price for the entire period invoiced corresponds to the sum of the partial periods: 100,- + 50,- = 150,-

Align to End of Month

If the Service Start Date and the Next Billing Date are within the last 3 days of a month, the period is determined from the end of the month. This means, that a Contract line that is invoiced from the last day of a month for one month, is invoiced up to the penultimate day of the following month. This happens regardless of how long the respective months are. This type of Period Calculation guarantees that the 13th monthly invoice starts on the same day (one year later). Apart from that, this type of Period Calculation works in the same way as Align to Start of Month, i.e. the Next Billing Date determines the first day of the next billing.

Monthly price = 100,- (Price = 100,- Billing Base Period = 1M)

1M - 1T2M - 1T1Q - 1T1Y - 1T
28.01.24 - 27.02.2428.01.24 - 27.03.2428.01.24 - 27.04.2428.01.24 - 27.01.25
29.01.24 - 26.02.2429.01.24 - 28.03.2429.01.24 - 27.04.2429.01.24 - 28.01.25
30.01.24 - 27.02.2430.01.24 - 29.03.2430.01.24 - 28.04.2430.01.24 - 29.01.25
31.01.24 - 28.02.2431.01.24 - 30.03.2431.01.24 - 29.04.2431.01.24 - 30.01.25
29.02.24 - 30.03.2429.02.24 - 29.04.2429.02.24 - 30.05.2429.02.24 - 27.02.25

Calculation of prices

The price calculation is carried out using exactly the same logic as above. Only the period lengths are potentially different.

Monatspreis = 100,- (Preis = 100,- Berechnungsbasis Zeitraum = 1M)

1M - 1TPreis2M - 1TPreis1Q - 1TPreis1Y - 1TPreis
28.01.24 - 27.02.2410028.01.24 - 27.03.2420028.01.24 - 27.04.2430028.01.24 - 27.01.251200
29.01.24 - 26.02.2410029.01.24 - 28.03.2420029.01.24 - 27.04.2430029.01.24 - 28.01.251200
30.01.24 - 27.02.2410030.01.24 - 29.03.2420030.01.24 - 28.04.2430030.01.24 - 29.01.251200
31.01.24 - 28.02.2410031.01.24 - 30.03.2420031.01.24 - 29.04.2430031.01.24 - 30.01.251200
29.02.24 - 30.03.2410029.02.24 - 29.04.2420029.02.24 - 30.05.2430029.02.24 - 27.02.251200
Price of the Billing lines=1nPrice of Contract linesNumber of days in the started periodDays to be invoiced in the started periodPrice \ of \ the \ Billing \ lines = \sum\limits_1^n \frac{Price \ of \ Contract \ lines}{Number \ of \ days \ in \ the \ started \ period} * Days \ to \ be \ invoiced \ in \ the \ started \ period
Start - EndPriceBilling Base PeriodBilling RhythmInvoiced PeriodPrice of the Billing Lines
01.01.2023 - 15.01.2023100,-1M1J15 von 31 Tagen100/ 31 * 15 = 48,387
01.02.2023 - 14.02.2023100,-1M1J14 von 28 Tagen100 * 14 / 28 = 50,-
01.01.2023 - 14.02.2023100,-1M1J1M + 14 Tage100/ 31 * 31 + 100 * 14 / 28 = 150,-
31.01.2023 - 01.03.2023100,-1M1J1M + 2 Tage100,- + 100,- * 2/ 28 = 107,143
01.01.2023 - 14.01.2023100,-1Q1J14 von 90 Tagen100/ 90 * 14 = 15,556
01.01.2023 - 14.04.2023100,-1Q1J1Q + 14 von 91 Tagen100/ 90 * 90 + 100 * 14 / 91 = 115,385
28.02.2023 - 14.06.2023100,-1Q1J1Q + 15 von 92 Tagen100/ 92 * 92 + 100 * 15 / 92 = 116,304

Leap year

The period calculation works almost the same in leap years as in normal years. The only difference is that 29.02. is the last day in February.
29.02.2024 - 30.03.2024 corresponds to one month. 29.02.2024 is the last day of February and 30.03.2024 is the penultimate day of March.