Index: modules/ecommerce/address/address.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/ecommerce/address/address.module,v
retrieving revision 1.16.2.4
diff -u -r1.16.2.4 address.module
--- modules/ecommerce/address/address.module	5 Nov 2005 07:32:05 -0000	1.16.2.4
+++ modules/ecommerce/address/address.module	11 Nov 2005 11:35:52 -0000
@@ -62,10 +62,10 @@
       $output .= theme('address_checkout_form', $txn);
       $output .= form_submit(t('Continue'));
       return $output;
-      
+
     case 'validate' :
       if ($txn->shippable && !$txn->shipping_address) {
-        form_set_error('shipping_address', t('You need to select a shipping address.'));        
+        form_set_error('shipping_address', t('You need to select a shipping address.'));
       }
       if (!$txn->billing_address) {
         form_set_error('billing_address', t('You need to select a billing address.'));
@@ -117,14 +117,12 @@
         $shipping_form = form_select(t('Shipping to'), 'shipping_address', $txn->shipping_address, $options, t('Please choose where you would like the items to be delivered. You can also %add_address.', array('%add_address' => l(t('add an address'), "user/$user->uid/address/add"))));
       }
       $billing_form = form_select(t('Billing to'), 'billing_address', $txn->billing_address, $options, t('Please choose where you would like the invoice to be sent. You can also %add_address.', array('%add_address' => l(t('add an address'), "user/$user->uid/address/add"))));
-
-      $output .= $shipping_form . $billing_form;
     }
   }
   else {
 
     /* Don't use the addressbook if the user can buy anonymously */
-    if ($shippable) {
+    if ($txn->shippable) {
       $shipping_form = store_transaction_addresses_form($edit, 'shipping');
       $billing_form = store_transaction_addresses_form($edit, 'billing');
     }
@@ -134,6 +132,8 @@
     $output .= form_textfield(t('E-mail address'), 'mail', $edit['mail'], 30, 64, t('Please double-check to make sure you email address is correct.'));
   }
 
+  $output .= $shipping_form . $billing_form;
+
   return $output;
 }
 
