Fix for balance discrepancy when reversing invoice and applying note via API

Order To Cash: Customer Ledger Version 10.42

Earlier, when using an integration to reverse and apply invoices with credit memos on a different date then the original invoice, the system was creating a wrong journal transaction not using the correct date. This has now been fixed.