=== modified file 'uc_order/uc_order.admin.inc'
--- uc_order/uc_order.admin.inc	2009-03-17 13:59:25 +0000
+++ uc_order/uc_order.admin.inc	2009-03-18 15:14:16 +0000
@@ -1001,7 +1001,8 @@ function uc_order_view($order, $view = '
   }
 
   if ($view == 'customer' && variable_get('uc_cust_view_order_invoices', TRUE)) {
-    drupal_add_js("function open_invoice() { window.open(Drupal.settings.basePath + '". (variable_get('clean_url', 0) ? '' : '?q=') ."user/". arg(1) ."/order/". arg(3) ."/invoice/print', '". t('Invoice') ."', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=600,height=480,left=50,top=50'); }", 'inline');
+    $url = url('user/' . arg(1) . '/order/' . arg(3) . '/invoice/print');
+    drupal_add_js("function open_invoice() { window.open('$url', '". t('Invoice') ."', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=600,height=480,left=50,top=50'); }", 'inline');
     $contents = '<a href="#" onclick="open_invoice();">'
                . uc_store_get_icon('file:print') .' '
                . t('Click to open a window with a printable invoice.') .'</a>';

