Quote Originally Posted by wolfderby View Post
If you'd like to remove "cancelled" orders from the sales report data (marked "cancelled" through a manually created order status, under admin > localization > order status > "insert")...

Go into your stats_sales_report.php file (in your admin folder) and around line 49 you'll find this line of code

Code:
    $orders_status = $db->Execute("select orders_status_id, orders_status_name from " . TABLE_ORDERS_STATUS . "
                                   where language_id = '" . (int)$_SESSION['languages_id'] . "'
                                   order by orders_status_id asc");
you'll want to change it to:
Code:
$orders_status = $db->Execute("SELECT orders_status_id, orders_status_name FROM " . TABLE_ORDERS_STATUS . "
                                   WHERE language_id = '" . (int)$_SESSION['languages_id'] . "' AND NOT (orders_status_id = 5)
                                   ORDER BY orders_status_id asc");
(note: my cancelled order status was the 5th possible status under order status, if your status has a different id number you'll have to change the orders_status_id to the appropriate number)

for other information regarding cancelled orders check here:
http://www.zen-cart.com/forum/showthread.php?t=151168
Did anyone ever actually figure out how to exclude a status from the reports? This just removes it from the dropdown, but it still shows the data on the report.