How to apply TDS on the net amount of the invoice?

TCS is applied only to the total amount. If you need to apply tax on the net amount, you can use the TDS section, which applies at 0.1% under Section 194Q for the purchase of goods.