---
id: change/bcapps/9865
type: change
title: "#9865 [Main] - 'Greater Than' Withholding Tax Calculation Rule is not app…"
summary: The withholding tax calculation now respects the configured calculation rule (Less than, Greater than, Equal to, etc.) instead of hard-coding comparisons, fixing incorrect withholding tax creation or suppression across different rule types.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit withholding tax jnl subscriber
  - codeunit withholding tax mgmt.
  - codeunit wthldg tax purch. subscribers
system: development
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:08:11.545Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 9d8d554cbf78f2f305c36121f6beece2cff1145a
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/9865
    title: "microsoft/BCApps#9865: [Main] - 'Greater Than' Withholding Tax Calculation Rule is not app…"
    date: "2026-08-19"
    commit: 9d8d554cbf78f2f305c36121f6beece2cff1145a
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/codeunit/6786
    - object/codeunit/6785
    - object/codeunit/6784
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 9865
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/9865
kind: pr
base_branch: main
major: "30"
merged_at: "2026-08-19T17:39:50Z"
author: ViditGupta1277
author_type: User
community_contribution: true
labels:
  - "ADO: Sync"
  - "AL: Apps (W1)"
  - From Fork
  - "Team: Finance"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 4
  additions: 274
  deletions: 7
  al: 3
apps:
  - WithholdingTax
objects_touched:
  - key: codeunit/6786
    page: codeunit/6786
    type: codeunit
    id: 6786
    name: Withholding Tax Jnl Subscriber
    app: WithholdingTax
    status: modified
  - key: codeunit/6785
    page: codeunit/6785
    type: codeunit
    id: 6785
    name: Withholding Tax Mgmt.
    app: WithholdingTax
    status: modified
  - key: codeunit/6784
    page: codeunit/6784
    type: codeunit
    id: 6784
    name: Wthldg Tax Purch. Subscribers
    app: WithholdingTax
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 642326
systems:
  - development
quote: null
joined_against:
  major: "30"
  commit: ecbc028c25dbe83b61313bc566e6c1d41184bb1c
---

# #9865 [Main] - 'Greater Than' Withholding Tax Calculation Rule is not app…

> The withholding tax calculation now respects the configured calculation rule (Less than, Greater than, Equal to, etc.) instead of hard-coding comparisons, fixing incorrect withholding tax creation or suppression across different rule types.

[Pull request](https://github.com/microsoft/BCApps/pull/9865) · merged into `main` (BC30) on 2026-08-19 by ViditGupta1277 (community contribution) · 4 files (+274 -7), 3 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Multiple threshold checks hard-coded 'Less than' comparisons regardless of the configured calculation rule setting
- Added reusable IsWithholdingTaxApplicable procedure in Withholding Tax Mgmt to make all rule-aware decisions consistent
- Two sites previously used signed amount comparisons; now all sites evaluate absolute amounts to match intended behavior
- Negative vendor invoice amounts are no longer unconditionally treated as below minimum
- Comprehensive test coverage for Greater than rule, negative amounts, and Less than rule across invoice and credit memo paths
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 6786 "Withholding Tax Jnl Subscriber"](../../objects/codeunit/6786.md), WithholdingTax: modified
- [Codeunit 6785 "Withholding Tax Mgmt."](../../objects/codeunit/6785.md), WithholdingTax: modified
- [Codeunit 6784 "Wthldg Tax Purch. Subscribers"](../../objects/codeunit/6784.md), WithholdingTax: modified

## Context

- Work items: AB#642326
- Labels: ADO: Sync, AL: Apps (W1), From Fork, Team: Finance
- Systems: development

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