---
id: change/bcapps/10361
type: change
title: "#10361 [main] Line Discount Amount Rounding Discrepancy When Transferring Project Planning Lines to Sales Invoice"
summary: Line Discount Amount is now correctly preserved when transferring project planning lines to a sales invoice, eliminating rounding discrepancies caused by recalculation from the rounded percentage.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit job create-invoice
system: projects
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:07:03.811Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: f29a59a6acb6715f62f77711bcc9939101f6024f
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/10361
    title: "microsoft/BCApps#10361: [main] Line Discount Amount Rounding Discrepancy When Transferring Project Planning Lines to Sales Invoice"
    date: "2026-08-31"
    commit: f29a59a6acb6715f62f77711bcc9939101f6024f
    t: null
    quote: Line Discount Amount rounding discrepancy when transferring Project Planning Lines to a Sales Invoice.
links:
  learn: []
  objects:
    - object/codeunit/1002
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 10361
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/10361
kind: pr
base_branch: main
major: "30"
merged_at: "2026-08-31T05:29:36Z"
author: Shikhverma
author_type: User
community_contribution: false
labels:
  - "Team: SCM"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 4
  additions: 824
  deletions: 1
  al: 1
apps:
  - Base Application
objects_touched:
  - key: codeunit/1002
    page: codeunit/1002
    type: codeunit
    id: 1002
    name: Job Create-Invoice
    app: Base Application
    status: modified
objects_unjoined: []
obsoletions: []
backports:
  - number: 10952
    base: releases/29.x
    url: https://github.com/microsoft/BCApps/pull/10952
fixes_issues: []
work_items:
  - 647197
systems:
  - projects
quote: Line Discount Amount rounding discrepancy when transferring Project Planning Lines to a Sales Invoice.
joined_against:
  major: "30"
  commit: ecbc028c25dbe83b61313bc566e6c1d41184bb1c
---

# #10361 [main] Line Discount Amount Rounding Discrepancy When Transferring Project Planning Lines to Sales Invoice

> Line Discount Amount is now correctly preserved when transferring project planning lines to a sales invoice, eliminating rounding discrepancies caused by recalculation from the rounded percentage.

[Pull request](https://github.com/microsoft/BCApps/pull/10361) · merged into `main` (BC30) on 2026-08-31 by Shikhverma · 4 files (+824 -1), 1 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Fixed rounding discrepancy where line discount amount was recalculated from rounded percentage instead of preserving the original value
- After percentage validation, the exact line discount amount from the planning line is now transferred to the sales line
- Handles partial invoicing and credit memos through quantity ratio calculation
- Converts discount amount to invoice currency when needed
- Added test case validating that discount amount remains accurate through the transfer process
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 1002 "Job Create-Invoice"](../../objects/codeunit/1002.md), Base Application: modified

## Also merged into

- [#10952](https://github.com/microsoft/BCApps/pull/10952) into `releases/29.x` on 2026-09-03

## Context

- Work items: AB#647197
- Labels: Team: SCM
- Systems: projects
- From the description: "Line Discount Amount rounding discrepancy when transferring Project Planning Lines to a Sales Invoice."

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