Fix display of expense exchange rates
This commit is contained in:
parent
05a92fea8d
commit
d44213bce9
2 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue