1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-11 13:42:49 +01:00

Fix display of expense exchange rates

This commit is contained in:
Hillel Coren 2016-07-27 13:54:42 +03:00
parent 6cd1e2ebb3
commit 0f6555fb55
2 changed files with 2 additions and 2 deletions

View File

@ -142,7 +142,7 @@ class Expense extends EntityModel
*/ */
public function isExchanged() 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;
} }
/** /**

View File

@ -353,7 +353,7 @@
self.amount = ko.observable(); self.amount = ko.observable();
self.exchange_rate = ko.observable(1); self.exchange_rate = ko.observable(1);
self.should_be_invoiced = ko.observable(); 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.apply_taxes = ko.observable({{ ($expense && ($expense->tax_name1 || $expense->tax_name2)) ? 'true' : 'false' }});
self.mapping = { self.mapping = {