mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Fix for expense client
This commit is contained in:
parent
cbcc299187
commit
462032f2fc
@ -386,11 +386,6 @@
|
|||||||
self.convert_currency = ko.observable({{ ($expense && $expense->isExchanged()) ? 'true' : '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.account_currency_id = ko.observable({{ $account->getCurrencyId() }});
|
|
||||||
self.client_id = ko.observable({{ $clientPublicId }});
|
|
||||||
self.vendor_id = ko.observable({{ $vendorPublicId }});
|
|
||||||
self.expense_category_id = ko.observable({{ $categoryPublicId }});
|
|
||||||
|
|
||||||
self.mapping = {
|
self.mapping = {
|
||||||
'documents': {
|
'documents': {
|
||||||
create: function(options) {
|
create: function(options) {
|
||||||
@ -403,6 +398,11 @@
|
|||||||
ko.mapping.fromJS(data, self.mapping, this);
|
ko.mapping.fromJS(data, self.mapping, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
self.account_currency_id = ko.observable({{ $account->getCurrencyId() }});
|
||||||
|
self.client_id = ko.observable({{ $clientPublicId }});
|
||||||
|
self.vendor_id = ko.observable({{ $vendorPublicId }});
|
||||||
|
self.expense_category_id = ko.observable({{ $categoryPublicId }});
|
||||||
|
|
||||||
self.convertedAmount = ko.computed({
|
self.convertedAmount = ko.computed({
|
||||||
read: function () {
|
read: function () {
|
||||||
return roundToTwo(self.amount() * self.exchange_rate()).toFixed(2);
|
return roundToTwo(self.amount() * self.exchange_rate()).toFixed(2);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user