TDS Is Not Getting Calculated On the Total Amount In Sales Invoice in erpnext

Here I Have Created A Tax Witholding category but its not calculating accurately in sales invoice

This is my sales invoice

This Is How The Calculations Should Be Done

How To Correct the calculations?

I’m also facing similar issue. Can someone provide the solution for how to manage TDS on a sales invoice?