rearranging html layout and adding TOTAL row in items table