I have problems with taxes too. I change code as above but it doesn't fix my problem.
Products price is with tax and discount should be show with tax. I asked advice for my problem from http://high-quality-php-coding.com/ but they only said that i have to adjust $order->info['total']. I didn't know what I have to do but now I am almost solved this problem. I fix ot_tax.php file:
Find:
if ($value > 0) {
Add below:
$step1 = $order->info['subtotal'] - $value;
$step2 = $order->info['subtotal'] / $step1;
$step3 = $order->info['total'] - ($order->info['total'] / $step2);
Find:
$this->output[] = array('title' => $key . ':',
'text' => $currencies->format($value, true, $order->info['currency'], $order->info['currency_value']),
'value' => $value);
Replace with:
$this->output[] = array('title' => $key . ':',
// 'text' => $currencies->format($value, true, $order->info['currency'], $order->info['currency_value']),
// 'value' => $value);
'text' => $currencies->format($step3, true, $order->info['currency'], $order->info['currency_value']),
'value' => $step3);
Everything works fine if total is over free shipping limit. If total is under then comes shipping fee. Fee includes tax also and now problem is that this tax got discount too.
How I can exlude tax of shipping from this?