@Fia ***
you need a copy of the data page of your passport, the last entry/exit stamp on it, the PDF print out of the DTV and your new passport,
Just staple the data page and last entry/exit stamp copy to the DTV and you're good to enter exit on the new passport no issues
IF you are already IN thailand on an entry stamp, then get a new passport, you take BOTH passports to the airport when you go to leave, they will stamp you out on the new one and make a note you entered on the old one, then you're good