---
id: change/bcapps/11679
type: change
title: "#11679 [29.x][Subscription Billing] 1M 'Align to End of Month' line with end date produces a 1-day prorated stub"
summary: Fixed a billing period calculation issue in Subscription Billing where monthly billing with 'Align to End of Month' would create an unintended one-day prorated stub when the subscription line ended within the period.
tier: official
language: en
tags:
  - fix
  - releases/29.x
  - bc29
  - table subscription line
system: development
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:04:15.699Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: a79cd186c7a13f034c5a686bfc6566deaca3ca6f
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/11679
    title: "microsoft/BCApps#11679: [29.x][Subscription Billing] 1M 'Align to End of Month' line with end date produces a 1-day prorated stub"
    date: "2026-09-22"
    commit: a79cd186c7a13f034c5a686bfc6566deaca3ca6f
    t: null
    quote: Updated CalculateNextToDate to cap the calculated period end date at the Subscription Line End Date when it falls within the current monthly period.
links:
  learn: []
  objects:
    - object/table/8059
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 11679
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/11679
kind: pr
base_branch: releases/29.x
major: "29"
merged_at: "2026-09-22T10:50:47Z"
author: neeleshsinghal
author_type: User
community_contribution: false
labels:
  - "AL: Apps (W1)"
  - "Team: Finance"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 2
  additions: 64
  deletions: 1
  al: 1
apps:
  - Subscription Billing
objects_touched:
  - key: table/8059
    page: table/8059
    type: table
    id: 8059
    name: Subscription Line
    app: Subscription Billing
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 650581
systems:
  - development
quote: Updated CalculateNextToDate to cap the calculated period end date at the Subscription Line End Date when it falls within the current monthly period.
joined_against:
  major: "29"
  commit: 1d24dd5ee2a734510f0556ccc69342d0e616db2f
---

# #11679 [29.x][Subscription Billing] 1M 'Align to End of Month' line with end date produces a 1-day prorated stub

> Fixed a billing period calculation issue in Subscription Billing where monthly billing with 'Align to End of Month' would create an unintended one-day prorated stub when the subscription line ended within the period.

[Pull request](https://github.com/microsoft/BCApps/pull/11679) · merged into `releases/29.x` (BC29) on 2026-09-22 by neeleshsinghal · 2 files (+64 -1), 1 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- CalculateNextToDate now correctly caps the period end date at the Subscription Line End Date
- Prevents one-day prorated billing lines when the end date falls within a monthly period
- Affects vendor contracts using 1M billing rhythm with month-end alignment
- Adds test coverage for the corrected behavior
- Behaviour changes for users or extensions.

## AL objects touched

- [Table 8059 "Subscription Line"](../../objects/table/8059.md), Subscription Billing: modified

## Context

- Work items: AB#650581
- Labels: AL: Apps (W1), Team: Finance
- Systems: development
- From the description: "Updated CalculateNextToDate to cap the calculated period end date at the Subscription Line End Date when it falls within the current monthly period."

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).
