---
id: change/bcapps/13414
type: change
title: "#13414 [Main]Payment Discount with Prices Incl. VAT provides unexpected results in the Spanish version"
summary: In the Spanish version, when Prices Including VAT is on, the VAT base recalculation now subtracts the payment discount amount. Payment discounts are now reflected in sales and purchase totals and statistics. VAT-exclusive calculations are unchanged.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - table vat amount line
  - codeunit purch.-calc.discount
system: finance
review:
  state: reviewed
  by: opus
  at: "2026-11-13T00:59:29.577Z"
  flags: []
generated:
  at: "2026-11-29T00:16:19.301Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 9d4babe20d2caeb8b7a54401a44c03ab7ad8fd24
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/13414
    title: "microsoft/BCApps#13414: [Main]Payment Discount with Prices Incl. VAT provides unexpected results in the Spanish version"
    date: "2026-11-12"
    commit: 9d4babe20d2caeb8b7a54401a44c03ab7ad8fd24
    t: null
    quote: Payment discounts are not correctly reflected in sales and purchase totals and statistics when the VAT base discount percentage and EC amount are zero.
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/across-prices-and-discounts
      title: Set up prices and discounts
      label: possibly related
      why: Documents prices and discounts setup including VAT handling in purchase calculations.
      by: model
number: 13414
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/13414
kind: pr
base_branch: main
major: "30"
merged_at: "2026-11-12T11:43:00Z"
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:
  - 657151
systems:
  - finance
  - purchasing
quote: Payment discounts are not correctly reflected in sales and purchase totals and statistics when the VAT base discount percentage and EC amount are zero.
joined_against:
  major: "30"
  commit: d2abc1d2ceae394331716c8183ef60e1534c2ce0
---

# #13414 [Main]Payment Discount with Prices Incl. VAT provides unexpected results in the Spanish version

> In the Spanish version, when Prices Including VAT is on, the VAT base recalculation now subtracts the payment discount amount. Payment discounts are now reflected in sales and purchase totals and statistics. VAT-exclusive calculations are unchanged.

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

## What changed

- Fixes payment discount calculations when Prices Including VAT setting is enabled
- Corrects VAT base recalculation by subtracting payment discount amount
- Issue only affected Spanish localization with specific VAT settings (zero base discount and EC amount)
- Adds test coverage for payment discount scenarios with VAT-inclusive pricing
- Does not affect VAT-exclusive calculations
- 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#657151
- Labels: Team: Finance
- Systems: finance, purchasing
- From the description: "Payment discounts are not correctly reflected in sales and purchase totals and statistics when the VAT base discount percentage and EC amount are zero."

## 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"
- [Set up prices and discounts](https://learn.microsoft.com/dynamics365/business-central/across-prices-and-discounts) — possibly related: Documents prices and discounts setup including VAT handling in purchase calculations. (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).
