1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-12 14:12:44 +01:00

Fix for expense client

This commit is contained in:
Hillel Coren 2017-03-13 11:15:05 +02:00
parent de22178ac7
commit 4045b529aa

View File

@ -103,7 +103,7 @@
->fromQuery($currencies, 'name', 'id') !!}
</span>
<span style="display:none;" data-bind="visible: client_id">
{!! Former::plaintext('test')
{!! Former::plaintext('')
->value('<span data-bind="html: invoiceCurrencyName"></span>')
->style('min-height:46px')
->label(trans('texts.invoice_currency')) !!}
@ -406,11 +406,6 @@
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.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 = {
'documents': {
create: function(options) {
@ -423,6 +418,11 @@
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({
read: function () {
return roundToTwo(self.amount() * self.exchange_rate()).toFixed(2);