lots of changes

now we're using replace instead of insert if duplicate update since
that's shorter.
next is if you're trying to add a dtr and a tin is not in the database
it will end and not add anything or overwrite anything.
in adjustments tin is also shown.
made the constraints on delete cascade.