Index: /branches/version-2_12-dev/data/class/helper/SC_Helper_Purchase.php
===================================================================
--- /branches/version-2_12-dev/data/class/helper/SC_Helper_Purchase.php	(revision 21628)
+++ /branches/version-2_12-dev/data/class/helper/SC_Helper_Purchase.php	(revision 21648)
@@ -315,10 +315,10 @@
     function clearShipmentItemTemp($shipping_id = null) {
         if (is_null($shipping_id)) {
+            foreach (array_keys($_SESSION['shipping']) as $key) {
+                $this->clearShipmentItemTemp($key);
+            }
+        } else {
             if (!isset($_SESSION['shipping'][$shipping_id])) return;
             if (!is_array($_SESSION['shipping'][$shipping_id])) return;
-            foreach (array_keys($_SESSION['shipping'][$shipping_id]) as $key) {
-                $this->clearShipmentItemTemp($key);
-            }
-        } else {
             unset($_SESSION['shipping'][$shipping_id]['shipment_item']);
         }
