---
id: change/bcapps/9711
type: change
title: "#9711 Fix E-Document purchase draft header Sub Total overwrite; notify on mismatch"
summary: E-Document purchase draft no longer silently overwrites the header Sub Total when lines are edited. Users are now notified when the header total diverges from the line totals beyond a rounding tolerance, with options to dismiss or ignore future warnings.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit e-doc. draft notif. state
  - codeunit e-document notification
  - table e-document notification
  - enum e-document notification type
  - page e-doc. purchase draft subform
  - page e-document purchase draft
system: integration
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:09:06.134Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 8a1569ede3002307f541fb8aa4fbede3f56d18e5
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/9711
    title: "microsoft/BCApps#9711: Fix E-Document purchase draft header Sub Total overwrite; notify on mismatch"
    date: "2026-08-14"
    commit: 8a1569ede3002307f541fb8aa4fbede3f56d18e5
    t: null
    quote: The header total should be preserved, and the user should instead be warned when it diverges from the lines beyond a rounding tolerance.
links:
  learn: []
  objects:
    - object/codeunit/6436
    - object/codeunit/6123
    - object/table/6126
    - object/enum/6126
    - object/page/6183
    - object/page/6181
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 9711
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/9711
kind: pr
base_branch: main
major: "30"
merged_at: "2026-08-14T10:21:05Z"
author: ventselartur
author_type: User
community_contribution: false
labels:
  - "AL: Apps (W1)"
  - "Team: Integrations"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 8
  additions: 1587
  deletions: 63
  al: 6
apps:
  - EDocument
objects_touched:
  - key: codeunit/6436
    page: codeunit/6436
    type: codeunit
    id: 6436
    name: E-Doc. Draft Notif. State
    app: EDocument
    status: added
  - key: codeunit/6123
    page: codeunit/6123
    type: codeunit
    id: 6123
    name: E-Document Notification
    app: EDocument
    status: modified
  - key: table/6126
    page: table/6126
    type: table
    id: 6126
    name: E-Document Notification
    app: EDocument
    status: modified
  - key: enum/6126
    page: enum/6126
    type: enum
    id: 6126
    name: E-Document Notification Type
    app: EDocument
    status: modified
  - key: page/6183
    page: page/6183
    type: page
    id: 6183
    name: E-Doc. Purchase Draft Subform
    app: EDocument
    status: modified
  - key: page/6181
    page: page/6181
    type: page
    id: 6181
    name: E-Document Purchase Draft
    app: EDocument
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 642364
systems:
  - integration
quote: The header total should be preserved, and the user should instead be warned when it diverges from the lines beyond a rounding tolerance.
joined_against:
  major: "30"
  commit: ecbc028c25dbe83b61313bc566e6c1d41184bb1c
---

# #9711 Fix E-Document purchase draft header Sub Total overwrite; notify on mismatch

> E-Document purchase draft no longer silently overwrites the header Sub Total when lines are edited. Users are now notified when the header total diverges from the line totals beyond a rounding tolerance, with options to dismiss or ignore future warnings.

[Pull request](https://github.com/microsoft/BCApps/pull/9711) · merged into `main` (BC30) on 2026-08-14 by ventselartur · 8 files (+1587 -63), 6 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Purchase draft header Sub Total is preserved from the incoming document instead of being recalculated
- Added tolerance-based mismatch detection (rounding precision × line count) between header and line totals
- Notifications appear on the purchase draft subform with Dismiss and Don't-show-again actions
- Mismatch dismissal is persisted on the E-Document Purchase Header and re-arms when amounts are edited
- Telemetry logging captures detected mismatches with totals, tolerance, and difference values
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 6436 "E-Doc. Draft Notif. State"](../../objects/codeunit/6436.md), EDocument: added
- [Codeunit 6123 "E-Document Notification"](../../objects/codeunit/6123.md), EDocument: modified
- [Table 6126 "E-Document Notification"](../../objects/table/6126.md), EDocument: modified
- [Enum 6126 "E-Document Notification Type"](../../objects/enum/6126.md), EDocument: modified
- [Page 6183 "E-Doc. Purchase Draft Subform"](../../objects/page/6183.md), EDocument: modified
- [Page 6181 "E-Document Purchase Draft"](../../objects/page/6181.md), EDocument: modified

## Context

- Work items: AB#642364
- Labels: AL: Apps (W1), Team: Integrations
- Systems: integration
- From the description: "The header total should be preserved, and the user should instead be warned when it diverges from the lines beyond a rounding tolerance."

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