What is the correct order of integration when summing up the potential of a charge distribution? The task is:

A thin rod extends along the z axis from z = −d to z = d. The rod
carries a charge uniformly distributed along its length with linear
charge density λ. By integrating over this charge distribution,
calculate the potential at a point P1 on the z axis with coordinates
(0, 0, 2d).

By summing up the potential from all the charge elements along the rod my solution is:
$$d\phi_{P_1} = k \frac{\lambda dz}{2d-z}$$
$$\phi_{P_1} = k\lambda \int^{-d}_{d}\frac{dz}{2d-z} = -k\lambda \left(\ln{\left| 2d - z \right|\Biggr|^{-d}_{d}}\right) =k\lambda \ln3$$
Now, I could also sum them up going into the opposite direction:
$$ d\phi_{P_1} = k \frac{\lambda dz}{2d-z}$$
$$\phi_{P_1} = k\lambda \int^{d}_{-d}\frac{dz}{2d-z} = -k\lambda \left(\ln{\left| 2d - z \right|\Biggr|^{d}_{-d}}\right) =-k\lambda \ln3 $$
which yields the potential with opposite sign. Physically though, I do not see any reason why the results should be different, as independent from how I count, the work done in bringing test charge from infinity to $P_1$ should be the same (as long as I did not do a mistake in the process :) ).
Am I missing something?
Thanks everyone for the answers.
 A: The sign of the differential $\text dz$ is determined by the limits. In in the integral $\int_a^bf(z)\,\text dz$, if $a<b$ then $\text dz>0$, and if $a>b$ then $\text dz<0$.
Therefore, if you are wanting to add up the potential due to each charge element $\lambda\,\text dz$, you want the integral to go from $-d$ to $d$. If the integral goes from $d$ to $-d$ then it is equivalent to adding up the potential due to a charge density of $-\lambda$ because of the change in sign of $\text dz$.
Also, check the sign of your final answer.

which yields the potential with opposite sign. Physically though, I do not see any reason why the results should be different, as independent from how I count,

Your intuition is correct. Physically we need the same answer. Hopefully the above shows how to think about the math to arrive at the same answer.
A: If u are doing it the other way around[for a point diametrically opposite to the first point] the initial integral should be
$d\phi_{P_1} = k \frac{\lambda dz}{2d-(-z)}
\phi_{P_1} = k\lambda \int^{d}_{-d}\frac{dz}{2d-(-z)} = k\lambda (ln{\left| 2d -(-z) \right|\Biggr|^{d}_{-d}}) = k\lambda \ln3$
Even if u are doing it for the same point the integral remains the same
Note- for ease I have considered the diagram in the xy plane
In Case 1 the position vector of the particle w.r.t the point is
$2d\hat{i}-x\hat{i}$

In Case 2 the position vector of the particle w.r.t the point is
$2d\hat{i}-(-x\hat{i})$

which is the same value.
Hope this helps!
A: This question could be asked about any integral and belongs on mathematics. The answer is that the step dz should also change sign because you are lowering the value of z during, as it were, the integration. This becomes quite clear if you write this down as a sum, before going to the continuum limit. In the reverse order you are subtracting terms instead of adding them.
