States on commutative basic algebras