adding main item id column to detail item table