mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-14 15:13:29 +01:00
Fix for expense client
This commit is contained in:
parent
de22178ac7
commit
4045b529aa
@ -103,7 +103,7 @@
|
|||||||
->fromQuery($currencies, 'name', 'id') !!}
|
->fromQuery($currencies, 'name', 'id') !!}
|
||||||
</span>
|
</span>
|
||||||
<span style="display:none;" data-bind="visible: client_id">
|
<span style="display:none;" data-bind="visible: client_id">
|
||||||
{!! Former::plaintext('test')
|
{!! Former::plaintext('')
|
||||||
->value('<span data-bind="html: invoiceCurrencyName"></span>')
|
->value('<span data-bind="html: invoiceCurrencyName"></span>')
|
||||||
->style('min-height:46px')
|
->style('min-height:46px')
|
||||||
->label(trans('texts.invoice_currency')) !!}
|
->label(trans('texts.invoice_currency')) !!}
|
||||||
@ -406,11 +406,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) {
|
||||||
@ -423,6 +418,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…
Reference in New Issue
Block a user