OK. Try replacing process() in ot_quantity_discount.php with this:
Code:
function process() {
global $db, $order, $currencies;
$od_amount = $this->calculate_deductions();
if ($od_amount['total'] > 0) {
$show_amt = $od_amount['total'];
reset($order->info['tax_groups']);
while (list($key, $value) = each($order->info['tax_groups'])) {
$tax_rate = zen_get_tax_rate_from_desc($key);
if ($od_amount[$key]) {
$order->info['tax_groups'][$key] -= $od_amount[$key];
if (DISPLAY_PRICE_WITH_TAX == 'true') {
$show_amt += $od_amount[$key];
$tax_deduct = $od_amount[$key] - ($od_amount[$key] * $tax_rate/100);
$order->info['total'] -= $tax_deduct;
} else {
$order->info['total'] -= $od_amount[$key];
}
}
}
$order->info['total'] = $order->info['total'] - $show_amt;
$this->title = '<a href="javascript:alert(\'' . $this->explanation . '\');">' . $this->title . '</a>';
$this->output[] = array('title' => $this->title . ':',
'text' => '-' . $currencies->format($show_amt, true, $order->info['currency'], $order->info['currency_value']),
'value' => $od_amount['total']);
}
}
Bookmarks