mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 03:54:08 +00:00
Add exchange rate feature with multi-currency transactions and transfers support (#1099)
Co-authored-by: Pedro J. Aramburu <pedro@joakin.dev>
This commit is contained in:
committed by
GitHub
parent
8e81e967fc
commit
f699660479
@@ -55,7 +55,11 @@ class UI::Account::Chart < ApplicationComponent
|
||||
def converted_balance_money
|
||||
return nil unless foreign_currency?
|
||||
|
||||
account.balance_money.exchange_to(account.family.currency, fallback_rate: 1)
|
||||
begin
|
||||
account.balance_money.exchange_to(account.family.currency)
|
||||
rescue Money::ConversionError
|
||||
nil
|
||||
end
|
||||
end
|
||||
|
||||
def view
|
||||
|
||||
Reference in New Issue
Block a user