From section 9.7 "The Jacobi symbol" of Introduction to Analytic Number Theory by Tom M. Apostol
Definition If $P$ is a positive odd integer with prime factorization $$ P = \prod_{i=1}^r p_i^{a_i} $$ the Jacobi symbol $(n \mid P)$ is defined for all integers $n$ by the equation $$ (n \mid P) = \prod_{i=1}^r (n \mid p_i)^{a_i}, \tag{6} $$ where $(n \mid p_i)$ is the Legendre symbol. We also define $(n \mid 1) = 1$.
The possible values of $(n \mid P)$ are $ 1 $, $-1$, or $0$, with $(n \mid P) = 0 $ if and only if $(n, P) > 1.$
If the congruence $$ x^2 \equiv n \bmod{P}$$ has a solution then $(n | p_i) = 1$ for each prime $p_i$ in (6), and hence $(n \mid P) = 1$.
Is the last sentence true? It does not seem true to me. For example, take $n = 9$ and $P=15$, so we get the congruence $x^2 \equiv 9 \bmod {15} $. This congruence clearly has a solution $x = 3$. But the Legendre symbol $(9 \mid 3) = 0$, so it contradicts the claim that $(n \mid p_i) = 1$ for each prime $p_i$ in (6).
Is the book incorrect here or am I missing something?