[V11] [Purchase Invoice] TDS calculation Possible Bug

I feel the following line is introducing a bug in calculation of TDS for purhcase invoice.
Tax withholding_category.py

  1. TDS rate is 2.8% and Single Transaction = 5000 & Cumulative = 10000. (TAX CATEGORY VALUE).
  2. Apply that category to a Supplier
  3. Now create purchase invoice (Invoice amount = 5400 and its calculation TDS rate , that correct).
  4. Now create another invoice of amount 3000 and save.
    After saving , in the3000 invoice its also deducts TDS from the net amount.
    Expected result: should not apply TDS rate on 3000 invoice because TDS Single transaction is 5000 and the cumulative threshold has not been touched yet.

Was this intentional or is it a bug?

I Confirmed it with a CA I think it’s correct behavior. Pls delete/close this thread @Admin