API Forum

This forum is in read-only mode.
Please refer to our API support in case you have any questions.
We can be reached at api@e-conomic.com
e-conomic API developer forum

How to set exchange rate on a CashBookEntry

0
When I create a cashbook entry with a foreigh valuta the default exchange rate (100) is used. I would like to set exchange rate to a more correct value.

Exchange rate is not part og CashBookEntryData.
created Dec 9, 2016 by MichaelT
40% Accept Rate

edited Dec 9, 2016 by MichaelT
Q 5 A 0 C 1

1 Answer

0
 
Best answer
Hi Michael
 
For CashBook entries it is necessary to supply Amount and AmountDefaultCurrency (and Currency) since the two amounts are used to calculate the currency exchange rate for the entry.
 
AmountDefaultCurrency must be the value of the entry in the agreement base currency (BaseCurrency on the Company_GetData object).
 
Amount is the unit count of the selected currency.
 
Divided by each other these give the exchange rate.
 
E.g.
AmountDefaultCurrency = 66.45
Amount = 10
Currency = USD
Results in setting an exchange rate for USD of 664,5 since exchange rate of baseCurrency always is 100.
answered Dec 13, 2016 by olej
selected Dec 13, 2016 by MichaelT
Visma e-conomic A/S
...