--- uc_order.module~ 2007-10-24 16:53:29.000000000 -0500 +++ uc_order.module 2007-10-24 16:54:44.000000000 -0500 @@ -1105,6 +1105,7 @@ function uc_order_admin($sql = NULL, $se array('data' => t('Actions')), array('data' => t('Order ID')), array('data' => t('Customer')), + array('data' => t('Company')), array('data' => t('Total'), 'align' => 'center'), array('data' => t('Purchase Date'), 'align' => 'center'), array('data' => t('Status')), @@ -1125,7 +1126,7 @@ function uc_order_admin($sql = NULL, $se $status = 'o.order_status IN '. uc_order_status_list('general', TRUE); } } - $sql = 'SELECT o.order_id, o.uid, o.billing_first_name, o.billing_last_name, o.order_total, ' + $sql = 'SELECT o.order_id, o.uid, o.billing_first_name, o.billing_last_name, o.billing_company, o.order_total, ' .'o.order_status, o.created, os.title FROM {uc_orders} o LEFT JOIN {uc_order_statuses} os ' .'ON o.order_status = os.order_status_id WHERE '. $status . (($sort == NULL) ? ' ORDER BY o.created DESC' : $sort); } @@ -1140,11 +1141,14 @@ function uc_order_admin($sql = NULL, $se $result = pager_query($sql, variable_get('uc_order_number_displayed', 30)); while ($order = db_fetch_object($result)) { + $order_company = ''; if ($address == 'shipping') { $order_name = $order->delivery_first_name .' '. $order->delivery_last_name; + $order_company = $order->delivery_company; } else { $order_name = $order->billing_first_name .' '. $order->billing_last_name; + $order_company = $order->billing_company; } if (trim($order_name) == '') { if ($order->uid !== 0) { @@ -1162,6 +1166,7 @@ function uc_order_admin($sql = NULL, $se array('data' => _uc_order_admin_icons($order), 'nowrap' => 'nowrap'), array('data' => $order->order_id), array('data' => $order_name, 'class' => 'nowrap'), + array('data' => $order_company, 'class' => 'nowrap'), array('data' => uc_currency_format($order->order_total, TRUE), 'align' => 'right', 'nowrap' => 'true'), array('data' => date('m/d/Y', $order->created), 'align' => 'center'), array('data' => $order->title)),