AnsweredAssumed Answered

Calculation: exchange rate

Question asked by LeszekŁuczkanin on Sep 21, 2016
Latest reply on Sep 21, 2016 by Johan Hedman

I have 3 tables:

 

EXCHANGE RATES

  Rate date

  EUR rate

  USD rate

  CAD rate

 

OPERATIONS

   Original price

   Price in PLN when added to stock (calc)

 

STOCK

   Original price

   Price in PLN when added to stock (calc)

   Price in PLN today (calc)

 

In OPERATIONS I add all incomes and outcomes in the specified currency (USD, EUR, etc.).

 

In EXCHANGES RATES I keep all rates from different days during the year. I have there also a value, that I set at the beginning of the year. So there will be at least 13 records for every year - one at the beginning (01/01/YYYY) and one at the end of each month.

 

In STOCK I have all my items sorted.

 

What I need is calculations as above.

   Price in PLN today (calc) - this takes original price and the latest (newest) exchange rate

   Price in PLN when added to stock (calc) - this takes exchange rate from day when added to stock.

 

Do I need a lookup (?) or EXCHANGE RATE_ID_FK will be enough? Value list to pick the value will be quite long after few years...

Outcomes