--- ./original/civievent_discount/civievent_discount.admin.inc 
+++ ./revised/civievent_discount/civievent_discount.admin.inc 
@@ -318,23 +318,57 @@
  * Displays a list of codes and the events they are tied to.
  */
 function civievent_discount_list() {
-  $header = array(t('Code'), t('Discount'), t('Usage'), t('Event'), t('Price set'), t('Membership'), array('data' => t('Operations'), 'colspan' => 3));
+  $header = array(
+    array(
+      'data' => t('Code'),
+      'field' => 'code',
+    ),
+    array(
+      'data' => t('Description'),
+      'field' => 'description',
+    ),
+    array('data' => t('Organization')),
+    array('data' => t('Discount')),
+    array('data' => t('Usage')),
+    array(
+      'data' => t('Expiration'),
+      'field' => 'expiration',
+      'sort' => desc,
+    ),
+    array('data' => t('Event')),
+    array('data' => t('Price set')),
+    array('data' => t('Membership')),
+    array('data' => t('Operations'), 'colspan' => 3)
+  );
+
   $result = db_query(_sql_get_tracking_count_all());
   $tracker = array();
   while ($row = db_fetch_array($result, MYSQL_ASSOC)) {
     $tracker[$row['id']] = $row['count'];
   }
-  $result = db_query(_sql_get_codes());
+
+  //generate a paged query
+  $limit = 10;
+  //generate a tablesort
+  $tablesort =  tablesort_sql($header);
+  $result = pager_query(_sql_get_codes($tablesort), $limit);
+
   $codes = array();
   while ($row = db_fetch_array($result, MYSQL_ASSOC)) {
     if ($row['count_max'] == 0) { $row['count_max'] = t('Unlimited'); }
     if (in_array($row['cid'], array_keys($tracker))) {
       $row['count_use'] = l($row['count_use'], 'admin/settings/civievent_discount/usage/code/'. $row['cid']);
     }
+    // Match the org id against a contact record to get name
+    $org = _get_organization($row['organization']);
+
     $code = array(
-        'code' => $row['code'] ."<br />". $row['description'],
+        'code' => $row['code'],
+        'description' => $row['description'],
+        'organization' => l($org,'civicrm/contact/view', array('query' => 'cid='. $row['organization'] .'&reset=1')),
         'id' => $row['cid'],
         'count' => $row['count_use'] ." / ". $row['count_max'],
+        'expiration' => date('M j, Y', strtotime($row['expiration'])),
         'amount_type' => $row['amount_type'],
         'edit' => l('edit', 'admin/settings/civievent_discount/edit/'. $row['cid']),
         'delete' => l('delete', 'admin/settings/civievent_discount/delete/'. $row['cid']),
@@ -378,10 +412,15 @@
 
   $rows = array();
   foreach ($codes as $code) {
-    $rows[] = array($code['code'], $code['amount'], $code['count'], $code['title'], $code['priceset'], $code['membership'], $code['edit'], $code['delete'], $code['clone']);
-  }
-
-  if (!empty($rows)) { return theme('table', $header, $rows); }
+    $rows[] = array($code['code'], $code['description'], $code['organization'], $code['amount'], $code['count'], $code['expiration'], $code['title'], $code['priceset'], $code['membership'], $code['edit'], $code['delete'], $code['clone']);
+  }
+
+  if (!empty($rows)) {
+    $output = theme('table', $header, $rows);
+    $output .= theme('pager', NULL, $limit, 0);
+ 
+    return $output; 
+  }
   else {
     return t("No active discount codes. You need to ".
         l(t('add one'), 'admin/settings/civievent_discount/add') ." before you can assign it to an event.");
@@ -711,6 +750,16 @@
   }
 
   return $orgs;
+}
+
+/**
+ * Returns an organization.
+ */
+function _get_organization($org_id) {
+  if (!civicrm_initialize()) { return; }
+  $sql = "SELECT display_name AS name FROM civicrm_contact WHERE id = %1";
+  $params = array( 1 => array( $org_id, 'Integer' ) );
+  return CRM_Core_DAO::singleValueQuery( $sql, $params );
 }
 
 /**
@@ -871,8 +920,9 @@
   return "UPDATE {civievent_discount} SET description = '%s', amount = '%s', amount_type = '%s', events = '%s', pricesets = '%s', memberships = '%s', organization = %d, autodiscount = '%s', expiration = '%s', count_max = %d WHERE cid = %d";
 }
 
-function _sql_get_codes() {
-  return "SELECT cid, code, description, amount, amount_type, events, pricesets, memberships, autodiscount, expiration, count_use, count_max FROM {civievent_discount}";
+function _sql_get_codes($sort) {
+  return "SELECT cid, code, description, amount, amount_type, events, pricesets, memberships, 
+organization, autodiscount, expiration, count_use, count_max FROM {civievent_discount}" . $sort;
 }
 
 function _sql_get_codes_by_org() {
