The flux entering an enclosed surface is taken as negative and the flux leaving the surface is taken as positive, by convention. Therefore the net flux leaving the enclosed surface =φ2−φ1 ∴ the change enclosed in the surface by Gauss's law is q=ε0(φ2−φ1)