---
id: change/bcapps/10444
type: change
title: '#10444 [Bug][Subscription Billing] "Cancellation Possible Until" is rounded to the end of the month when the Notice Period is expressed in days'
summary: Fixed an issue where subscription line cancellation dates were incorrectly rounded to month-end when notice periods were expressed in days or weeks, potentially allowing cancellations outside agreed notice windows. Added logic to only apply month-end alignment for month-based formulas.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit date formula management
  - table subscription line
system: sales
review:
  state: reviewed
  by: opus
  at: "2026-10-24T00:37:49.439Z"
  flags: []
generated:
  at: "2026-11-16T00:19:27.268Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 049372b00f600da4221af4407206475ba0392896
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/10444
    title: 'microsoft/BCApps#10444: [Bug][Subscription Billing] "Cancellation Possible Until" is rounded to the end of the month when the Notice Period is expressed in days'
    date: "2026-10-23"
    commit: 049372b00f600da4221af4407206475ba0392896
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/codeunit/8057
    - object/table/8059
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
  related:
    - to: https://learn.microsoft.com/dynamics365/business-central/SRB/analytics/subscription-powerbi-semantic-model
      title: Power BI Subscription Billing app semantic model
      label: possibly related
      why: touches Table 8059 "Subscription Line"
      by: code
    - to: https://learn.microsoft.com/dynamics365/business-central/SRB/working-with-contracts/service-commitment-cancellation
      title: Cancel planned subscription lines
      label: possibly related
      why: Documents cancellation dates and notice periods for subscription contract lines, directly related to the bug fix.
      by: model
    - to: https://learn.microsoft.com/dynamics365/business-central/SRB/working-with-contracts/period-calculation
      title: Period calculation
      label: possibly related
      why: Documents period calculation for subscription billing, relevant to date rounding logic in the fix.
      by: model
number: 10444
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/10444
kind: pr
base_branch: main
major: "30"
merged_at: "2026-10-23T11:02:11Z"
author: miljance
author_type: User
community_contribution: true
labels:
  - "ADO: Sync"
  - "AL: Apps (W1)"
  - From Fork
  - "Team: Finance"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 4
  additions: 284
  deletions: 7
  al: 2
apps:
  - Subscription Billing
objects_touched:
  - key: codeunit/8057
    page: codeunit/8057
    type: codeunit
    id: 8057
    name: Date Formula Management
    app: Subscription Billing
    status: modified
  - key: table/8059
    page: table/8059
    type: table
    id: 8059
    name: Subscription Line
    app: Subscription Billing
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues:
  - 10354
work_items:
  - 653333
systems:
  - sales
quote: null
joined_against:
  major: "30"
  commit: eb2bfe5258a473c969a6b85cdc98ce8524408706
---

# #10444 [Bug][Subscription Billing] "Cancellation Possible Until" is rounded to the end of the month when the Notice Period is expressed in days

> Fixed an issue where subscription line cancellation dates were incorrectly rounded to month-end when notice periods were expressed in days or weeks, potentially allowing cancellations outside agreed notice windows. Added logic to only apply month-end alignment for month-based formulas.

[Pull request](https://github.com/microsoft/BCApps/pull/10444) · merged into `main` (BC30) on 2026-10-23 by miljance (community contribution) · 4 files (+284 -7), 2 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Subscription cancellation dates no longer snap to month-end for day or week-based notice periods
- Added DateFormulaManagement.IsMonthBasedDateFormula() to distinguish month-based from day/week-based formulas
- Applied fix to three calculation methods: CalculateCancellationPossibleUntil, CalculateTermUntilFromCancellationPossibleUntil, and CalculateTermUntilUsingExtensionTerm
- Composite formulas like <1Y+6M> are correctly identified as month-based, while formulas with day or week components are not
- Added 10 test methods covering day, week, month, quarter, and composite formulas
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 8057 "Date Formula Management"](../../objects/codeunit/8057.md), Subscription Billing: modified
- [Table 8059 "Subscription Line"](../../objects/table/8059.md), Subscription Billing: modified

## Context

- Fixes: [#10354 [Bug][Subscription Billing] "Cancellation Possible Until" is rounded to the end of the month when the Notice Period is expressed in days](https://github.com/microsoft/BCApps/issues/10354) (closed)
- Work items: AB#653333
- Labels: ADO: Sync, AL: Apps (W1), From Fork, Team: Finance
- Systems: sales

## Possibly related

No source states these links: they share an object, a model read them, or a person found the same subject.

- [Power BI Subscription Billing app semantic model](https://learn.microsoft.com/dynamics365/business-central/SRB/analytics/subscription-powerbi-semantic-model) — possibly related: touches Table 8059 "Subscription Line"
- [Cancel planned subscription lines](https://learn.microsoft.com/dynamics365/business-central/SRB/working-with-contracts/service-commitment-cancellation) — possibly related: Documents cancellation dates and notice periods for subscription contract lines, directly related to the bug fix. (model-linked)
- [Period calculation](https://learn.microsoft.com/dynamics365/business-central/SRB/working-with-contracts/period-calculation) — possibly related: Documents period calculation for subscription billing, relevant to date rounding logic in the fix. (model-linked)

Source: metadata of a merged pull request in microsoft/BCApps (bcapps): title, labels, changed paths and counts, with a summary in our words. No source text and no description beyond one short quote (D10, D61).
