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:
parent
6cd1e2ebb3
commit
0f6555fb55
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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 = {
|
||||||
|
Loading…
Reference in New Issue
Block a user