Topic: check overdue delivery date
at line 106 in sales_order_view.php ( function check_overdue) i think the appropriate line should be:
&& date1_greater_date2(Today(),sql2date($row['delivery_date']))
since this will only mark orders that did not got shipped before that date (requested date). This is specifically useful for company that manufacture or don't ship products same or next day.