--- uc_taxes.module	2010-04-08 11:09:52.000000000 -0400
+++ uc_taxes.module	2010-04-08 16:03:58.000000000 -0400
@@ -244,19 +244,30 @@ function uc_line_item_tax_subtotal($op, 
   $amount = 0;
   if (is_array($order->products)) {
     foreach ($order->products as $item) {
-      $amount += $item->price * $item->qty;
+      $price_info = array(
+        'price' => $item->price,
+        'qty' => $item->qty,
+      );
+      $context = array(
+        'test' => TRUE,
+        'revision' => 'altered',
+        'order' => $order,
+        'account' => user_load($order->uid),
+        'subject' => array(
+          'node' => $item, 
+        ),
+      );
+      $amount += uc_price($price_info, $context);
     }
   }
+
   if (is_array($order->line_items)) {
     foreach ($order->line_items as $key => $line_item) {
-      if ($line_item['type'] == 'subtotal') {
-        continue;
-      }
       if (substr($line_item['type'], 0, 3) != 'tax') {
         $amount += $line_item['amount'];
         $different = TRUE;
       }
-      else {
+      elseif ($line_item['type'] != 'subtotal') {
         $has_taxes = TRUE;
       }
     }
@@ -484,7 +495,7 @@ function uc_taxes_javascript() {
 /**
  * Calculate tax for a single product.
  */
-function uc_taxes_apply_item_tax($item, $tax) {
+function uc_taxes_apply_item_tax($item, $order, $tax) {
   $node = node_load($item->nid);
 
   // Special handling for manually added "Blank line" products.
@@ -497,7 +508,21 @@ function uc_taxes_apply_item_tax($item, 
   // Tax products if they are of a taxed type and if it is shippable if
   // the tax only applies to shippable products.
   if (in_array($node->type, $tax->taxed_product_types) && ($tax->shippable == 0 || $node->shippable == 1)) {
-    return $item->price * $item->qty;
+    $price_info = array(
+      'price' => $item->price,
+      'qty' => $item->qty,
+    );
+    $context = array(
+      'type' => 'order_product',
+      'revision' => 'altered',
+      'subject' => array(
+        'order' => $order,
+        'product' => $item,
+        'node' => $node,
+      ),
+    );
+
+    return uc_price($price_info, $context);
   }
 }
 
@@ -516,7 +541,7 @@ function uc_taxes_apply_tax($order, $tax
   $taxable_amount = 0;
   if (is_array($order->products)) {
     foreach ($order->products as $item) {
-      $taxable_amount += uc_taxes_apply_item_tax($item, $tax);
+      $taxable_amount += uc_taxes_apply_item_tax($item, $order, $tax);
     }
   }
   $taxed_line_items = $tax->taxed_line_items;
