---
id: change/bcapps/9863
type: change
title: "#9863 [Extensibility Request] issue 29074: expose PurchLineQty in OnSumPurchLines2OnBeforeDivideAmount"
summary: The OnSumPurchLines2OnBeforeDivideAmount event now exposes the PurchLineQty parameter by reference, allowing subscribers to adjust the purchase line quantity before amount division calculations run.
tier: official
language: en
tags:
  - feature
  - main
  - bc30
  - codeunit purch.-post
system: purchasing
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:10:31.052Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: a7209f2ac4af01e2e3b329028fa4ae15b64067b5
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/9863
    title: "microsoft/BCApps#9863: [Extensibility Request] issue 29074: expose PurchLineQty in OnSumPurchLines2OnBeforeDivideAmount"
    date: "2026-08-03"
    commit: a7209f2ac4af01e2e3b329028fa4ae15b64067b5
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/codeunit/90
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 9863
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/9863
kind: pr
base_branch: main
major: "30"
merged_at: "2026-08-03T14:23:36Z"
author: AleksandricMarko
author_type: User
community_contribution: false
labels:
  - "Team: SCM"
  - event-request
change_class: code
change_kind: feature
behavior_change: false
breaking: true
files:
  count: 10
  additions: 20
  deletions: 20
  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: []
fixes_issues: []
work_items:
  - 597602
systems:
  - purchasing
quote: null
joined_against:
  major: "30"
  commit: ecbc028c25dbe83b61313bc566e6c1d41184bb1c
---

# #9863 [Extensibility Request] issue 29074: expose PurchLineQty in OnSumPurchLines2OnBeforeDivideAmount

> The OnSumPurchLines2OnBeforeDivideAmount event now exposes the PurchLineQty parameter by reference, allowing subscribers to adjust the purchase line quantity before amount division calculations run.

[Pull request](https://github.com/microsoft/BCApps/pull/9863) · merged into `main` (BC30) on 2026-08-03 by AleksandricMarko · 10 files (+20 -20), 10 AL · feature · tier official · reviewed (checked by Opus)

## What changed

- Added a var PurchLineQty: Decimal parameter at the end of OnSumPurchLines2OnBeforeDivideAmount
- Subscribers can change the quantity used before DivideAmount runs in SumPurchLines2
- Applied to W1 and every country layer with its own Purch.-Post copy (APAC, BE, CH, ES, FI, GB, IT, NA, RU)
- Requested to support amount-only purchasing modes in partner solutions
- Breaking: existing extensions can stop compiling or working.

## AL objects touched

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

## Context

- Work items: AB#597602
- Labels: Team: SCM, event-request
- 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).
