Hi,
you forgot to tell me the error message which you are facing.
By your description I would check if you have an open accounting period relating to the dates you are using. If this is the case, you can find a solution here in forum under:
https://osoe-project.nexedi.com/forum/Post-Transaction-to-General-Ledger-deO92AcOrH
I hope this will help.
Best Regards