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

Add vat_number to client also

This commit is contained in:
Troels Liebe Bentsen 2014-10-15 01:31:15 +02:00
parent 792bf47419
commit 71d161e654
7 changed files with 16 additions and 4 deletions

View File

@ -199,6 +199,7 @@ class ClientController extends \BaseController {
} }
$client->name = trim(Input::get('name')); $client->name = trim(Input::get('name'));
$client->vat_number = trim(Input::get('vat_number'));
$client->work_phone = trim(Input::get('work_phone')); $client->work_phone = trim(Input::get('work_phone'));
$client->custom_value1 = trim(Input::get('custom_value1')); $client->custom_value1 = trim(Input::get('custom_value1'));
$client->custom_value2 = trim(Input::get('custom_value2')); $client->custom_value2 = trim(Input::get('custom_value2'));

View File

@ -95,6 +95,7 @@ class Invoice extends EntityModel
$this->client->setVisible([ $this->client->setVisible([
'name', 'name',
'vat_number',
'address1', 'address1',
'address2', 'address2',
'city', 'city',
@ -110,6 +111,7 @@ class Invoice extends EntityModel
$this->account->setVisible([ $this->account->setVisible([
'name', 'name',
'vat_number',
'address1', 'address1',
'address2', 'address2',
'city', 'city',

View File

@ -62,6 +62,9 @@ class ClientRepository
if (isset($data['name'])) { if (isset($data['name'])) {
$client->name = trim($data['name']); $client->name = trim($data['name']);
} }
if (isset($data['vat_number'])) {
$client->vat_number = trim($data['vat_number']);
}
if (isset($data['work_phone'])) { if (isset($data['work_phone'])) {
$client->work_phone = trim($data['work_phone']); $client->work_phone = trim($data['work_phone']);
} }

View File

@ -4,6 +4,7 @@
{{ Former::legend('Organization') }} {{ Former::legend('Organization') }}
{{ Former::text('name') }} {{ Former::text('name') }}
{{ Former::text('vat_number') }}
{{ Former::text('work_phone')->label('Phone') }} {{ Former::text('work_phone')->label('Phone') }}
{{ Former::textarea('notes') }} {{ Former::textarea('notes') }}

View File

@ -23,7 +23,8 @@
{{ Former::legend('organization') }} {{ Former::legend('organization') }}
{{ Former::text('name')->data_bind("attr { placeholder: placeholderName }") }} {{ Former::text('name')->data_bind("attr { placeholder: placeholderName }") }}
{{ Former::text('website') }} {{ Former::text('vat_number') }}
{{ Former::text('website') }}
{{ Former::text('work_phone') }} {{ Former::text('work_phone') }}
@if (Auth::user()->isPro()) @if (Auth::user()->isPro())

View File

@ -39,7 +39,8 @@
<div class="col-md-3"> <div class="col-md-3">
<h3>{{ trans('texts.details') }}</h3> <h3>{{ trans('texts.details') }}</h3>
<p>{{ $client->getAddress() }}</p> <p>{{ $client->getVatNumber() }}</p>
<p>{{ $client->getAddress() }}</p>
<p>{{ $client->getCustomFields() }}</p> <p>{{ $client->getCustomFields() }}</p>
<p>{{ $client->getPhone() }}</p> <p>{{ $client->getPhone() }}</p>
<p>{{ $client->getNotes() }}</p> <p>{{ $client->getNotes() }}</p>

View File

@ -340,6 +340,8 @@
{{ Former::legend('organization') }} {{ Former::legend('organization') }}
{{ Former::text('name')->data_bind("value: name, valueUpdate: 'afterkeydown', attr { placeholder: name.placeholder }") }} {{ Former::text('name')->data_bind("value: name, valueUpdate: 'afterkeydown', attr { placeholder: name.placeholder }") }}
{{ Former::text('vat_number')->data_bind("value: vat_number, valueUpdate: 'afterkeydown'") }}
{{ Former::text('website')->data_bind("value: website, valueUpdate: 'afterkeydown'") }} {{ Former::text('website')->data_bind("value: website, valueUpdate: 'afterkeydown'") }}
{{ Former::text('work_phone')->data_bind("value: work_phone, valueUpdate: 'afterkeydown'") }} {{ Former::text('work_phone')->data_bind("value: work_phone, valueUpdate: 'afterkeydown'") }}
@ -1210,6 +1212,7 @@
var self = this; var self = this;
self.public_id = ko.observable(0); self.public_id = ko.observable(0);
self.name = ko.observable(''); self.name = ko.observable('');
self.vat_number = ko.observable('');
self.work_phone = ko.observable(''); self.work_phone = ko.observable('');
self.custom_value1 = ko.observable(''); self.custom_value1 = ko.observable('');
self.custom_value2 = ko.observable(''); self.custom_value2 = ko.observable('');