factored inventory_table into templatetag