=== modified file 'uc_taxes/uc_taxes.info'
--- uc_taxes/uc_taxes.info	2007-07-03 15:29:31 +0000
+++ uc_taxes/uc_taxes.info	2007-11-26 14:42:19 +0000
@@ -1,6 +1,6 @@
 ; $Id$
 name = Taxes
 description = Define tax rates for customers' geographic locations and products sold.
-dependencies = uc_store
+dependencies = uc_store workflow_ng
 package = "Ubercart - core (optional)"
 

=== modified file 'uc_taxes/uc_taxes.js'
--- uc_taxes/uc_taxes.js	2007-10-24 18:59:07 +0000
+++ uc_taxes/uc_taxes.js	2007-11-27 15:29:47 +0000
@@ -49,12 +49,21 @@
     data: 'order=' + order,
     dataType: "json",
     success: function(taxes){
-    //if (taxes.constructor == Array){
+      var key;
+      for (key in li_titles){
+        if (key.substr(0, 4) == 'tax_'){
+          delete li_titles[key];
+          delete li_values[key];
+          delete li_weight[key];
+        }
+      }
       var j;
       for (j in taxes){
         set_line_item("tax_" + taxes[j].id, taxes[j].name, taxes[j].amount, tax_weight + taxes[j].weight / 10);
       }
-    //}
+      if (j == undefined){
+        set_line_item("", "", 0.00, 0);
+      }
     }
   });
 }

=== modified file 'uc_taxes/uc_taxes.module'
--- uc_taxes/uc_taxes.module	2007-11-19 14:38:20 +0000
+++ uc_taxes/uc_taxes.module	2007-11-27 15:41:04 +0000
@@ -350,14 +350,16 @@
  * Calculate tax amounts for an order in the payment checkout pane.
  */
 function uc_taxes_javascript(){
+  drupal_set_header("Content-Type: text/javascript; charset=utf-8");
   $order = $_POST['order'];
   if ($order = unserialize(rawurldecode($order))){
     $taxes = uc_taxes_calculate($order);
+    drupal_set_message('<pre>'. print_r($taxes, true) .'</pre>');
     if (count($taxes)){
       print drupal_to_js((array)$taxes);
     }
     else{
-      print '[]';
+      print '{}';
     }
   }
   exit();


