mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-21 02:04:26 +08:00
fix final rate calculation for the National Bank of Kazakhstan (#565)
This commit is contained in:
@@ -116,7 +116,7 @@ func (e *NationalBankOfKazakhstanExchangeRate) ToLatestExchangeRate(c core.Conte
|
||||
return nil
|
||||
}
|
||||
|
||||
finalRate := rate / unit
|
||||
finalRate := unit / rate
|
||||
if math.IsInf(finalRate, 0) {
|
||||
log.Warnf(c, "[national_bank_of_kazakhstan_datasource.ToLatestExchangeRate] final exchange rate calculation failed, currency is %s, unit is %s, rate is %s", e.Currency, e.Unit, e.Rate)
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user