Let's assume that outstanding against a Sales Invoice is 20,000. When client makes payment, they will only pay 19,600. Rest 400 needs to be booked under tax withhold account. You can manage this scenario as described below.
Create a Withhold Account in your Chart of Accounts.
To create Payment Entry, go to unpaid Sales Invoice and create click on Make Payment button.
Enter Payment Amount as 19,600.
Against Sales Invoice, allocate 20,000 (explained in GIF below).
You can notice that there is a difference of 400 in the Payment Amount and the Amount Allocated against Sales Invoice. You can book this difference account under Withhold Account.
Following same steps, you can also manage difference availed due to Currency Exchange Gain/Loss.