Codeunit 12 - GetCurrencyExchRate() function...

Zac_RyonZac_Ryon Member Posts: 6
Howdy!

Anyone have any idea why, in codeunit 12, GetCurrencyExchRate() function, the code looks to the previous day when setting the exchange rate date used for calculating the Additional Reporting Currency?
...
  NewCurrencyDate := GenJnlLine."Posting Date";
  IF GenJnlLine."Reversing Entry" THEN
    NewCurrencyDate := NewCurrencyDate - 1;
...

This seems to be in version 5.0 and version 4.0. I don't have any older databases.

- Zac

Answers

  • DaveTDaveT Member Posts: 1,039
    Hi Zac,

    IF GenJnlLine."Reversing Entry" THEN
    


    This is for reversing journals only. Reversing journal post a reversing entry on the previous day.
    Dave Treanor

    Dynamics Nav Add-ons
    http://www.simplydynamics.ie/Addons.html
  • Zac_RyonZac_Ryon Member Posts: 6
    Ahhh. Reversing entries crossed my mind, but I guess I didn't think it through completely.

    That code is applicable to the second transaction line that gets generated by the system. So if I post a reversing journal entry for November 30, the system will create a second line for December 1, but it should use the exchange rate in effect for the previous day.

    That makes sense. Thanks for pointing me in the right direction.

    - Zac
  • DaveTDaveT Member Posts: 1,039
    Hi Zac,

    Glad to help :mrgreen: - can you edit the first post and change the attribute to solved

    Thanks.
    Dave Treanor

    Dynamics Nav Add-ons
    http://www.simplydynamics.ie/Addons.html
Sign In or Register to comment.