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,6 +818,7 @@ class AccountController extends \BaseController {
|
|||||||
{
|
{
|
||||||
$account = Auth::user()->account;
|
$account = Auth::user()->account;
|
||||||
$account->name = trim(Input::get('name'));
|
$account->name = trim(Input::get('name'));
|
||||||
|
$account->id_number = trim(Input::get('id_number'));
|
||||||
$account->vat_number = trim(Input::get('vat_number'));
|
$account->vat_number = trim(Input::get('vat_number'));
|
||||||
$account->work_email = trim(Input::get('work_email'));
|
$account->work_email = trim(Input::get('work_email'));
|
||||||
$account->work_phone = trim(Input::get('work_phone'));
|
$account->work_phone = trim(Input::get('work_phone'));
|
||||||
|
@ -199,6 +199,7 @@ class ClientController extends \BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$client->name = trim(Input::get('name'));
|
$client->name = trim(Input::get('name'));
|
||||||
|
$client->id_number = trim(Input::get('id_number'));
|
||||||
$client->vat_number = trim(Input::get('vat_number'));
|
$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'));
|
||||||
|
@ -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
|
// client
|
||||||
'organization' => 'Organisation',
|
'organization' => 'Organisation',
|
||||||
'name' => 'Navn',
|
'name' => 'Navn',
|
||||||
'vat_number' => 'CVR nummer',
|
'id_number' => 'SE/CVR nummer',
|
||||||
|
'vat_number' => 'SE/CVR nummer',
|
||||||
'website' => 'Webside',
|
'website' => 'Webside',
|
||||||
'work_phone' => 'Telefon',
|
'work_phone' => 'Telefon',
|
||||||
'address' => 'Adresse',
|
'address' => 'Adresse',
|
||||||
|
@ -457,7 +457,10 @@ return array(
|
|||||||
'more_designs_self_host_text' => '',
|
'more_designs_self_host_text' => '',
|
||||||
'buy' => 'Buy',
|
'buy' => 'Buy',
|
||||||
'bought_designs' => 'Successfully added additional invoice designs',
|
'bought_designs' => 'Successfully added additional invoice designs',
|
||||||
|
|
||||||
'sent' => 'sent',
|
'sent' => 'sent',
|
||||||
|
|
||||||
|
'id_number' => 'ID Number',
|
||||||
|
'vat_number' => 'VAT Number',
|
||||||
|
|
||||||
'timesheets' => 'Timesheets',
|
'timesheets' => 'Timesheets',
|
||||||
);
|
);
|
||||||
|
@ -131,11 +131,23 @@ class Client extends EntityModel
|
|||||||
return $str;
|
return $str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getIdNumber()
|
||||||
|
{
|
||||||
|
$str = '';
|
||||||
|
|
||||||
|
if ($this->id_number)
|
||||||
|
{
|
||||||
|
$str .= '<i class="fa fa-vat-number" style="width: 20px"></i>' . $this->vat_number;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $str;
|
||||||
|
}
|
||||||
|
|
||||||
public function getVatNumber()
|
public function getVatNumber()
|
||||||
{
|
{
|
||||||
$str = '';
|
$str = '';
|
||||||
|
|
||||||
if ($this->work_phone)
|
if ($this->vat_number)
|
||||||
{
|
{
|
||||||
$str .= '<i class="fa fa-vat-number" style="width: 20px"></i>' . $this->vat_number;
|
$str .= '<i class="fa fa-vat-number" style="width: 20px"></i>' . $this->vat_number;
|
||||||
}
|
}
|
||||||
|
@ -95,6 +95,7 @@ class Invoice extends EntityModel
|
|||||||
|
|
||||||
$this->client->setVisible([
|
$this->client->setVisible([
|
||||||
'name',
|
'name',
|
||||||
|
'id_number',
|
||||||
'vat_number',
|
'vat_number',
|
||||||
'address1',
|
'address1',
|
||||||
'address2',
|
'address2',
|
||||||
@ -111,6 +112,7 @@ class Invoice extends EntityModel
|
|||||||
|
|
||||||
$this->account->setVisible([
|
$this->account->setVisible([
|
||||||
'name',
|
'name',
|
||||||
|
'id_number',
|
||||||
'vat_number',
|
'vat_number',
|
||||||
'address1',
|
'address1',
|
||||||
'address2',
|
'address2',
|
||||||
|
@ -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['id_number'])) {
|
||||||
|
$client->id_number = trim($data['id_number']);
|
||||||
|
}
|
||||||
if (isset($data['vat_number'])) {
|
if (isset($data['vat_number'])) {
|
||||||
$client->vat_number = trim($data['vat_number']);
|
$client->vat_number = trim($data['vat_number']);
|
||||||
}
|
}
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
|
|
||||||
{{ Former::legend('details') }}
|
{{ Former::legend('details') }}
|
||||||
{{ Former::text('name') }}
|
{{ Former::text('name') }}
|
||||||
|
{{ Former::text('id_number') }}
|
||||||
{{ Former::text('vat_number') }}
|
{{ Former::text('vat_number') }}
|
||||||
{{ Former::text('work_email') }}
|
{{ Former::text('work_email') }}
|
||||||
{{ Former::text('work_phone') }}
|
{{ Former::text('work_phone') }}
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
{{ Former::legend('Organization') }}
|
{{ Former::legend('Organization') }}
|
||||||
{{ Former::text('name') }}
|
{{ Former::text('name') }}
|
||||||
|
{{ Former::text('id_number') }}
|
||||||
{{ Former::text('vat_number') }}
|
{{ Former::text('vat_number') }}
|
||||||
{{ Former::text('work_phone')->label('Phone') }}
|
{{ Former::text('work_phone')->label('Phone') }}
|
||||||
{{ Former::textarea('notes') }}
|
{{ Former::textarea('notes') }}
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
{{ Former::legend('organization') }}
|
{{ Former::legend('organization') }}
|
||||||
{{ Former::text('name')->data_bind("attr { placeholder: placeholderName }") }}
|
{{ Former::text('name')->data_bind("attr { placeholder: placeholderName }") }}
|
||||||
|
{{ Former::text('id_number') }}
|
||||||
{{ Former::text('vat_number') }}
|
{{ Former::text('vat_number') }}
|
||||||
{{ Former::text('website') }}
|
{{ Former::text('website') }}
|
||||||
{{ Former::text('work_phone') }}
|
{{ Former::text('work_phone') }}
|
||||||
|
@ -39,6 +39,7 @@
|
|||||||
|
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<h3>{{ trans('texts.details') }}</h3>
|
<h3>{{ trans('texts.details') }}</h3>
|
||||||
|
<p>{{ $client->getIdNumber() }}</p>
|
||||||
<p>{{ $client->getVatNumber() }}</p>
|
<p>{{ $client->getVatNumber() }}</p>
|
||||||
<p>{{ $client->getAddress() }}</p>
|
<p>{{ $client->getAddress() }}</p>
|
||||||
<p>{{ $client->getCustomFields() }}</p>
|
<p>{{ $client->getCustomFields() }}</p>
|
||||||
|
@ -341,6 +341,7 @@
|
|||||||
|
|
||||||
{{ 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('id_number')->data_bind("value: id_number, valueUpdate: 'afterkeydown'") }}
|
||||||
{{ Former::text('vat_number')->data_bind("value: vat_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('website')->data_bind("value: website, valueUpdate: 'afterkeydown'") }}
|
||||||
@ -1222,6 +1223,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.id_number = ko.observable('');
|
||||||
self.vat_number = 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('');
|
||||||
|
@ -31606,6 +31606,7 @@ function displayAccount(doc, invoice, x, y, layout) {
|
|||||||
|
|
||||||
var data1 = [
|
var data1 = [
|
||||||
account.name,
|
account.name,
|
||||||
|
account.id_number,
|
||||||
account.vat_number,
|
account.vat_number,
|
||||||
account.work_email,
|
account.work_email,
|
||||||
account.work_phone
|
account.work_phone
|
||||||
@ -31644,6 +31645,7 @@ function displayClient(doc, invoice, x, y, layout) {
|
|||||||
}
|
}
|
||||||
var data = [
|
var data = [
|
||||||
getClientDisplayName(client),
|
getClientDisplayName(client),
|
||||||
|
client.id_number,
|
||||||
client.vat_number,
|
client.vat_number,
|
||||||
concatStrings(client.address1, client.address2),
|
concatStrings(client.address1, client.address2),
|
||||||
concatStrings(client.city, client.state, client.postal_code),
|
concatStrings(client.city, client.state, client.postal_code),
|
||||||
|
@ -637,6 +637,7 @@ function displayAccount(doc, invoice, x, y, layout) {
|
|||||||
|
|
||||||
var data1 = [
|
var data1 = [
|
||||||
account.name,
|
account.name,
|
||||||
|
account.id_number,
|
||||||
account.vat_number,
|
account.vat_number,
|
||||||
account.work_email,
|
account.work_email,
|
||||||
account.work_phone
|
account.work_phone
|
||||||
@ -675,6 +676,7 @@ function displayClient(doc, invoice, x, y, layout) {
|
|||||||
}
|
}
|
||||||
var data = [
|
var data = [
|
||||||
getClientDisplayName(client),
|
getClientDisplayName(client),
|
||||||
|
client.id_number,
|
||||||
client.vat_number,
|
client.vat_number,
|
||||||
concatStrings(client.address1, client.address2),
|
concatStrings(client.address1, client.address2),
|
||||||
concatStrings(client.city, client.state, client.postal_code),
|
concatStrings(client.city, client.state, client.postal_code),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user