fixing inventory when finishing purchase