In admin/invoice.php around line 39 find:
CODE
<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'oscommerce.gif', 'osCommerce', '204', '50'); ?></td>
Before </td> add:
CODE
<br>Order ID: <?php echo $oID;?> <br /> <?php echo "Customer ID: " . $order->customer['id']; ?>
In admin/includes/classes/order.php around line 27 find:
CODE
$order_query = tep_db_query("select customers_name, customers_company,...
Add 'customers_id, ' after select so it reads:
CODE
$order_query = tep_db_query("select customers_id, customers_name, customers_company,...
In the same file find line 48 or so and find:
CODE
$this->customer = array('name' => $order['customers_name'],
Paste this in that line's place:
CODE
$this->customer = array('id' => $order['customers_id'],
'name' => $order['customers_name'],
'name' => $order['customers_name'],
Upload both files and done.

