added relation for saledetail,purchase detail with batch id and fixed the saledetail view