Accounts Receivable Rule
Set up the Accounts Receivable rule with these options:
Select the percent option as the method for determining tolerance.
Select the Tax on Gross Including Discount option.
Select the Discount on Gross Including Tax option.
Select the Sales Order Taxes at Order Level option.