---
id: change/bcapps/9552
type: change
title: "#9552 [Main]-Issue in TDS calculation during payment application against invoices"
summary: Fixed TDS calculation during payment application against invoices by scaling the applied amount to match the payment's TDS base, ensuring correct tax base computation when GST and payment amounts differ.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit tds tax configuration
system: finance
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:12:20.334Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: e0f5e4f3d6d0fee87bc4ef9cee40cc3fb18d66ea
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/9552
    title: "microsoft/BCApps#9552: [Main]-Issue in TDS calculation during payment application against invoices"
    date: "2026-07-17"
    commit: e0f5e4f3d6d0fee87bc4ef9cee40cc3fb18d66ea
    t: null
    quote: Applied amount ko payment ke TDS base terms me scale kiya, sirf apply hone wale payment se scoped
links:
  learn: []
  objects:
    - object/codeunit/18694-in
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 9552
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/9552
kind: pr
base_branch: main
major: "30"
merged_at: "2026-07-17T13:18:49Z"
author: v-ajaztabrez
author_type: User
community_contribution: true
labels:
  - "ADO: Sync"
  - From Fork
  - "Team: Finance"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 2
  additions: 166
  deletions: 100
  al: 1
apps:
  - INTDS
objects_touched:
  - key: codeunit/18694
    page: codeunit/18694-in
    type: codeunit
    id: 18694
    name: TDS Tax Configuration
    app: INTDS
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 642476
systems:
  - finance
quote: Applied amount ko payment ke TDS base terms me scale kiya, sirf apply hone wale payment se scoped
joined_against:
  major: "30"
  commit: a4406cfa9e57437fedc49c53c327a199a854491e
---

# #9552 [Main]-Issue in TDS calculation during payment application against invoices

> Fixed TDS calculation during payment application against invoices by scaling the applied amount to match the payment's TDS base, ensuring correct tax base computation when GST and payment amounts differ.

[Pull request](https://github.com/microsoft/BCApps/pull/9552) · merged into `main` (BC30) on 2026-07-17 by v-ajaztabrez (community contribution) · 2 files (+166 -100), 1 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Applied amount on TDS advance payments is now scaled to the payment's TDS base instead of using the gross, GST-inclusive Amount to Apply
- Formula: Amount to Apply × (Payment TDS Base ÷ Payment Amount), both taken from the payment's own TDS Entry
- Scaling only applies when the payment's TDS base differs from its amount
- Consumed original invoice amount is now scoped to the applied payment, which fixes wrong results on a second payment/invoice pair
- Use case version bumped to 36 (JSON and registry) so it gets reimported
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 18694 "TDS Tax Configuration"](../../objects/codeunit/18694-in.md), INTDS (IN layer): modified

## Context

- Work items: AB#642476
- Labels: ADO: Sync, From Fork, Team: Finance
- Systems: finance
- From the description: "Applied amount ko payment ke TDS base terms me scale kiya, sirf apply hone wale payment se scoped"

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