Index: uc_vat.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/uc_vat/uc_vat.module,v
retrieving revision 1.38
diff -u -p -r1.38 uc_vat.module
--- uc_vat.module	1 Dec 2009 19:19:33 -0000	1.38
+++ uc_vat.module	4 Feb 2010 10:54:41 -0000
@@ -447,6 +447,10 @@ function uc_vat_order($op, $arg1, $arg2)
  * VAT price alterer callback function.
  */
 function uc_vat_price_handler_alter(&$price, &$context, &$options) {
+  if (isset($options['calculate_tax']) && !$options['calculate_tax']) {
+    return;
+  }
+ 
   if (uc_vat_exclude_vat()) {
     $tax_rates = array();
   }
@@ -619,9 +623,20 @@ function uc_vat_line_item_data_alter(&$i
  */
 function uc_vat_line_item_tax_subtotal($op, $order) {
   $amount = 0;
+  $context = array(
+    'type' => 'cart_item', // should be order_product?
+    'revision' => 'altered',
+  );
   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['subject']['cart_item'] = $item;
+      $context['subject']['node'] = node_load($item->nid);
+
+      $amount += uc_price($price_info, $context, array('calculate_tax' => FALSE));
     }
   }
   if (is_array($order->line_items)) {
