---
id: change/bcapps/12377
type: change
title: "#12377 [main] Bug 653097 Billing Lines Not Rolled Back When Vendor Subscription Contract Invoice Creation Fails."
summary: Fixed billing lines not being rolled back when creating a vendor subscription contract invoice fails. The fix is a one-line change in codeunit 8060 Create Billing Documents, and a new test covers it.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit create billing documents
system: sales
review:
  state: reviewed
  by: opus
  at: "2026-10-16T01:17:25.385Z"
  flags: []
generated:
  at: "2026-10-24T01:02:25.817Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: dd18edd51448a78df4e31843f84fd1263537d930
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/12377
    title: "microsoft/BCApps#12377: [main] Bug 653097 Billing Lines Not Rolled Back When Vendor Subscription Contract Invoice Creation Fails."
    date: "2026-10-13"
    commit: dd18edd51448a78df4e31843f84fd1263537d930
    t: null
    quote: Billing Lines Not Rolled Back When Vendor Subscription Contract Invoice Creation Fails.
links:
  learn: []
  objects:
    - object/codeunit/8060
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
  related:
    - to: https://learn.microsoft.com/dynamics365/business-central/SRB/working-with-contracts/vendor-contract-integration-purchase-invoice
      title: Vendor contract integration in purchase invoices
      label: possibly related
      why: Billing document creation failure for vendor contracts involves vendor contract integration in invoices.
      by: model
    - to: https://learn.microsoft.com/dynamics365/business-central/SRB/working-with-contracts/vendor-contracts
      title: Vendor subscription contracts
      label: possibly related
      why: Bug fix for vendor subscription contract billing lines rollback relates to vendor subscription contracts.
      by: model
number: 12377
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/12377
kind: pr
base_branch: main
major: "30"
merged_at: "2026-10-13T11:43:22Z"
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: 39
  deletions: 1
  al: 1
apps:
  - Subscription Billing
objects_touched:
  - key: codeunit/8060
    page: codeunit/8060
    type: codeunit
    id: 8060
    name: Create Billing Documents
    app: Subscription Billing
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 653097
systems:
  - sales
quote: Billing Lines Not Rolled Back When Vendor Subscription Contract Invoice Creation Fails.
joined_against:
  major: "30"
  commit: f18567dc08e2bd162bf192e1da4d714b57eb099f
---

# #12377 [main] Bug 653097 Billing Lines Not Rolled Back When Vendor Subscription Contract Invoice Creation Fails.

> Fixed billing lines not being rolled back when creating a vendor subscription contract invoice fails. The fix is a one-line change in codeunit 8060 Create Billing Documents, and a new test covers it.

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

## What changed

- Billing lines are now rolled back when vendor subscription contract invoice creation fails
- One-line change in Subscription Billing codeunit 8060 Create Billing Documents
- New test added in RecurringBillingDocsTest
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 8060 "Create Billing Documents"](../../objects/codeunit/8060.md), Subscription Billing: modified

## Context

- Work items: AB#653097
- Labels: AL: Apps (W1), Team: Finance
- Systems: sales
- From the description: "Billing Lines Not Rolled Back When Vendor Subscription Contract Invoice Creation Fails."

## Possibly related

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

- [Vendor contract integration in purchase invoices](https://learn.microsoft.com/dynamics365/business-central/SRB/working-with-contracts/vendor-contract-integration-purchase-invoice) — possibly related: Billing document creation failure for vendor contracts involves vendor contract integration in invoices. (model-linked)
- [Vendor subscription contracts](https://learn.microsoft.com/dynamics365/business-central/SRB/working-with-contracts/vendor-contracts) — possibly related: Bug fix for vendor subscription contract billing lines rollback relates to vendor subscription contracts. (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).
