当前位置: 代码迷 >> 综合 >> D365 汇率计算方法
  详细解决方案

D365 汇率计算方法

热度:19   发布时间:2023-10-25 09:18:03.0
1.
rate=ExchangeRateHelper::newExchangeDate(Ledger::current(),CurrencyCode,date).getExchangeRate1()/100;

 直接换算金额

2.
public static real currencyExcanger(real _amtCur, CurrencyCode _fromCurrencyCode, CurrencyCode _toCurrencyCode,date _date = systemDateGet()){real amtCur =  any2Real(_amtCur);if(_fromCurrencyCode && _toCurrencyCode && _fromCurrencyCode != _toCurrencyCode){CurrencyExchangeHelper currencyExchangeHelper;currencyExchangeHelper = CurrencyExchangeHelper::newExchangeDate(Ledger::current(), _date);amtCur = any2Real(currencyExchangeHelper.calculateCurrencyToCurrency(_fromCurrencyCode,_toCurrencyCode,amtCur,true));}return any2Real(amtCur);
}3.
CurrencyExchangeHelper::mstAmount(this.FeeAmt, this.FeeCurrencyCode, this.DocumentDate)