Foreign currency conversion

kolaboykolaboy Member Posts: 446
Hi,
I am trying to convert FCY to LCY, but the code is taking the transaction date which is the posting date to pick the rate from the rate table. But one of the foreign current did not have much transaction and the report is taking the rate from the rate table that corresponds to the last transaction in the cust ledger entry for the foreign currency.
If i filter with range say 01/01/07..30/09/07, its suppose to take the range as at 30/09/07 from the rate table instead of taking the last posting date of the transaction to translate the amount.
Here is my conversion code:
Currency.InitRoundingPrecision;
IF "Currency Code" <> '' THEN
  GTPymentLCY :=
    ROUND(
      CurrExchRate.ExchangeAmtFCYToLCY(
        "Posting Date","Currency Code",
        GTPyment,CurrExchRate.ExchangeRate("Posting Date","Currency Code")),
      Currency."Amount Rounding Precision")
ELSE
  GTPymentLCY :=
    ROUND(GTPyment,Currency."Amount Rounding Precision");
How can i filter so that the translation can pick 30/09/07 rate in the rate table. that the end date to be use to match with the date on the exchange rate table and pick up the rate to translate the amount.
any idea please
thanks.
Sign In or Register to comment.