---
id: change/bcapps/9783
type: change
title: "#9783 [Master] Purchase Return Order Posting Fails for Manually Reserved Lot-Tracked Items with Exact Cost Reversing Mandatory Enabled: \"Applies-to Entry must not be filled out when reservations exist in Item Ledger Entry Entry No.='XXX'\""
summary: Purchase return order posting now correctly handles manually reserved lot-tracked items when exact cost reversing is mandatory by automatically deriving the applies-to entry from the existing reservation during posting.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit purch. line-reserve
system: purchasing
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:10:40.148Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: a19df4bbe19b2be8c29a733a8d5bbae3883004f2
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/9783
    title: "microsoft/BCApps#9783: [Master] Purchase Return Order Posting Fails for Manually Reserved Lot-Tracked Items with Exact Cost Reversing Mandatory Enabled: \"Applies-to Entry must not be filled out when reservations exist in Item Ledger Entry Entry No.='XXX'\""
    date: "2026-07-31"
    commit: a19df4bbe19b2be8c29a733a8d5bbae3883004f2
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/codeunit/99000834
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 9783
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/9783
kind: pr
base_branch: main
major: "30"
merged_at: "2026-07-31T11:15:34Z"
author: Shikhverma
author_type: User
community_contribution: false
labels:
  - "Team: SCM"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 3
  additions: 121
  deletions: 5
  al: 1
apps:
  - Base Application
objects_touched:
  - key: codeunit/99000834
    page: codeunit/99000834
    type: codeunit
    id: 99000834
    name: Purch. Line-Reserve
    app: Base Application
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 644262
systems:
  - purchasing
quote: null
joined_against:
  major: "30"
  commit: ecbc028c25dbe83b61313bc566e6c1d41184bb1c
---

# #9783 [Master] Purchase Return Order Posting Fails for Manually Reserved Lot-Tracked Items with Exact Cost Reversing Mandatory Enabled: "Applies-to Entry must not be filled out when reservations exist in Item Ledger Entry Entry No.='XXX'"

> Purchase return order posting now correctly handles manually reserved lot-tracked items when exact cost reversing is mandatory by automatically deriving the applies-to entry from the existing reservation during posting.

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

## What changed

- Fixes posting failure for lot-tracked purchase returns reserved against the receipt entry when Exact Cost Reversing Mandatory is enabled
- When the return line is fully reserved against an item ledger entry and Appl.-to Item Entry is blank, the value is derived from the reserved entry
- No manual entry of the exact-cost link is needed any more
- Change made in the Purch. Line-Reserve codeunit; new test added and existing costing test adjusted
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 99000834 "Purch. Line-Reserve"](../../objects/codeunit/99000834.md), Base Application: modified

## Context

- Work items: AB#644262
- Labels: Team: SCM
- Systems: purchasing

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