The best advice I can give when migrating logic from one language to another is to ensure you understand the processes involved as ballardw has said.
I've been involved in such projects and found that you often encounter errors in the source systems, that if you just blindly copy you will repeat the same mistakes.
Also test the output in both systems to ensure that it is identical, or if it is not identical to be able to explain the differences, for example when correcting errors.