Make adjusthistory and restockhistory index pages worked

- add number to control items showed per page
- add functions in controllers to make index page work properly