=== modified file 'payment/uc_payment/uc_payment.js'
--- payment/uc_payment/uc_payment.js	2007-10-17 18:54:57 +0000
+++ payment/uc_payment/uc_payment.js	2007-11-26 18:30:29 +0000
@@ -4,30 +4,39 @@
 var li_titles = {};
 var li_values = {};
 var li_weight = {};
+var li_calculated = {};
+var li_show = {};
 
 // Timestamps for last time line items or payment details were updated.
 var line_update = 0;
 var payment_update = 0;
 
+// Variable to track when updates are required to do the possibility of calculated items needing removed
+var requires_update = 0;
+
 /**
  * Sets a line item in the order total preview.
  */
-function set_line_item(key, title, value, weight) {
+function set_line_item(key, title, value, weight, calculated) {
   var do_update = false;
-
+  if(!calculated){
+    calculated = 0;
+  }
   // Check to see if we're actually changing anything and need to update.
   if (window.li_values[key] === undefined) {
     do_update = true;
   }
   else {
-    if (li_titles[key] != title || li_values[key] != value || li_weight[key] != weight) {
+    if (li_titles[key] != title || li_values[key] != value || li_weight[key] != weight || li_calculated[key] == 1) {
       do_update = true;
     }
   }
 
-  if (do_update) {
+  if (do_update || requires_update) {
     // Set the timestamp for this update.
     var this_update = new Date();
+    
+    requires_update = 0;
 
     // Set the global timestamp for the update.
     line_update = this_update.getTime();
@@ -36,21 +45,32 @@
     li_titles[key] = title;
     li_values[key] = value;
     li_weight[key] = weight;
+    li_calculated[key] = calculated;
+    // Default this to 0 to remove line items that require calculation but were not calculated
+    li_show[key] = 0;
 
     // Put all the existing line item data into a single array.
     var li_info = {};
     $.each(li_titles,
       function(a, b) {
-        li_info[a] = li_weight[a] + ';' + li_values[a] + ';' + li_titles[a];
+        // Add the line item to the array if it is not a calculated item, if it is the item currently being processed, or if it has previously been marked to be shown
+        if(li_calculated[a] != 1 || a == key || li_show[a]==1){
+          if(li_calculated[a] ==1){
+            requires_update = 1;
+          }
+          li_show[a] = 1;
+          li_info[a] = li_weight[a] + ';' + li_values[a] + ';' + li_titles[a];
+        }
       }
     );
-
     // Post the line item data to a URL and get it back formatted for display.
     $.post(Drupal.settings['base_path'] + 'cart/checkout/line_items', li_info,
       function(contents) {
         // Only display the changes if this was the last requested update.
         if (this_update.getTime() == line_update) {
           $('#line-items-div').empty().append(contents);
+          // Reset the show array since all line items have just been displayed
+          li_show = {};
         }
       }
     );
@@ -120,5 +140,4 @@
     $('#edit-amount').attr('disabled', 'true').val('-');
     $('#edit-comment').attr('disabled', 'true').val('-');
   }
-}
-
+}
\ No newline at end of file

=== 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-26 18:15:44 +0000
@@ -52,7 +52,7 @@
     //if (taxes.constructor == Array){
       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);
+        set_line_item("tax_" + taxes[j].id, taxes[j].name, taxes[j].amount, tax_weight + taxes[j].weight / 10, 1);
       }
     //}
     }


