diff --git a/app/Models/Expense.php b/app/Models/Expense.php index d5ad0e0405..5348ee530f 100644 --- a/app/Models/Expense.php +++ b/app/Models/Expense.php @@ -142,7 +142,7 @@ class Expense extends EntityModel */ public function isExchanged() { - return $this->invoice_currency_id != $this->expense_currency_id; + return $this->invoice_currency_id != $this->expense_currency_id || $this->exchange_rate != 1; } /** diff --git a/resources/views/expenses/edit.blade.php b/resources/views/expenses/edit.blade.php index a555ed4c09..8629de91b2 100644 --- a/resources/views/expenses/edit.blade.php +++ b/resources/views/expenses/edit.blade.php @@ -353,7 +353,7 @@ self.amount = ko.observable(); self.exchange_rate = ko.observable(1); self.should_be_invoiced = ko.observable(); - self.convert_currency = ko.observable(false); + self.convert_currency = ko.observable({{ ($expense && $expense->isExchanged()) ? 'true' : 'false' }}); self.apply_taxes = ko.observable({{ ($expense && ($expense->tax_name1 || $expense->tax_name2)) ? 'true' : 'false' }}); self.mapping = {