---
id: change/bcapps/13642
type: change
title: "#13642 Preserve work descriptions on posted sales prepayment documents"
summary: Posting sales prepayment invoices and credit memos now loads the order's Work Description before copying the header, so the posted prepayment documents keep it. Previously the text could be lost when Calc. Inv. Discount caused the header to be reloaded.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit sales-post prepayments
system: sales
review:
  state: reviewed
  by: opus
  at: "2026-11-06T01:00:07.909Z"
  flags: []
generated:
  at: "2026-11-11T00:15:47.902Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 04bfa4e091204ebc1f6a02edcd8e387081cd1111
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/13642
    title: "microsoft/BCApps#13642: Preserve work descriptions on posted sales prepayment documents"
    date: "2026-11-05"
    commit: 04bfa4e091204ebc1f6a02edcd8e387081cd1111
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/codeunit/442
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
  related:
    - to: https://learn.microsoft.com/dynamics365/business-central/across-edit-posted-document
      title: Edit Posted Documents
      label: possibly related
      why: Covers editing posted documents, relevant to preserving data on posted prepayment documents.
      by: model
    - to: https://learn.microsoft.com/dynamics365/business-central/walkthrough-setting-up-and-invoicing-sales-prepayments
      title: Set up and invoicing sales prepayments
      label: possibly related
      why: Documents sales prepayment setup and invoicing process where work descriptions matter.
      by: model
number: 13642
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/13642
kind: pr
base_branch: main
major: "30"
merged_at: "2026-11-05T12:53:18Z"
author: JesperSchulz
author_type: User
community_contribution: false
labels:
  - "ADO: Sync"
  - "Team: SCM"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 13
  additions: 486
  deletions: 0
  al: 9
apps:
  - Base Application
objects_touched:
  - key: codeunit/442
    page: codeunit/442
    type: codeunit
    id: 442
    name: Sales-Post Prepayments
    app: Base Application
    status: modified
objects_unjoined:
  - path: src/Layers/BE/BaseApp/Sales/Posting/SalesPostPrepayments.Codeunit.al
    status: modified
    reason: not-in-snapshot
  - path: src/Layers/CH/BaseApp/Sales/Posting/SalesPostPrepayments.Codeunit.al
    status: modified
    reason: not-in-snapshot
  - path: src/Layers/ES/BaseApp/Sales/Posting/SalesPostPrepayments.Codeunit.al
    status: modified
    reason: not-in-snapshot
  - path: src/Layers/NL/BaseApp/Sales/Posting/SalesPostPrepayments.Codeunit.al
    status: modified
    reason: not-in-snapshot
obsoletions: []
backports: []
fixes_issues:
  - 8774
work_items:
  - 657998
systems:
  - sales
quote: null
joined_against:
  major: "30"
  commit: d2abc1d2ceae394331716c8183ef60e1534c2ce0
---

# #13642 Preserve work descriptions on posted sales prepayment documents

> Posting sales prepayment invoices and credit memos now loads the order's Work Description before copying the header, so the posted prepayment documents keep it. Previously the text could be lost when Calc. Inv. Discount caused the header to be reloaded.

[Pull request](https://github.com/microsoft/BCApps/pull/13642) · merged into `main` (BC30) on 2026-11-05 by JesperSchulz · 13 files (+486 -0), 9 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Work Description BLOB is loaded right before TransferFields when creating prepayment invoice and credit memo headers
- Fixes missing work description after the sales header is reloaded during invoice discount redistribution
- Four regression tests cover invoices and credit memos with automatic invoice discount calculation on and off
- Fix propagated to nine posting codeunits and tests to four test codeunits across W1 and localized layers
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 442 "Sales-Post Prepayments"](../../objects/codeunit/442.md), Base Application: modified
- `src/Layers/BE/BaseApp/Sales/Posting/SalesPostPrepayments.Codeunit.al`: modified, not in the BC30 snapshot
- `src/Layers/CH/BaseApp/Sales/Posting/SalesPostPrepayments.Codeunit.al`: modified, not in the BC30 snapshot
- `src/Layers/ES/BaseApp/Sales/Posting/SalesPostPrepayments.Codeunit.al`: modified, not in the BC30 snapshot
- `src/Layers/NL/BaseApp/Sales/Posting/SalesPostPrepayments.Codeunit.al`: modified, not in the BC30 snapshot

## Context

- Fixes: [#8774 [Bug]: Work Description is not transferred from Sales Order to Prepayment Invoice in BC28 when "Calc. Inv. Discount" setting is toggled ON in Sales & Receivables Setup (use to work in BC27)](https://github.com/microsoft/BCApps/issues/8774) (closed)
- Work items: AB#657998
- Labels: ADO: Sync, Team: SCM
- Systems: sales

## Possibly related

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

- [Edit Posted Documents](https://learn.microsoft.com/dynamics365/business-central/across-edit-posted-document) — possibly related: Covers editing posted documents, relevant to preserving data on posted prepayment documents. (model-linked)
- [Set up and invoicing sales prepayments](https://learn.microsoft.com/dynamics365/business-central/walkthrough-setting-up-and-invoicing-sales-prepayments) — possibly related: Documents sales prepayment setup and invoicing process where work descriptions matter. (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).
