fix bugs in sales history