Bug fix in orders.js
and improved inv_details.