---
id: change/bcapps/13467
type: change
title: "#13467 [29.x[All-e]Payment Discount with Prices Incl. VAT provides unexpected results in the Spanish version"
summary: Spanish version payment discount calculation corrected for prices including VAT by accounting for payment discount amount when recalculating VAT base.
tier: official
language: en
tags:
  - fix
  - releases/29.x
  - bc29
  - table vat amount line
  - codeunit purch.-calc.discount
system: finance
review:
  state: reviewed
  by: opus
  at: "2026-11-15T00:48:05.494Z"
  flags: []
generated:
  at: "2026-11-29T00:16:19.301Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 767fe5139708ab07d29eb48d189cd09990f41b7f
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/13467
    title: "microsoft/BCApps#13467: [29.x[All-e]Payment Discount with Prices Incl. VAT provides unexpected results in the Spanish version"
    date: "2026-11-12"
    commit: 767fe5139708ab07d29eb48d189cd09990f41b7f
    t: null
    quote: Subtract "Pmt. Discount Amount" when recalculating the VAT base in the VAT-inclusive branch.
links:
  learn: []
  objects:
    - object/table/290
    - object/codeunit/70
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
  related:
    - to: https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-test-application-example-purchase-invoice-discounts
      title: Application Testing Example to Test Purchase Invoice Discounts
      label: possibly related
      why: touches Codeunit 70 "Purch.-Calc.Discount"
      by: code
    - to: https://learn.microsoft.com/dynamics365/business-central/sales-how-record-sales-price-discount-payment-agreements
      title: Record special sales prices and discounts
      label: possibly related
      why: Documents sales price and discount calculation, relevant to payment discounts with prices including VAT.
      by: model
number: 13467
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/13467
kind: pr
base_branch: releases/29.x
major: "29"
merged_at: "2026-11-12T10:11:44Z"
author: sanjmaurya
author_type: User
community_contribution: false
labels:
  - "Team: Finance"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 3
  additions: 170
  deletions: 1
  al: 2
apps:
  - Base Application
objects_touched:
  - key: table/290
    page: table/290
    type: table
    id: 290
    name: VAT Amount Line
    app: Base Application
    status: modified
  - key: codeunit/70
    page: codeunit/70
    type: codeunit
    id: 70
    name: Purch.-Calc.Discount
    app: Base Application
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 657334
systems:
  - finance
  - purchasing
quote: Subtract "Pmt. Discount Amount" when recalculating the VAT base in the VAT-inclusive branch.
joined_against:
  major: "29"
  commit: 229c71f1927eed3c6f5f2cac1e8701b916c315fb
---

# #13467 [29.x[All-e]Payment Discount with Prices Incl. VAT provides unexpected results in the Spanish version

> Spanish version payment discount calculation corrected for prices including VAT by accounting for payment discount amount when recalculating VAT base.

[Pull request](https://github.com/microsoft/BCApps/pull/13467) · merged into `releases/29.x` (BC29) on 2026-11-12 by sanjmaurya · 3 files (+170 -1), 2 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Payment discounts now correctly reflected in sales and purchase totals when prices include VAT
- VAT-inclusive branch now subtracts payment discount amount during VAT base recalculation
- VAT-exclusive calculations left unchanged to preserve existing behavior
- Addresses issue when VAT base discount percentage and EC amount are zero
- Comprehensive test coverage added for payment discount scenarios
- Behaviour changes for users or extensions.

## AL objects touched

- [Table 290 "VAT Amount Line"](../../objects/table/290.md), Base Application (ES layer): modified
- [Codeunit 70 "Purch.-Calc.Discount"](../../objects/codeunit/70.md), Base Application (ES layer): modified

## Context

- Work items: AB#657334
- Labels: Team: Finance
- Systems: finance, purchasing
- From the description: "Subtract "Pmt. Discount Amount" when recalculating the VAT base in the VAT-inclusive branch."

## Possibly related

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

- [Application Testing Example to Test Purchase Invoice Discounts](https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-test-application-example-purchase-invoice-discounts) — possibly related: touches Codeunit 70 "Purch.-Calc.Discount"
- [Record special sales prices and discounts](https://learn.microsoft.com/dynamics365/business-central/sales-how-record-sales-price-discount-payment-agreements) — possibly related: Documents sales price and discount calculation, relevant to payment discounts with prices including VAT. (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).
