#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.
- 3files
- 2AL files
- 2objects
Pull request · 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”, Subscription Billing: modified
- Table 8059 “Subscription Line”, 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).