---
id: change/bcapps/10736
type: change
title: "#10736 [Main]- Mismatch between Purchase Invoice Total in Lines and Statistics after VAT adjustment"
summary: Purchase invoice line totals now correctly reflect manual VAT adjustments from the statistics page when using mixed VAT groups, fixing a mismatch issue by recalculating grouped VAT amounts.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit document totals
system: platform
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:07:03.214Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 2df39bf5e9738b621b6d9fcb1f21b24bd303b264
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/10736
    title: "microsoft/BCApps#10736: [Main]- Mismatch between Purchase Invoice Total in Lines and Statistics after VAT adjustment"
    date: "2026-08-31"
    commit: 2df39bf5e9738b621b6d9fcb1f21b24bd303b264
    t: null
    quote: Mismatch between Purchase Invoice Total in Lines and Statistics after VAT adjustment
links:
  learn: []
  objects:
    - object/codeunit/57
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 10736
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/10736
kind: pr
base_branch: main
major: "30"
merged_at: "2026-08-31T14:20:03Z"
author: DeepsShukla
author_type: User
community_contribution: false
labels:
  - "Ownership: Manual"
  - "Team: Finance"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 4
  additions: 227
  deletions: 1
  al: 3
apps:
  - Base Application
objects_touched:
  - key: codeunit/57
    page: codeunit/57
    type: codeunit
    id: 57
    name: Document Totals
    app: Base Application
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 642172
systems:
  - platform
quote: Mismatch between Purchase Invoice Total in Lines and Statistics after VAT adjustment
joined_against:
  major: "30"
  commit: ecbc028c25dbe83b61313bc566e6c1d41184bb1c
---

# #10736 [Main]- Mismatch between Purchase Invoice Total in Lines and Statistics after VAT adjustment

> Purchase invoice line totals now correctly reflect manual VAT adjustments from the statistics page when using mixed VAT groups, fixing a mismatch issue by recalculating grouped VAT amounts.

[Pull request](https://github.com/microsoft/BCApps/pull/10736) · merged into `main` (BC30) on 2026-08-31 by DeepsShukla · 4 files (+227 -1), 3 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- VAT amount on the purchase invoice subform now reflects manual VAT adjustments made on the Statistics page
- Grouped VAT is recalculated with CalcVATAmountLines only when lines carry a VAT Difference
- Subform totals are overridden to match the statistics when mixed VAT groups are used
- Document Totals codeunit changed in the W1, NA and BE layers
- Test added in DocumentTotalsPages
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 57 "Document Totals"](../../objects/codeunit/57.md), Base Application: modified

## Context

- Work items: AB#642172
- Labels: Ownership: Manual, Team: Finance
- Systems: platform
- From the description: "Mismatch between Purchase Invoice Total in Lines and Statistics after VAT adjustment"

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