---
id: change/bcapps/13885
type: change
title: "#13885 [Main]- Final sales invoice uses item Gen. Prod. Posting Group on prepayment deduction line"
summary: Posting a final sales invoice no longer applies the item's Gen. Prod. Posting Group to the prepayment deduction line. The fix is in Sales-Post (codeunit 80) across all localized layers, with new prepayment tests.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit sales-post
system: sales
review:
  state: reviewed
  by: opus
  at: "2026-11-28T01:06:57.124Z"
  flags: []
generated:
  at: "2026-11-30T13:33:07.232Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: b9977ce535588a297bc270c0d311e2e2ae465f2d
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/13885
    title: "microsoft/BCApps#13885: [Main]- Final sales invoice uses item Gen. Prod. Posting Group on prepayment deduction line"
    date: "2026-11-27"
    commit: b9977ce535588a297bc270c0d311e2e2ae465f2d
    t: null
    quote: Final sales invoice uses item Gen. Prod. Posting Group on prepayment deduction line
links:
  learn: []
  objects:
    - object/codeunit/80
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
  related:
    - to: https://learn.microsoft.com/dynamics365/business-central/design-details-item-tracking-posting-structure
      title: Design details - Item tracking posting structure
      label: possibly related
      why: touches Codeunit 80 "Sales-Post"
      by: code
    - to: https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-snapshot-debugging
      title: Snapshot debugging
      label: possibly related
      why: touches Codeunit 80 "Sales-Post"
      by: code
    - 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 setting up and invoicing sales prepayments, relevant to prepayment deduction line Gen. Prod. Posting Group bug.
      by: model
number: 13885
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/13885
kind: pr
base_branch: main
major: "30"
merged_at: "2026-11-27T14:05:44Z"
author: DeepsShukla
author_type: User
community_contribution: false
labels:
  - "Team: SCM"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 14
  additions: 296
  deletions: 48
  al: 12
apps:
  - Base Application
objects_touched:
  - key: codeunit/80
    page: codeunit/80
    type: codeunit
    id: 80
    name: Sales-Post
    app: Base Application
    status: modified
objects_unjoined:
  - path: src/Layers/BE/BaseApp/Sales/Posting/SalesPost.Codeunit.al
    status: modified
    reason: not-in-snapshot
  - path: src/Layers/FI/BaseApp/Sales/Posting/SalesPost.Codeunit.al
    status: modified
    reason: not-in-snapshot
  - path: src/Layers/NO/BaseApp/Sales/Posting/SalesPost.Codeunit.al
    status: modified
    reason: not-in-snapshot
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 660995
systems:
  - sales
quote: Final sales invoice uses item Gen. Prod. Posting Group on prepayment deduction line
joined_against:
  major: "30"
  commit: f53bb0f1ecd89fde9f133f9dcaf5bf43cf5f2671
---

# #13885 [Main]- Final sales invoice uses item Gen. Prod. Posting Group on prepayment deduction line

> Posting a final sales invoice no longer applies the item's Gen. Prod. Posting Group to the prepayment deduction line. The fix is in Sales-Post (codeunit 80) across all localized layers, with new prepayment tests.

[Pull request](https://github.com/microsoft/BCApps/pull/13885) · merged into `main` (BC30) on 2026-11-27 by DeepsShukla · 14 files (+296 -48), 12 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Prepayment deduction lines on the final sales invoice no longer take the item's Gen. Prod. Posting Group
- Small change in Sales-Post codeunit 80
- Applied in APAC, BE, CH, ES, FI, FR, GB, IT, NA, NO, RU and W1 layers
- Regression tests added to ERM Prepayment in W1 and RU
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 80 "Sales-Post"](../../objects/codeunit/80.md), Base Application: modified
- `src/Layers/BE/BaseApp/Sales/Posting/SalesPost.Codeunit.al`: modified, not in the BC30 snapshot
- `src/Layers/FI/BaseApp/Sales/Posting/SalesPost.Codeunit.al`: modified, not in the BC30 snapshot
- `src/Layers/NO/BaseApp/Sales/Posting/SalesPost.Codeunit.al`: modified, not in the BC30 snapshot

## Context

- Work items: AB#660995
- Labels: Team: SCM
- Systems: sales
- From the description: "Final sales invoice uses item Gen. Prod. Posting Group on prepayment deduction line"

## Possibly related

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

- [Design details - Item tracking posting structure](https://learn.microsoft.com/dynamics365/business-central/design-details-item-tracking-posting-structure) — possibly related: touches Codeunit 80 "Sales-Post"
- [Snapshot debugging](https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-snapshot-debugging) — possibly related: touches Codeunit 80 "Sales-Post"
- [Set up and invoicing sales prepayments](https://learn.microsoft.com/dynamics365/business-central/walkthrough-setting-up-and-invoicing-sales-prepayments) — possibly related: Documents setting up and invoicing sales prepayments, relevant to prepayment deduction line Gen. Prod. Posting Group bug. (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).
