Reference number is now sent to FD and saved in the DB for when the entry is added.
Probable solution for adding generated reference number to transaction log. See TODO in modified file.