Spanish retailer Eroski has posted a reduced half-year loss despite a drop in sales.