---
id: change/bcapps/10798
type: change
title: "#10798 [29x]-Mismatch between Purchase Invoice Total in Lines and Statistics after VAT adjustment"
summary: Fixed a mismatch between purchase invoice totals displayed on the lines subform and the statistics page when VAT amounts are manually adjusted with mixed VAT groups. The fix recalculates grouped VAT and synchronizes the subform totals.
tier: official
language: en
tags:
  - fix
  - releases/29.x
  - bc29
  - codeunit document totals
system: platform
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:05:28.329Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 31461c012134ac4353b30c77edc3e3e712348a55
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/10798
    title: "microsoft/BCApps#10798: [29x]-Mismatch between Purchase Invoice Total in Lines and Statistics after VAT adjustment"
    date: "2026-09-14"
    commit: 31461c012134ac4353b30c77edc3e3e712348a55
    t: null
    quote: VAT Amount on the Purchase Invoice subform didn't reflect manual VAT adjustments from Statistics when mixed VAT groups were used.
links:
  learn: []
  objects:
    - object/codeunit/57
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 10798
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/10798
kind: pr
base_branch: releases/29.x
major: "29"
merged_at: "2026-09-14T11:35:10Z"
author: DeepsShukla
author_type: User
community_contribution: true
labels:
  - "ADO: Sync"
  - From Fork
  - "Team: SCM"
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:
  - 648334
systems:
  - platform
quote: VAT Amount on the Purchase Invoice subform didn't reflect manual VAT adjustments from Statistics when mixed VAT groups were used.
joined_against:
  major: "29"
  commit: 1d24dd5ee2a734510f0556ccc69342d0e616db2f
---

# #10798 [29x]-Mismatch between Purchase Invoice Total in Lines and Statistics after VAT adjustment

> Fixed a mismatch between purchase invoice totals displayed on the lines subform and the statistics page when VAT amounts are manually adjusted with mixed VAT groups. The fix recalculates grouped VAT and synchronizes the subform totals.

[Pull request](https://github.com/microsoft/BCApps/pull/10798) · merged into `releases/29.x` (BC29) on 2026-09-14 by DeepsShukla (community contribution) · 4 files (+227 -1), 3 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- VAT amounts on purchase invoice lines now correctly reflect manual adjustments made in the statistics page
- Recalculation uses CalcVATAmountLines when VAT differences are detected on line items
- Subform totals are overridden to ensure consistency with statistics calculations
- Fix applies to BE, NA, and W1 layers
- Test coverage added for document totals pages
- Behaviour changes for users or extensions.

## AL objects touched

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

## Context

- Work items: AB#648334
- Labels: ADO: Sync, From Fork, Team: SCM
- Systems: platform
- From the description: "VAT Amount on the Purchase Invoice subform didn't reflect manual VAT adjustments from Statistics when mixed VAT groups were used."

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