---
id: change/bcapps/11399
type: change
title: "#11399 [master][Subscription Billing] 1M 'Align to End of Month' line with end date produces a 1-day prorated stub"
summary: Fixed a bug in Subscription Billing where monthly billing with Align to End of Month created an unwanted one-day prorated line when the subscription ended. The period end date calculation now properly includes the subscription line end date.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - table subscription line
system: development
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:05:36.020Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: b6ff7f07fa1fcfbdb43ca0c37227aab0c918b658
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/11399
    title: "microsoft/BCApps#11399: [master][Subscription Billing] 1M 'Align to End of Month' line with end date produces a 1-day prorated stub"
    date: "2026-09-18"
    commit: b6ff7f07fa1fcfbdb43ca0c37227aab0c918b658
    t: null
    quote: The billing period ended one day before the Subscription Line End Date, creating an unintended one-day prorated billing line.
links:
  learn: []
  objects:
    - object/table/8059
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 11399
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/11399
kind: pr
base_branch: main
major: "30"
merged_at: "2026-09-18T14:40:28Z"
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: 48
  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:
  - 650068
systems:
  - development
quote: The billing period ended one day before the Subscription Line End Date, creating an unintended one-day prorated billing line.
joined_against:
  major: "30"
  commit: ecbc028c25dbe83b61313bc566e6c1d41184bb1c
---

# #11399 [master][Subscription Billing] 1M 'Align to End of Month' line with end date produces a 1-day prorated stub

> Fixed a bug in Subscription Billing where monthly billing with Align to End of Month created an unwanted one-day prorated line when the subscription ended. The period end date calculation now properly includes the subscription line end date.

[Pull request](https://github.com/microsoft/BCApps/pull/11399) · merged into `main` (BC30) on 2026-09-18 by neeleshsinghal · 2 files (+48 -1), 1 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Monthly billing cycles with Align to End of Month no longer create spurious one-day prorated billing lines at the subscription end date
- CalculateNextToDate now caps the calculated period end date at the subscription line end date when applicable
- End-date handling improved to include the subscription line end date in the current billing period
- Fixes vendor contracts that were incorrectly generating extra billing lines
- Behaviour changes for users or extensions.

## AL objects touched

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

## Context

- Work items: AB#650068
- Labels: AL: Apps (W1), Team: Finance
- Systems: development
- From the description: "The billing period ended one day before the Subscription Line End Date, creating an unintended one-day prorated billing line."

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