---
id: change/bcapps/12767
type: change
title: "#12767 [29x] Bug 654025 Billing Lines Not Rolled Back When Vendor Subscription Contract Invoice Creation Fails."
summary: When vendor subscription contract invoice creation fails, billing lines are now properly rolled back instead of remaining in an incomplete state.
tier: official
language: en
tags:
  - fix
  - releases/29.x
  - bc29
  - codeunit create billing documents
system: sales
review:
  state: reviewed
  by: opus
  at: "2026-10-22T01:10:52.904Z"
  flags: []
generated:
  at: "2026-10-24T01:02:25.817Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: a08f9d89de4261f1753f30c1a73465af99817181
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/12767
    title: "microsoft/BCApps#12767: [29x] Bug 654025 Billing Lines Not Rolled Back When Vendor Subscription Contract Invoice Creation Fails."
    date: "2026-10-21"
    commit: a08f9d89de4261f1753f30c1a73465af99817181
    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: Documents vendor subscription contract invoice creation process, directly related to billing line handling during invoice creation.
      by: model
number: 12767
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/12767
kind: pr
base_branch: releases/29.x
major: "29"
merged_at: "2026-10-21T12:47:12Z"
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:
  - 654025
systems:
  - sales
quote: Billing Lines Not Rolled Back When Vendor Subscription Contract Invoice Creation Fails
joined_against:
  major: "29"
  commit: e9be5bb80644ee0302e5a7eb3b0b01e1c91cb5fc
---

# #12767 [29x] Bug 654025 Billing Lines Not Rolled Back When Vendor Subscription Contract Invoice Creation Fails.

> When vendor subscription contract invoice creation fails, billing lines are now properly rolled back instead of remaining in an incomplete state.

[Pull request](https://github.com/microsoft/BCApps/pull/12767) · merged into `releases/29.x` (BC29) on 2026-10-21 by MSNehaNawal · 2 files (+39 -1), 1 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Billing lines are rolled back when vendor subscription contract invoice creation fails
- One-line fix in the Create Billing Documents codeunit
- Test added in the recurring billing documents tests
- 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#654025
- 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: Documents vendor subscription contract invoice creation process, directly related to billing line handling during invoice creation. (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).
