mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
remove work_ prefix
This commit is contained in:
parent
9b09cbe183
commit
187fb67275
@ -35,7 +35,7 @@ class UpdateProductRequest extends Request
|
||||
//when updating you need to ignore the column ID
|
||||
|
||||
return [
|
||||
'product_key' => 'unique:products,product_key,'.$this->product->id.',id,company_id,'.auth()->user()->companyId(),
|
||||
//'product_key' => 'unique:products,product_key,'.$this->product->id.',id,company_id,'.auth()->user()->companyId(),
|
||||
'cost' => 'numeric',
|
||||
'price' => 'numeric',
|
||||
'quantity' => 'numeric',
|
||||
|
@ -51,8 +51,8 @@ class Company extends BaseModel
|
||||
'city',
|
||||
'state',
|
||||
'postal_code',
|
||||
'work_phone',
|
||||
'work_email',
|
||||
'phone',
|
||||
'email',
|
||||
'country_id',
|
||||
'domain',
|
||||
'vat_number',
|
||||
@ -188,7 +188,7 @@ class Company extends BaseModel
|
||||
|
||||
public function getLogo()
|
||||
{
|
||||
return $this->logo ? config('ninja.site_url').$this->logo : '';
|
||||
return $this->logo ? config('ninja.site_url').$this->logo : null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -48,11 +48,11 @@ class CompanyPresenter extends EntityPresenter
|
||||
if ($country = $company->country) {
|
||||
$str .= e($country->name) . '<br/>';
|
||||
}
|
||||
if ($company->work_phone) {
|
||||
$str .= ctrans('texts.work_phone') . ": ". e($company->work_phone) .'<br/>';
|
||||
if ($company->phone) {
|
||||
$str .= ctrans('texts.work_phone') . ": ". e($company->phone) .'<br/>';
|
||||
}
|
||||
if ($company->work_email) {
|
||||
$str .= ctrans('texts.work_email') . ": ". e($company->work_email) .'<br/>';
|
||||
if ($company->email) {
|
||||
$str .= ctrans('texts.work_email') . ": ". e($company->email) .'<br/>';
|
||||
}
|
||||
|
||||
return $str;
|
||||
|
@ -61,8 +61,8 @@ class User extends Authenticatable implements MustVerifyEmail
|
||||
protected $fillable = [
|
||||
'first_name',
|
||||
'last_name',
|
||||
'email',
|
||||
'phone',
|
||||
// 'email',
|
||||
// 'phone',
|
||||
'signature',
|
||||
'avatar',
|
||||
'accepted_terms_version',
|
||||
@ -89,6 +89,7 @@ class User extends Authenticatable implements MustVerifyEmail
|
||||
'updated_at' => 'timestamp',
|
||||
'created_at' => 'timestamp',
|
||||
'deleted_at' => 'timestamp',
|
||||
'last_login' => 'timestamp',
|
||||
];
|
||||
|
||||
public function getHashedIdAttribute()
|
||||
|
@ -1,3 +1,4 @@
|
||||
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
@ -61,7 +62,7 @@ class ClientTransformer extends EntityTransformer
|
||||
'balance' => (float) $client->balance,
|
||||
'currency_id' => (string)$client->currency_id ?: '',
|
||||
'paid_to_date' => (float) $client->paid_to_date,
|
||||
'last_login' => $client->last_login ?: '',
|
||||
'last_login' => (int)$client->last_login,
|
||||
'address1' => $client->address1 ?: '',
|
||||
'address2' => $client->address2 ?: '',
|
||||
'city' => $client->city ?: '',
|
||||
@ -81,7 +82,6 @@ class ClientTransformer extends EntityTransformer
|
||||
'shipping_country_id' => $client->shipping_country_id ?: '',
|
||||
'settings' => $client->settings ?: '',
|
||||
'is_deleted' => (bool) $client->is_deleted,
|
||||
'payment_terms' => (int) $client->payment_terms,
|
||||
'vat_number' => $client->vat_number ?: '',
|
||||
'id_number' => $client->id_number ?: '',
|
||||
'updated_at' => $client->updated_at,
|
||||
|
@ -66,6 +66,7 @@ class CompanyTransformer extends EntityTransformer
|
||||
return [
|
||||
'id' => (string)$this->encodePrimaryKey($company->id),
|
||||
'name' => (string)$company->name ?: '',
|
||||
'website' => (string)$company->website ?: '',
|
||||
'logo_url' => (string)$company->getLogo(),
|
||||
'company_key' => (string)$company->company_key ?: '',
|
||||
'address1' => (string)$company->address1 ?: '',
|
||||
@ -73,8 +74,8 @@ class CompanyTransformer extends EntityTransformer
|
||||
'city' => (string)$company->city ?: '',
|
||||
'state' => (string)$company->state ?: '',
|
||||
'postal_code' => (string)$company->postal_code ?: '',
|
||||
'work_phone' => (string)$company->work_phone ?: '',
|
||||
'work_email' => (string)$company->work_email ?: '',
|
||||
'phone' => (string)$company->phone ?: '',
|
||||
'email' => (string)$company->email ?: '',
|
||||
'country_id' => (string) $company->country_id ?: '',
|
||||
'vat_number' => (string)$company->vat_number ?: '',
|
||||
'id_number' => (string)$company->id_number ?: '',
|
||||
|
@ -109,7 +109,7 @@ trait MakesInvoiceValues
|
||||
'credit_issued_to',
|
||||
'credit_to',
|
||||
'your_credit',
|
||||
'work_phone',
|
||||
'phone',
|
||||
'invoice_total',
|
||||
'outstanding',
|
||||
'invoice_due_date',
|
||||
@ -212,8 +212,8 @@ trait MakesInvoiceValues
|
||||
$data['$company_state'] = $this->company->state;
|
||||
$data['$company_postal_code'] = $this->company->postal_code;
|
||||
$data['$company_country'] = $this->company->country ? $this->company->country->name : '';
|
||||
$data['$company_phone'] = $this->company->work_phone;
|
||||
$data['$company_email'] = $this->company->work_email;
|
||||
$data['$company_phone'] = $this->company->phone;
|
||||
$data['$company_email'] = $this->company->email;
|
||||
$data['$company_vat_number'] = $this->company->vat_number;
|
||||
$data['$company_id_number'] = $this->company->id_number;
|
||||
$data['$company_address'] = $this->company->present()->address();
|
||||
@ -234,7 +234,7 @@ trait MakesInvoiceValues
|
||||
$data['$credit_issued_to'] = ;
|
||||
$data['$credit_to'] = ;
|
||||
$data['$your_credit'] = ;
|
||||
$data['$work_phone'] = ;
|
||||
$data['$phone'] = ;
|
||||
$data['$invoice_total'] = ;
|
||||
$data['$outstanding'] = ;
|
||||
$data['$invoice_due_date'] = ;
|
||||
|
@ -16,8 +16,8 @@ $factory->define(App\Models\Company::class, function (Faker $faker) {
|
||||
'state' => $faker->state,
|
||||
'postal_code' => $faker->postcode,
|
||||
'country_id' => 4,
|
||||
'work_phone' => $faker->phoneNumber,
|
||||
'work_email' => $faker->safeEmail,
|
||||
'phone' => $faker->phoneNumber,
|
||||
'email' => $faker->safeEmail,
|
||||
'logo' => 'https://www.invoiceninja.com/wp-content/themes/invoice-ninja/images/logo.png',
|
||||
];
|
||||
});
|
||||
|
@ -138,8 +138,8 @@ class CreateUsersTable extends Migration
|
||||
$table->string('city')->nullable();
|
||||
$table->string('state')->nullable();
|
||||
$table->string('postal_code')->nullable();
|
||||
$table->string('work_phone')->nullable();
|
||||
$table->string('work_email')->nullable();
|
||||
$table->string('phone')->nullable();
|
||||
$table->string('email')->nullable();
|
||||
$table->unsignedInteger('country_id')->nullable();
|
||||
$table->string('domain')->nullable();
|
||||
$table->string('db')->nullable();
|
||||
@ -807,6 +807,7 @@ class CreateUsersTable extends Migration
|
||||
$table->unsignedInteger('bank_company_id');
|
||||
|
||||
$table->string('account_name')->nullable();
|
||||
$table->string('website')->nullable();
|
||||
$table->string('account_number')->nullable();
|
||||
|
||||
$table->timestamps(6);
|
||||
|
Loading…
x
Reference in New Issue
Block a user