---
id: change/bcapps/10970
type: change
title: "#10970 [Master] -SubBilling BillingLine doesn't consider entries for usage date ranges crossing periods"
summary: Fixed subscription billing to correctly include usage data entries whose charge periods span across billing rhythm periods, preventing lost billing and reconciliation errors.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit billing proposal
  - table subscription line
system: development
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:05:30.375Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 0896e1947b431a5714707d05ce8a9e88c7234804
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/10970
    title: "microsoft/BCApps#10970: [Master] -SubBilling BillingLine doesn't consider entries for usage date ranges crossing periods"
    date: "2026-09-11"
    commit: 0896e1947b431a5714707d05ce8a9e88c7234804
    t: null
    quote: entry's amount is billed in no Billing Line at all
links:
  learn: []
  objects:
    - object/codeunit/8062
    - object/table/8059
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 10970
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/10970
kind: pr
base_branch: main
major: "30"
merged_at: "2026-09-11T17:56:35Z"
author: DhavalMore88
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: 3
  additions: 321
  deletions: 0
  al: 2
apps:
  - Subscription Billing
objects_touched:
  - key: codeunit/8062
    page: codeunit/8062
    type: codeunit
    id: 8062
    name: Billing Proposal
    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: []
work_items:
  - 648766
systems:
  - development
quote: entry's amount is billed in no Billing Line at all
joined_against:
  major: "30"
  commit: ecbc028c25dbe83b61313bc566e6c1d41184bb1c
---

# #10970 [Master] -SubBilling BillingLine doesn't consider entries for usage date ranges crossing periods

> Fixed subscription billing to correctly include usage data entries whose charge periods span across billing rhythm periods, preventing lost billing and reconciliation errors.

[Pull request](https://github.com/microsoft/BCApps/pull/10970) · merged into `main` (BC30) on 2026-09-11 by DhavalMore88 · 3 files (+321 -0), 2 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Usage entries that span multiple billing periods are now captured entirely in one billing line
- New GetUsageDataChargeEndDateCrossingPeriodEnd method detects entries crossing period boundaries
- Billing period is extended to encompass crossing entries using CalculateNextBillingToDateForServiceCommitment
- Prevents duplicate billing lines by starting the next period after the stretch point
- Resolves reconciliation issues between billing lines and usage data totals
- Behaviour changes for users or extensions.

## AL objects touched

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

## Context

- Work items: AB#648766
- Labels: AL: Apps (W1), Team: Finance
- Systems: development
- From the description: "entry's amount is billed in no Billing Line at all"

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