0. Introductions
when the document currency and the local currency are different , we need to convert the foreign amount to the local amount. We usually use these funcitons
· READ_EXCHANGE_RATE
· CONVERT_TO_LOCAL_CURRENCY or CONVERT_TO_LOCAL_CURRENCY_N
Anyway, when we call these functions. We have something to attention.
1 If there is no exchange rate entried in the date we input. funciton will find the latest exchange rate according the import conditions. So these function can not deem is the exchange date existed in the input date
2 Before calculate the exchange rate. The foreign amount has already been calculated with its currency factor.
Ex: we found the amount “JPY 100.00” from database. In actually, the real amount is JPY 10,000. because the currency factor of JPY is 100.
3 hese functions will export 2 factors with currencu unit
These 2 factors is different from the factor with currency.
If we set the exchange ratio(from) and ratio(to) in the SPRO. Like this: 100 JPY to 1 USD. It means the value of exchange rate is using 100 jpy to change 1 usd.
EX: if we set 100 * JPY = 0.7795 USD * 1 … 1 JPY is 0.007795 for 1 usd.
So, we calculate the foreign amount only using exchange rate. Maybe is not the right result we want.
The right fomula is :
foreign amount * currency factor (foreign) * ( exchange rate / currency unit factor (foreign) *
currency unit factor (local)) / currency factor (local) = local amount
ps. The return LOCAL_AMOUNT when called the CONVERT_TO_LOCAL_CURRENCY. Also need to calculate with the factor of currency units. Local amount = local amount / foreign factor * local factor
外币金额转换方法
本文介绍了在外币与本地货币不一致的情况下,如何使用特定函数进行外币金额转换的方法。主要涉及的功能包括读取汇率和将外币金额转换为本地货币金额。文章特别注意了输入日期不存在汇率时的处理方式、外币金额的实际计算方式以及转换过程中单位因素的影响。
3906

被折叠的 条评论
为什么被折叠?



