---
id: change/bcapps/12770
type: change
title: "#12770 [Main]-Project Ledger Entry does not get the modified amount from Purchase Order Statistics if the Purchase line is of type G/L Account in the Spanish version."
summary: Fixed a bug where project ledger entries did not reflect modified invoice discounts on G/L Account lines in purchase orders, even though G/L entries were correct.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit purch.-post
  - codeunit job transfer line
system: purchasing
review:
  state: reviewed
  by: opus
  at: "2026-11-10T00:55:32.680Z"
  flags: []
generated:
  at: "2026-11-30T13:33:07.232Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: efa587dd76a698dc3028fa28989eae8cdbcfaad0
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/12770
    title: "microsoft/BCApps#12770: [Main]-Project Ledger Entry does not get the modified amount from Purchase Order Statistics if the Purchase line is of type G/L Account in the Spanish version."
    date: "2026-11-09"
    commit: efa587dd76a698dc3028fa28989eae8cdbcfaad0
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/codeunit/90
    - object/codeunit/1004
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 12770
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/12770
kind: pr
base_branch: main
major: "30"
merged_at: "2026-11-09T23:18:04Z"
author: DhavalMore88
author_type: User
community_contribution: true
labels:
  - "ADO: Sync"
  - From Fork
  - "Team: SCM"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 16
  additions: 2454
  deletions: 51
  al: 14
apps:
  - Base Application
objects_touched:
  - key: codeunit/90
    page: codeunit/90
    type: codeunit
    id: 90
    name: Purch.-Post
    app: Base Application
    status: modified
  - key: codeunit/1004
    page: codeunit/1004
    type: codeunit
    id: 1004
    name: Job Transfer Line
    app: Base Application
    status: modified
objects_unjoined:
  - path: src/Layers/BE/BaseApp/Projects/Project/Journal/JobTransferLine.Codeunit.al
    status: modified
    reason: not-in-snapshot
  - path: src/Layers/FI/BaseApp/Purchases/Posting/PurchPost.Codeunit.al
    status: modified
    reason: not-in-snapshot
  - path: src/Layers/GB/BaseApp/Purchases/Posting/PurchPost.Codeunit.al
    status: modified
    reason: not-in-snapshot
  - path: src/Layers/NA/BaseApp/Projects/Project/Journal/JobTransferLine.Codeunit.al
    status: modified
    reason: not-in-snapshot
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 643968
systems:
  - purchasing
  - projects
quote: null
joined_against:
  major: "30"
  commit: f53bb0f1ecd89fde9f133f9dcaf5bf43cf5f2671
---

# #12770 [Main]-Project Ledger Entry does not get the modified amount from Purchase Order Statistics if the Purchase line is of type G/L Account in the Spanish version.

> Fixed a bug where project ledger entries did not reflect modified invoice discounts on G/L Account lines in purchase orders, even though G/L entries were correct.

[Pull request](https://github.com/microsoft/BCApps/pull/12770) · merged into `main` (BC30) on 2026-11-09 by DhavalMore88 (community contribution) · 16 files (+2454 -51), 14 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Project ledger entries now use the invoiced discount when partial invoices are posted with a changed invoice discount on G/L Account lines
- New procedures in Purch.-Post calculate the per-unit discount gap and apply it to the unit cost of the line copy used for project posting
- The adjustment accounts for Indirect Cost %, Prices Including VAT and currency
- Item lines were not affected by the bug
- Purch.-Post changed in W1, NA, BE, CH, ES, FI, GB, IT, RU and APAC layers; Job Transfer Line also updated in W1, NA, BE and IT
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 90 "Purch.-Post"](../../objects/codeunit/90.md), Base Application: modified
- [Codeunit 1004 "Job Transfer Line"](../../objects/codeunit/1004.md), Base Application: modified
- `src/Layers/BE/BaseApp/Projects/Project/Journal/JobTransferLine.Codeunit.al`: modified, not in the BC30 snapshot
- `src/Layers/FI/BaseApp/Purchases/Posting/PurchPost.Codeunit.al`: modified, not in the BC30 snapshot
- `src/Layers/GB/BaseApp/Purchases/Posting/PurchPost.Codeunit.al`: modified, not in the BC30 snapshot
- `src/Layers/NA/BaseApp/Projects/Project/Journal/JobTransferLine.Codeunit.al`: modified, not in the BC30 snapshot

## Context

- Work items: AB#643968
- Labels: ADO: Sync, From Fork, Team: SCM
- Systems: purchasing, projects

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