update UI and finish orderhistory