fixed bug where it was not inserting the oid into order_Details table when completing purchase. code tidy. In pending orders page, changed date_created to order_created and joined orders table to existing query to get this data.