---
id: change/bcapps/13396
type: change
title: '#13396 [main] Purchase invoice fails with "quantity larger than item ledger entry" after partial invoicing of multiple receipts with non-base UoM and Qty. Rounding Precision = 1'
summary: Fixes a posting issue where partial purchase invoices with non-base units of measure and quantity rounding could fail when multiple receipts were involved, by ensuring remaining receipt quantities are correctly applied for equal quantities.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit purch.-post
system: purchasing
review:
  state: reviewed
  by: opus
  at: "2026-11-04T00:58:50.679Z"
  flags: []
generated:
  at: "2026-11-24T00:13:35.655Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: a26d527f1936342cdcaf51fa3e38751e1bd7b12c
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/13396
    title: 'microsoft/BCApps#13396: [main] Purchase invoice fails with "quantity larger than item ledger entry" after partial invoicing of multiple receipts with non-base UoM and Qty. Rounding Precision = 1'
    date: "2026-11-03"
    commit: a26d527f1936342cdcaf51fa3e38751e1bd7b12c
    t: null
    quote: Use a greater-than-or-equal comparison so posted receipt base quantities are used for equal quantities as well.
links:
  learn: []
  objects:
    - object/codeunit/90
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
  related:
    - to: https://learn.microsoft.com/dynamics365/business-central/purchasing-how-record-purchases
      title: Record purchases with purchase invoices
      label: possibly related
      why: Documents purchase invoice posting including handling multiple receipts and partial invoicing
      by: model
    - to: https://learn.microsoft.com/dynamics365/business-central/inventory-how-setup-units-of-measure
      title: Set up item units of measure
      label: possibly related
      why: Documents units of measure setup including quantity rounding precision for purchase transactions
      by: model
number: 13396
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/13396
kind: pr
base_branch: main
major: "30"
merged_at: "2026-11-03T06:34:16Z"
author: Shikhverma
author_type: User
community_contribution: false
labels:
  - "Team: SCM"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 15
  additions: 520
  deletions: 50
  al: 10
apps:
  - Base Application
objects_touched:
  - key: codeunit/90
    page: codeunit/90
    type: codeunit
    id: 90
    name: Purch.-Post
    app: Base Application
    status: modified
objects_unjoined: []
obsoletions: []
backports:
  - number: 13498
    base: releases/29.x
    url: https://github.com/microsoft/BCApps/pull/13498
fixes_issues: []
work_items:
  - 657027
systems:
  - purchasing
quote: Use a greater-than-or-equal comparison so posted receipt base quantities are used for equal quantities as well.
joined_against:
  major: "30"
  commit: d2abc1d2ceae394331716c8183ef60e1534c2ce0
---

# #13396 [main] Purchase invoice fails with "quantity larger than item ledger entry" after partial invoicing of multiple receipts with non-base UoM and Qty. Rounding Precision = 1

> Fixes a posting issue where partial purchase invoices with non-base units of measure and quantity rounding could fail when multiple receipts were involved, by ensuring remaining receipt quantities are correctly applied for equal quantities.

[Pull request](https://github.com/microsoft/BCApps/pull/13396) · merged into `main` (BC30) on 2026-11-03 by Shikhverma · 15 files (+520 -50), 10 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Changed quantity comparison from greater-than to greater-than-or-equal to properly handle remaining receipt base quantities
- Fixes posting failures that occurred after partial invoicing of multiple receipts with specific rounding precision settings
- Added regression test coverage across applicable localization layers to prevent recurrence
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 90 "Purch.-Post"](../../objects/codeunit/90.md), Base Application: modified

## Also merged into

- [#13498](https://github.com/microsoft/BCApps/pull/13498) into `releases/29.x` on 2026-11-23

## Context

- Work items: AB#657027
- Labels: Team: SCM
- Systems: purchasing
- From the description: "Use a greater-than-or-equal comparison so posted receipt base quantities are used for equal quantities as well."

## Possibly related

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

- [Record purchases with purchase invoices](https://learn.microsoft.com/dynamics365/business-central/purchasing-how-record-purchases) — possibly related: Documents purchase invoice posting including handling multiple receipts and partial invoicing (model-linked)
- [Set up item units of measure](https://learn.microsoft.com/dynamics365/business-central/inventory-how-setup-units-of-measure) — possibly related: Documents units of measure setup including quantity rounding precision for purchase transactions (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).
