---
id: change/bcapps/14061
type: change
title: "#14061 [MAIN] Fix TDS calculation on multi-line purchase invoices (Bug 659187)"
summary: Codeunit 18694 and TDS use-case configuration fixed to correctly calculate tax-deducted-at-source on multi-line purchase invoices by retaining untaxed amounts from earlier lines when the annual threshold is reached.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit tds tax configuration
system: finance
review:
  state: reviewed
  by: opus
  at: "2026-11-16T00:58:29.170Z"
  flags: []
generated:
  at: "2026-11-30T13:33:07.232Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 15e83105f79fc86e3c5793c2bfd4bce08b1d36ad
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/14061
    title: "microsoft/BCApps#14061: [MAIN] Fix TDS calculation on multi-line purchase invoices (Bug 659187)"
    date: "2026-11-15"
    commit: 15e83105f79fc86e3c5793c2bfd4bce08b1d36ad
    t: null
    quote: Retain earlier untaxed amounts when the annual threshold is reached, while excluding amounts already taxed under the per-contract rule.
links:
  learn: []
  objects:
    - object/codeunit/18694-in
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
  related:
    - to: https://learn.microsoft.com/dynamics365/business-central/LocalFunctionality/India/TDS-Transactions
      title: TDS Calculation on Purchase and Payment Transactions
      label: possibly related
      why: Documents TDS calculation on purchase transactions in India localization.
      by: model
number: 14061
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/14061
kind: pr
base_branch: main
major: "30"
merged_at: "2026-11-15T14:19:56Z"
author: v-ajaztabrez
author_type: User
community_contribution: false
labels:
  - "Team: Finance"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 2
  additions: 45
  deletions: 11
  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:
  - 659187
systems:
  - finance
quote: Retain earlier untaxed amounts when the annual threshold is reached, while excluding amounts already taxed under the per-contract rule.
joined_against:
  major: "30"
  commit: d2abc1d2ceae394331716c8183ef60e1534c2ce0
---

# #14061 [MAIN] Fix TDS calculation on multi-line purchase invoices (Bug 659187)

> Codeunit 18694 and TDS use-case configuration fixed to correctly calculate tax-deducted-at-source on multi-line purchase invoices by retaining untaxed amounts from earlier lines when the annual threshold is reached.

[Pull request](https://github.com/microsoft/BCApps/pull/14061) · merged into `main` (BC30) on 2026-11-15 by v-ajaztabrez · 2 files (+45 -11), 1 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- TDS was calculated only on the later invoice line once the annual threshold was reached, leaving out earlier untaxed lines
- Earlier untaxed amounts are now kept when the threshold is reached
- Amounts already taxed under the per-contract rule stay excluded
- Line-level TDS bases are preserved, and the use-case configuration moves from version 35 to 36
- Applies to the Indian localization TDS app
- 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#659187
- Labels: Team: Finance
- Systems: finance
- From the description: "Retain earlier untaxed amounts when the annual threshold is reached, while excluding amounts already taxed under the per-contract rule."

## Possibly related

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

- [TDS Calculation on Purchase and Payment Transactions](https://learn.microsoft.com/dynamics365/business-central/LocalFunctionality/India/TDS-Transactions) — possibly related: Documents TDS calculation on purchase transactions in India localization. (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).
