---
id: change/bcapps/9985
type: change
title: "#9985 [Master]-For an Item of 'Type' Service or Non-Inventory we allow you to increase the Quantity of the Corrective Credit Memo which then if posted updates the Purchase Order with a negative Received and Invoiced values"
summary: Fixes corrective credit memos from posted purchase invoices with Service or Non-Inventory lines. Before, the quantity could be increased, and posting the credit memo left negative Received and Invoiced values on the original purchase order. Purchase Line and Correct Posted Purch. Invoice are changed in W1 and the localization layers.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - table purchase line
  - codeunit correct posted purch. invoice
system: purchasing
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:09:55.797Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 3d9202436352fb5ced08a0154f32e2e1e530ead3
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/9985
    title: "microsoft/BCApps#9985: [Master]-For an Item of 'Type' Service or Non-Inventory we allow you to increase the Quantity of the Corrective Credit Memo which then if posted updates the Purchase Order with a negative Received and Invoiced values"
    date: "2026-08-07"
    commit: 3d9202436352fb5ced08a0154f32e2e1e530ead3
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/table/39
    - object/codeunit/1313
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 9985
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/9985
kind: pr
base_branch: main
major: "30"
merged_at: "2026-08-07T13:56:42Z"
author: neeleshsinghal
author_type: User
community_contribution: false
labels:
  - "Team: SCM"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 25
  additions: 1565
  deletions: 0
  al: 18
apps:
  - Base Application
objects_touched:
  - key: table/39
    page: table/39
    type: table
    id: 39
    name: Purchase Line
    app: Base Application
    status: modified
  - key: codeunit/1313
    page: codeunit/1313
    type: codeunit
    id: 1313
    name: Correct Posted Purch. Invoice
    app: Base Application
    status: modified
objects_unjoined:
  - path: src/Layers/ES/BaseApp/Purchases/History/CorrectPostedPurchInvoice.Codeunit.al
    status: modified
    reason: not-in-snapshot
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 645182
systems:
  - purchasing
quote: null
joined_against:
  major: "30"
  commit: f18567dc08e2bd162bf192e1da4d714b57eb099f
---

# #9985 [Master]-For an Item of 'Type' Service or Non-Inventory we allow you to increase the Quantity of the Corrective Credit Memo which then if posted updates the Purchase Order with a negative Received and Invoiced values

> Fixes corrective credit memos from posted purchase invoices with Service or Non-Inventory lines. Before, the quantity could be increased, and posting the credit memo left negative Received and Invoiced values on the original purchase order. Purchase Line and Correct Posted Purch. Invoice are changed in W1 and the localization layers.

[Pull request](https://github.com/microsoft/BCApps/pull/9985) · merged into `main` (BC30) on 2026-08-07 by neeleshsinghal · 25 files (+1565 -0), 18 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Addresses quantity increases on corrective credit memos for Service and Non-Inventory purchase lines
- Before the fix, posting such a credit memo left negative Received and Invoiced values on the purchase order
- Changes Purchase Line (table 39) and Correct Posted Purch. Invoice (codeunit 1313) across W1 and the localization layers
- Adds tests to O365CorrectPurchaseInvoice in several layers
- Behaviour changes for users or extensions.

## AL objects touched

- [Table 39 "Purchase Line"](../../objects/table/39.md), Base Application: modified
- [Codeunit 1313 "Correct Posted Purch. Invoice"](../../objects/codeunit/1313.md), Base Application: modified
- `src/Layers/ES/BaseApp/Purchases/History/CorrectPostedPurchInvoice.Codeunit.al`: modified, not in the BC30 snapshot

## Context

- Work items: AB#645182
- Labels: Team: SCM
- Systems: purchasing

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