---
id: change/bcapps/13344
type: change
title: "#13344 [29.x]- Bug 647007 Copy Document on a Purchase Credit Memo 'Quantity Received', and 'Quantity Invoiced' reverted back on original Purchase Order"
summary: Posting a purchase credit memo made by copying a posted invoice no longer reverts the received and invoiced quantities on the original purchase order. GetPurchaseInvoiceLine now skips the Order No. fallback for inventory item lines with no linked item ledger entry, while the corrective credit memo flow still reverts as designed.
tier: official
language: en
tags:
  - fix
  - releases/29.x
  - bc29
  - table purch. cr. memo line
system: purchasing
review:
  state: reviewed
  by: opus
  at: "2026-11-12T00:55:49.544Z"
  flags: []
generated:
  at: "2026-11-28T00:12:53.289Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 4d8001e81169dd4ece994db84222d06a0fba866e
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/13344
    title: "microsoft/BCApps#13344: [29.x]- Bug 647007 Copy Document on a Purchase Credit Memo 'Quantity Received', and 'Quantity Invoiced' reverted back on original Purchase Order"
    date: "2026-11-10"
    commit: 4d8001e81169dd4ece994db84222d06a0fba866e
    t: null
    quote: when there is no linked item ledger entry and the line is an inventory item, skip the Order No. / Order Line No. fallback
links:
  learn: []
  objects:
    - object/table/125
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
  related:
    - to: https://learn.microsoft.com/dynamics365/business-central/purchases-powerbi-app-semantic-model
      title: Power BI Purchases app semantic model
      label: possibly related
      why: touches Table 125 "Purch. Cr. Memo Line"
      by: code
    - to: https://learn.microsoft.com/dynamics365/business-central/check-purchase-amounts
      title: Check amounts on purchase invoices and credit memos
      label: possibly related
      why: Documents purchase credit memo amounts and posting validation related to quantities on purchase credit memo lines.
      by: model
number: 13344
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/13344
kind: pr
base_branch: releases/29.x
major: "29"
merged_at: "2026-11-10T05:00:27Z"
author: MSNehaNawal
author_type: User
community_contribution: false
labels:
  - "Team: SCM"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 18
  additions: 554
  deletions: 16
  al: 11
apps:
  - Base Application
objects_touched:
  - key: table/125
    page: table/125
    type: table
    id: 125
    name: Purch. Cr. Memo Line
    app: Base Application
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 656989
systems:
  - purchasing
quote: when there is no linked item ledger entry and the line is an inventory item, skip the Order No. / Order Line No. fallback
joined_against:
  major: "29"
  commit: 888eb4c9e31b4ccec32b4a0402d2d7272ac070bc
---

# #13344 [29.x]- Bug 647007 Copy Document on a Purchase Credit Memo 'Quantity Received', and 'Quantity Invoiced' reverted back on original Purchase Order

> Posting a purchase credit memo made by copying a posted invoice no longer reverts the received and invoiced quantities on the original purchase order. GetPurchaseInvoiceLine now skips the Order No. fallback for inventory item lines with no linked item ledger entry, while the corrective credit memo flow still reverts as designed.

[Pull request](https://github.com/microsoft/BCApps/pull/13344) · merged into `releases/29.x` (BC29) on 2026-11-10 by MSNehaNawal · 18 files (+554 -16), 11 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- New IsCorrectiveCreditMemo helper adds an early exit in Purch. Cr. Memo Line GetPurchaseInvoiceLine
- For inventory item lines with no linked item ledger entry, the Order No. / Order Line No. fallback is skipped
- Corrective credit memos that apply item ledger entries still revert the order as before
- Table change made in the W1, NA, BE, ES, FI, GB, IT, NO, APAC, RU and SE layers
- Tests added in W1, NA, BE, CZ and IT; background posting tests adjusted
- Behaviour changes for users or extensions.

## AL objects touched

- [Table 125 "Purch. Cr. Memo Line"](../../objects/table/125.md), Base Application: modified

## Context

- Work items: AB#656989
- Labels: Team: SCM
- Systems: purchasing
- From the description: "when there is no linked item ledger entry and the line is an inventory item, skip the Order No. / Order Line No. fallback"

## Possibly related

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

- [Power BI Purchases app semantic model](https://learn.microsoft.com/dynamics365/business-central/purchases-powerbi-app-semantic-model) — possibly related: touches Table 125 "Purch. Cr. Memo Line"
- [Check amounts on purchase invoices and credit memos](https://learn.microsoft.com/dynamics365/business-central/check-purchase-amounts) — possibly related: Documents purchase credit memo amounts and posting validation related to quantities on purchase credit memo lines. (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).
