mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Merge branch 'master' of github.com:tlbdk/invoice-ninja
Conflicts: app/lang/en/texts.php
This commit is contained in:
commit
33bb86ee85
@ -818,7 +818,8 @@ class AccountController extends \BaseController {
|
||||
{
|
||||
$account = Auth::user()->account;
|
||||
$account->name = trim(Input::get('name'));
|
||||
$account->vat_number = trim(Input::get('vat_number'));
|
||||
$account->id_number = trim(Input::get('id_number'));
|
||||
$account->vat_number = trim(Input::get('vat_number'));
|
||||
$account->work_email = trim(Input::get('work_email'));
|
||||
$account->work_phone = trim(Input::get('work_phone'));
|
||||
$account->address1 = trim(Input::get('address1'));
|
||||
|
@ -199,7 +199,8 @@ class ClientController extends \BaseController {
|
||||
}
|
||||
|
||||
$client->name = trim(Input::get('name'));
|
||||
$client->vat_number = trim(Input::get('vat_number'));
|
||||
$client->id_number = trim(Input::get('id_number'));
|
||||
$client->vat_number = trim(Input::get('vat_number'));
|
||||
$client->work_phone = trim(Input::get('work_phone'));
|
||||
$client->custom_value1 = trim(Input::get('custom_value1'));
|
||||
$client->custom_value2 = trim(Input::get('custom_value2'));
|
||||
|
@ -17,7 +17,7 @@ class AddCompanyVatNumber extends Migration {
|
||||
$table->string('vat_number')->nullable();
|
||||
});
|
||||
|
||||
Schema::table('clients', function($table)
|
||||
Schema::table('clients', function($table)
|
||||
{
|
||||
$table->string('vat_number')->nullable();
|
||||
});
|
||||
@ -34,7 +34,7 @@ class AddCompanyVatNumber extends Migration {
|
||||
{
|
||||
$table->dropColumn('vat_number');
|
||||
});
|
||||
Schema::table('clients', function($table)
|
||||
Schema::table('clients', function($table)
|
||||
{
|
||||
$table->dropColumn('vat_number');
|
||||
});
|
||||
|
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddCompanyIdNumber extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('accounts', function($table)
|
||||
{
|
||||
$table->string('id_number')->nullable();
|
||||
});
|
||||
|
||||
Schema::table('clients', function($table)
|
||||
{
|
||||
$table->string('id_number')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('accounts', function($table)
|
||||
{
|
||||
$table->dropColumn('id_number');
|
||||
});
|
||||
Schema::table('clients', function($table)
|
||||
{
|
||||
$table->dropColumn('id_number');
|
||||
});
|
||||
}
|
||||
|
||||
}
|
@ -5,7 +5,8 @@ return array(
|
||||
// client
|
||||
'organization' => 'Organisation',
|
||||
'name' => 'Navn',
|
||||
'vat_number' => 'CVR nummer',
|
||||
'id_number' => 'SE/CVR nummer',
|
||||
'vat_number' => 'SE/CVR nummer',
|
||||
'website' => 'Webside',
|
||||
'work_phone' => 'Telefon',
|
||||
'address' => 'Adresse',
|
||||
|
@ -457,7 +457,10 @@ return array(
|
||||
'more_designs_self_host_text' => '',
|
||||
'buy' => 'Buy',
|
||||
'bought_designs' => 'Successfully added additional invoice designs',
|
||||
|
||||
'sent' => 'sent',
|
||||
|
||||
'id_number' => 'ID Number',
|
||||
'vat_number' => 'VAT Number',
|
||||
|
||||
'timesheets' => 'Timesheets',
|
||||
);
|
||||
|
@ -131,11 +131,23 @@ class Client extends EntityModel
|
||||
return $str;
|
||||
}
|
||||
|
||||
public function getVatNumber()
|
||||
public function getIdNumber()
|
||||
{
|
||||
$str = '';
|
||||
|
||||
if ($this->work_phone)
|
||||
if ($this->id_number)
|
||||
{
|
||||
$str .= '<i class="fa fa-vat-number" style="width: 20px"></i>' . $this->vat_number;
|
||||
}
|
||||
|
||||
return $str;
|
||||
}
|
||||
|
||||
public function getVatNumber()
|
||||
{
|
||||
$str = '';
|
||||
|
||||
if ($this->vat_number)
|
||||
{
|
||||
$str .= '<i class="fa fa-vat-number" style="width: 20px"></i>' . $this->vat_number;
|
||||
}
|
||||
|
@ -95,7 +95,8 @@ class Invoice extends EntityModel
|
||||
|
||||
$this->client->setVisible([
|
||||
'name',
|
||||
'vat_number',
|
||||
'id_number',
|
||||
'vat_number',
|
||||
'address1',
|
||||
'address2',
|
||||
'city',
|
||||
@ -111,7 +112,8 @@ class Invoice extends EntityModel
|
||||
|
||||
$this->account->setVisible([
|
||||
'name',
|
||||
'vat_number',
|
||||
'id_number',
|
||||
'vat_number',
|
||||
'address1',
|
||||
'address2',
|
||||
'city',
|
||||
|
@ -45,7 +45,7 @@ class AccountRepository
|
||||
|
||||
public function getSearchData()
|
||||
{
|
||||
$clients = \DB::table('clients')
|
||||
$clients = \DB::table('clients')
|
||||
->where('clients.deleted_at', '=', null)
|
||||
->where('clients.account_id', '=', \Auth::user()->account_id)
|
||||
->whereRaw("clients.name <> ''")
|
||||
|
@ -62,7 +62,10 @@ class ClientRepository
|
||||
if (isset($data['name'])) {
|
||||
$client->name = trim($data['name']);
|
||||
}
|
||||
if (isset($data['vat_number'])) {
|
||||
if (isset($data['id_number'])) {
|
||||
$client->id_number = trim($data['id_number']);
|
||||
}
|
||||
if (isset($data['vat_number'])) {
|
||||
$client->vat_number = trim($data['vat_number']);
|
||||
}
|
||||
if (isset($data['work_phone'])) {
|
||||
|
@ -29,7 +29,8 @@
|
||||
|
||||
{{ Former::legend('details') }}
|
||||
{{ Former::text('name') }}
|
||||
{{ Former::text('vat_number') }}
|
||||
{{ Former::text('id_number') }}
|
||||
{{ Former::text('vat_number') }}
|
||||
{{ Former::text('work_email') }}
|
||||
{{ Former::text('work_phone') }}
|
||||
{{ Former::file('logo')->max(2, 'MB')->accept('image')->inlineHelp(trans('texts.logo_help')) }}
|
||||
|
@ -4,7 +4,8 @@
|
||||
|
||||
{{ Former::legend('Organization') }}
|
||||
{{ Former::text('name') }}
|
||||
{{ Former::text('vat_number') }}
|
||||
{{ Former::text('id_number') }}
|
||||
{{ Former::text('vat_number') }}
|
||||
{{ Former::text('work_phone')->label('Phone') }}
|
||||
{{ Former::textarea('notes') }}
|
||||
|
||||
|
@ -23,8 +23,9 @@
|
||||
|
||||
{{ Former::legend('organization') }}
|
||||
{{ Former::text('name')->data_bind("attr { placeholder: placeholderName }") }}
|
||||
{{ Former::text('vat_number') }}
|
||||
{{ Former::text('website') }}
|
||||
{{ Former::text('id_number') }}
|
||||
{{ Former::text('vat_number') }}
|
||||
{{ Former::text('website') }}
|
||||
{{ Former::text('work_phone') }}
|
||||
|
||||
@if (Auth::user()->isPro())
|
||||
|
@ -39,8 +39,9 @@
|
||||
|
||||
<div class="col-md-3">
|
||||
<h3>{{ trans('texts.details') }}</h3>
|
||||
<p>{{ $client->getIdNumber() }}</p>
|
||||
<p>{{ $client->getVatNumber() }}</p>
|
||||
<p>{{ $client->getAddress() }}</p>
|
||||
<p>{{ $client->getAddress() }}</p>
|
||||
<p>{{ $client->getCustomFields() }}</p>
|
||||
<p>{{ $client->getPhone() }}</p>
|
||||
<p>{{ $client->getNotes() }}</p>
|
||||
|
@ -341,7 +341,8 @@
|
||||
|
||||
{{ Former::legend('organization') }}
|
||||
{{ 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('id_number')->data_bind("value: id_number, valueUpdate: 'afterkeydown'") }}
|
||||
{{ Former::text('vat_number')->data_bind("value: vat_number, valueUpdate: 'afterkeydown'") }}
|
||||
|
||||
{{ Former::text('website')->data_bind("value: website, valueUpdate: 'afterkeydown'") }}
|
||||
{{ Former::text('work_phone')->data_bind("value: work_phone, valueUpdate: 'afterkeydown'") }}
|
||||
@ -1222,7 +1223,8 @@
|
||||
var self = this;
|
||||
self.public_id = ko.observable(0);
|
||||
self.name = ko.observable('');
|
||||
self.vat_number = ko.observable('');
|
||||
self.id_number = ko.observable('');
|
||||
self.vat_number = ko.observable('');
|
||||
self.work_phone = ko.observable('');
|
||||
self.custom_value1 = ko.observable('');
|
||||
self.custom_value2 = ko.observable('');
|
||||
|
@ -31606,6 +31606,7 @@ function displayAccount(doc, invoice, x, y, layout) {
|
||||
|
||||
var data1 = [
|
||||
account.name,
|
||||
account.id_number,
|
||||
account.vat_number,
|
||||
account.work_email,
|
||||
account.work_phone
|
||||
@ -31644,6 +31645,7 @@ function displayClient(doc, invoice, x, y, layout) {
|
||||
}
|
||||
var data = [
|
||||
getClientDisplayName(client),
|
||||
client.id_number,
|
||||
client.vat_number,
|
||||
concatStrings(client.address1, client.address2),
|
||||
concatStrings(client.city, client.state, client.postal_code),
|
||||
|
@ -637,6 +637,7 @@ function displayAccount(doc, invoice, x, y, layout) {
|
||||
|
||||
var data1 = [
|
||||
account.name,
|
||||
account.id_number,
|
||||
account.vat_number,
|
||||
account.work_email,
|
||||
account.work_phone
|
||||
@ -675,6 +676,7 @@ function displayClient(doc, invoice, x, y, layout) {
|
||||
}
|
||||
var data = [
|
||||
getClientDisplayName(client),
|
||||
client.id_number,
|
||||
client.vat_number,
|
||||
concatStrings(client.address1, client.address2),
|
||||
concatStrings(client.city, client.state, client.postal_code),
|
||||
|
Loading…
x
Reference in New Issue
Block a user