---
id: change/bcapps/10608
type: change
title: "#10608 [master]-Bug 647093-[Subscription Billing] Incorrect Invoice Amounts when using explicit values in Subscription Line End Date"
summary: Subscription billing now calculates correct invoice amounts and billing periods when using explicit end dates with daily or weekly billing rhythms and month-end alignment, by skipping month-end alignment for fixed-length day and week formulas.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - table subscription line
system: development
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:07:27.278Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 51cb4e519a343791ce8dba355f59c612d4051c9f
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/10608
    title: "microsoft/BCApps#10608: [master]-Bug 647093-[Subscription Billing] Incorrect Invoice Amounts when using explicit values in Subscription Line End Date"
    date: "2026-08-27"
    commit: 51cb4e519a343791ce8dba355f59c612d4051c9f
    t: null
    quote: Incorrect Invoice Amounts when using explicit values in Subscription Line End Date
links:
  learn: []
  objects:
    - object/table/8059
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 10608
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/10608
kind: pr
base_branch: main
major: "30"
merged_at: "2026-08-27T16:29:05Z"
author: MSNehaNawal
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: 169
  deletions: 7
  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:
  - 647093
systems:
  - development
quote: Incorrect Invoice Amounts when using explicit values in Subscription Line End Date
joined_against:
  major: "30"
  commit: ecbc028c25dbe83b61313bc566e6c1d41184bb1c
---

# #10608 [master]-Bug 647093-[Subscription Billing] Incorrect Invoice Amounts when using explicit values in Subscription Line End Date

> Subscription billing now calculates correct invoice amounts and billing periods when using explicit end dates with daily or weekly billing rhythms and month-end alignment, by skipping month-end alignment for fixed-length day and week formulas.

[Pull request](https://github.com/microsoft/BCApps/pull/10608) · merged into `main` (BC30) on 2026-08-27 by MSNehaNawal · 2 files (+169 -7), 1 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Fixed incorrect billing period boundaries and amounts for non-usage-based subscription lines with daily/weekly rhythms and month-end alignment
- Root cause was CalculateNextToDate() incorrectly applying month-end alignment to fixed-length day/week formulas
- Solution skips end-of-month alignment for day and week formulas while preserving it for month/quarter/year rhythms
- Correction applied at the source in CalculateNextToDate() eliminates billing boundary and proration errors
- Added test coverage for period calculation scenarios
- Behaviour changes for users or extensions.

## AL objects touched

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

## Context

- Work items: AB#647093
- Labels: AL: Apps (W1), Team: Finance
- Systems: development
- From the description: "Incorrect Invoice Amounts when using explicit values in Subscription Line End Date"

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