---
id: change/bcapps/13063
type: change
title: "#13063 [Bug][Subscription Billing] Rebilling usage data increases the subscription quantity once per subscription line"
summary: Fixed rebilling of usage data for subscription lines so that subscription quantity increases only once instead of once per subscription line when a subscription has both customer and vendor lines with usage-based pricing.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit process usage data billing
system: sales
review:
  state: reviewed
  by: opus
  at: "2026-11-06T00:59:56.105Z"
  flags: []
generated:
  at: "2026-11-07T00:15:21.625Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: e8cff590327ed9935d813f5201152bd0861f656e
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/13063
    title: "microsoft/BCApps#13063: [Bug][Subscription Billing] Rebilling usage data increases the subscription quantity once per subscription line"
    date: "2026-11-04"
    commit: e8cff590327ed9935d813f5201152bd0861f656e
    t: null
    quote: the subscription quantity is now increased by the rebilled quantity once, not once per subscription line
links:
  learn: []
  objects:
    - object/codeunit/8026
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
  related:
    - to: https://learn.microsoft.com/dynamics365/business-central/UBB/processing-usage-data/rebilling
      title: Rebilling usage data
      label: possibly related
      why: Documents rebilling usage data adjustments for subscription quantities already invoiced.
      by: model
number: 13063
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/13063
kind: pr
base_branch: main
major: "30"
merged_at: "2026-11-04T11:25:53Z"
author: miljance
author_type: User
community_contribution: true
labels:
  - "ADO: Sync"
  - "AL: Apps (W1)"
  - From Fork
  - "Team: Finance"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 2
  additions: 51
  deletions: 3
  al: 1
apps:
  - Subscription Billing
objects_touched:
  - key: codeunit/8026
    page: codeunit/8026
    type: codeunit
    id: 8026
    name: Process Usage Data Billing
    app: Subscription Billing
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues:
  - 12969
work_items:
  - 657346
systems:
  - sales
quote: the subscription quantity is now increased by the rebilled quantity once, not once per subscription line
joined_against:
  major: "30"
  commit: d2abc1d2ceae394331716c8183ef60e1534c2ce0
---

# #13063 [Bug][Subscription Billing] Rebilling usage data increases the subscription quantity once per subscription line

> Fixed rebilling of usage data for subscription lines so that subscription quantity increases only once instead of once per subscription line when a subscription has both customer and vendor lines with usage-based pricing.

[Pull request](https://github.com/microsoft/BCApps/pull/13063) · merged into `main` (BC30) on 2026-11-04 by miljance (community contribution) · 2 files (+51 -3), 1 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Rebilled usage quantity was incorrectly applied multiple times per subscription due to repeated reads of the subscription header quantity
- Captures subscription quantity once per run in a dictionary before processing any lines, eliminating double-counting across customer and vendor lines
- Only affects rebilling scenarios with multiple usage-quantity subscription lines; non-rebilling usage data processing is unchanged
- Existing subscriptions and posted documents are not affected by the behavioral change
- Added test verifying correct single quantity increase when rebilling a subscription with both customer and vendor lines
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 8026 "Process Usage Data Billing"](../../objects/codeunit/8026.md), Subscription Billing: modified

## Context

- Fixes: [#12969 [Bug][Subscription Billing] Rebilling usage data increases the subscription quantity once per subscription line](https://github.com/microsoft/BCApps/issues/12969) (closed)
- Work items: AB#657346
- Labels: ADO: Sync, AL: Apps (W1), From Fork, Team: Finance
- Systems: sales
- From the description: "the subscription quantity is now increased by the rebilled quantity once, not once per subscription line"

## Possibly related

No source states these links: they share an object, a model read them, or a person found the same subject.

- [Rebilling usage data](https://learn.microsoft.com/dynamics365/business-central/UBB/processing-usage-data/rebilling) — possibly related: Documents rebilling usage data adjustments for subscription quantities already invoiced. (model-linked)

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