Darboux theory of integrability in Tn