---
title: "Codeunit 8061 Billing Correction, extension points 29"
author: "JOP-AL"
url: https://jonas-paprotka.de/ref/codeunit/8061-billing-correction/points/
object: https://jonas-paprotka.de/ref/codeunit/8061-billing-correction/
app: "Subscription Billing"
major: 29
source: https://jonas-paprotka.de/ref/codeunit/8061-billing-correction/source/
checked: 2026-11-20
changed: 2026-10-05
subject: "Microsoft Dynamics 365 Business Central"
license: "Metadata from Microsoft's symbol packages. AL source MIT, Copyright (c) Microsoft Corporation. Selection and wording © 2026 JOP-AL. https://jonas-paprotka.de/licenses/"
---

# Codeunit 8061 Billing Correction, extension points 29

JOP-AL, https://jonas-paprotka.de/ref/codeunit/8061-billing-correction/points/

3 procedures and triggers with a step in src/Apps/W1/Subscription Billing/App/Billing/Codeunits/BillingCorrection.Codeunit.al, in source order, read from the text, not from a run.

## CreateBillingLineFromBillingLineArchive

[Line 16](https://jonas-paprotka.de/ref/codeunit/8061-billing-correction/source/#L16), local.

- [26](https://jonas-paprotka.de/ref/codeunit/8061-billing-correction/source/#L26) calls `FilterBillingLineArchiveOnSalesLineOrPurchLine`
- [36](https://jonas-paprotka.de/ref/codeunit/8061-billing-correction/source/#L36) calls [Table 8061 Billing Line](https://jonas-paprotka.de/ref/table/8061-billing-line/) `GetBillingDocumentTypeFromSalesDocumentType`
- [38](https://jonas-paprotka.de/ref/codeunit/8061-billing-correction/source/#L38) calls [Table 8061 Billing Line](https://jonas-paprotka.de/ref/table/8061-billing-line/) `GetBillingDocumentTypeFromPurchaseDocumentType`
- [43](https://jonas-paprotka.de/ref/codeunit/8061-billing-correction/source/#L43) writes [Table 8061 Billing Line](https://jonas-paprotka.de/ref/table/8061-billing-line/) Insert
- [46](https://jonas-paprotka.de/ref/codeunit/8061-billing-correction/source/#L46) raises `OnBeforeUpdateNextBillingDateInCreateBillingLineFromBillingLineArchive`
- [47](https://jonas-paprotka.de/ref/codeunit/8061-billing-correction/source/#L47) calls [Table 8059 Subscription Line](https://jonas-paprotka.de/ref/table/8059-subscription-line/) `UpdateNextBillingDate`
- [48](https://jonas-paprotka.de/ref/codeunit/8061-billing-correction/source/#L48) writes [Table 8059 Subscription Line](https://jonas-paprotka.de/ref/table/8059-subscription-line/) Modify
- [51](https://jonas-paprotka.de/ref/codeunit/8061-billing-correction/source/#L51) calls `IsCalledFromCreditMemo`
- [62](https://jonas-paprotka.de/ref/codeunit/8061-billing-correction/source/#L62) writes [Table 8006 Usage Data Billing](https://jonas-paprotka.de/ref/table/8006-usage-data-billing/) Insert(true)
- [63](https://jonas-paprotka.de/ref/codeunit/8061-billing-correction/source/#L63) calls [Table 8006 Usage Data Billing](https://jonas-paprotka.de/ref/table/8006-usage-data-billing/) `InsertMetadata`
- [67](https://jonas-paprotka.de/ref/codeunit/8061-billing-correction/source/#L67) raises `OnAfterCreateBillingLineFromBillingLineArchive`

## CreateBillingLineFromBillingLineArchiveAfterInsertToPurchLine

[Line 138](https://jonas-paprotka.de/ref/codeunit/8061-billing-correction/source/#L138), local.

- [144](https://jonas-paprotka.de/ref/codeunit/8061-billing-correction/source/#L144) calls `FilterBillingLineArchiveOnSalesLineOrPurchLine`
- [150](https://jonas-paprotka.de/ref/codeunit/8061-billing-correction/source/#L150) calls `GetAndCheckServiceCommitmentIfNewerInvoiceExists`
- [161](https://jonas-paprotka.de/ref/codeunit/8061-billing-correction/source/#L161) calls `CreateBillingLineFromBillingLineArchive`

## CreateBillingLineFromBillingLineArchiveAfterInsertToSalesLine

[Line 165](https://jonas-paprotka.de/ref/codeunit/8061-billing-correction/source/#L165), local.

- [172](https://jonas-paprotka.de/ref/codeunit/8061-billing-correction/source/#L172) raises `OnBeforeCreateBillingLineFromBillingLineArchiveAfterInsertToSalesLine`, IsHandled
- [175](https://jonas-paprotka.de/ref/codeunit/8061-billing-correction/source/#L175) calls `FilterBillingLineArchiveOnSalesLineOrPurchLine`
- [183](https://jonas-paprotka.de/ref/codeunit/8061-billing-correction/source/#L183) calls `GetAndCheckServiceCommitmentIfNewerInvoiceExists`
- [195](https://jonas-paprotka.de/ref/codeunit/8061-billing-correction/source/#L195) calls `CreateBillingLineFromBillingLineArchive`

## Source

AL source 29: https://github.com/microsoft/BCApps, MIT, releases/29.x at 4303e5e584d3aa5d9e98cbc615525a5396ad6ed7.

JOP-AL, 2026-11-20.
