---
id: change/bcapps/14413
type: change
title: "#14413 [29.x][ALL-E] Posting a Sales Credit Memo with a different Unit of Measure does not convert the quantity before updating the originating Sales Order (Blanket Sales Order is updated correctly)"
summary: Posting a sales credit memo with a different unit of measure now correctly converts the quantity before updating the originating sales order, preventing incorrect deductions from shipped and invoiced quantities.
tier: official
language: en
tags:
  - fix
  - releases/29.x
  - bc29
  - codeunit correct posted sales invoice
system: sales
review:
  state: reviewed
  by: opus
  at: "2026-11-27T01:03:39.784Z"
  flags: []
generated:
  at: "2026-12-06T00:14:19.053Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 3ceaa760f1a7eec4ab4679ce2e6e90727f42c715
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/14413
    title: "microsoft/BCApps#14413: [29.x][ALL-E] Posting a Sales Credit Memo with a different Unit of Measure does not convert the quantity before updating the originating Sales Order (Blanket Sales Order is updated correctly)"
    date: "2026-11-26"
    commit: 3ceaa760f1a7eec4ab4679ce2e6e90727f42c715
    t: null
    quote: Convert the credited base quantity using the sales order line's Qty. per Unit of Measure before updating quantities.
links:
  learn: []
  objects:
    - object/codeunit/1303
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
  related:
    - to: https://learn.microsoft.com/dynamics365/business-central/sales-how-correct-cancel-sales-invoice
      title: Correct or cancel a posted sales invoice
      label: possibly related
      why: Documents correcting posted sales invoices and credit memos, covering sales order updates.
      by: model
number: 14413
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/14413
kind: pr
base_branch: releases/29.x
major: "29"
merged_at: "2026-11-26T14:57:49Z"
author: sanjmaurya
author_type: User
community_contribution: false
labels:
  - "Team: SCM"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 4
  additions: 135
  deletions: 7
  al: 3
apps:
  - Base Application
objects_touched:
  - key: codeunit/1303
    page: codeunit/1303
    type: codeunit
    id: 1303
    name: Correct Posted Sales Invoice
    app: Base Application
    status: modified
objects_unjoined:
  - path: src/Layers/ES/BaseApp/Sales/History/CorrectPostedSalesInvoice.Codeunit.al
    status: modified
    reason: not-in-snapshot
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 658537
systems:
  - sales
quote: Convert the credited base quantity using the sales order line's Qty. per Unit of Measure before updating quantities.
joined_against:
  major: "29"
  commit: 4e6a307ce8a2e8c5a28f8f0c4c2c7d561f4fe679
---

# #14413 [29.x][ALL-E] Posting a Sales Credit Memo with a different Unit of Measure does not convert the quantity before updating the originating Sales Order (Blanket Sales Order is updated correctly)

> Posting a sales credit memo with a different unit of measure now correctly converts the quantity before updating the originating sales order, preventing incorrect deductions from shipped and invoiced quantities.

[Pull request](https://github.com/microsoft/BCApps/pull/14413) · merged into `releases/29.x` (BC29) on 2026-11-26 by sanjmaurya · 4 files (+135 -7), 3 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Credit memo quantities are converted to the sales order line's unit of measure before updating order quantities
- Fixes incorrect quantity deductions when units differ (e.g., 8 PCS no longer incorrectly treated as 8 SET)
- Solution applies the sales order line's conversion factor to the credited base quantity
- Regression tests added for different, fractional, and matching unit scenarios
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 1303 "Correct Posted Sales Invoice"](../../objects/codeunit/1303.md), Base Application: modified
- `src/Layers/ES/BaseApp/Sales/History/CorrectPostedSalesInvoice.Codeunit.al`: modified, not in the BC29 snapshot

## Context

- Work items: AB#658537
- Labels: Team: SCM
- Systems: sales
- From the description: "Convert the credited base quantity using the sales order line's Qty. per Unit of Measure before updating quantities."

## Possibly related

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

- [Correct or cancel a posted sales invoice](https://learn.microsoft.com/dynamics365/business-central/sales-how-correct-cancel-sales-invoice) — possibly related: Documents correcting posted sales invoices and credit memos, covering sales order updates. (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).
