mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Add lat long to client table for caching
This commit is contained in:
parent
49e4ae134b
commit
c09a442f4b
@ -296,6 +296,11 @@ class CreateUsersTable extends Migration
|
|||||||
$table->string('shipping_state')->nullable();
|
$table->string('shipping_state')->nullable();
|
||||||
$table->string('shipping_postal_code')->nullable();
|
$table->string('shipping_postal_code')->nullable();
|
||||||
$table->unsignedInteger('shipping_country_id')->nullable();
|
$table->unsignedInteger('shipping_country_id')->nullable();
|
||||||
|
$table->decimal('latitude', 11, 8)->nullable();
|
||||||
|
$table->decimal('longitude', 11, 8)->nullable();
|
||||||
|
|
||||||
|
$table->decimal('shipping_latitude', 11, 8)->nullable();
|
||||||
|
$table->decimal('shipping_longitude', 11, 8)->nullable();
|
||||||
|
|
||||||
$table->boolean('is_deleted')->default(false);
|
$table->boolean('is_deleted')->default(false);
|
||||||
$table->string('payment_terms')->nullable(); //todo type? depends how we are storing this
|
$table->string('payment_terms')->nullable(); //todo type? depends how we are storing this
|
||||||
@ -312,30 +317,6 @@ class CreateUsersTable extends Migration
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
Schema::create('client_locations', function (Blueprint $table) {
|
|
||||||
$table->increments('id');
|
|
||||||
$table->unsignedInteger('client_id')->index();
|
|
||||||
$table->string('address1')->nullable();
|
|
||||||
$table->string('address2')->nullable();
|
|
||||||
$table->string('city')->nullable();
|
|
||||||
$table->string('state')->nullable();
|
|
||||||
$table->string('postal_code')->nullable();
|
|
||||||
$table->unsignedInteger('country_id')->nullable();
|
|
||||||
$table->string('phone')->nullable();
|
|
||||||
$table->decimal('latitude', 11, 8)->nullable();
|
|
||||||
$table->decimal('longitude', 11, 8)->nullable();
|
|
||||||
$table->boolean('is_primary_billing')->default(false);
|
|
||||||
$table->boolean('is_primary_shipping')->default(false);
|
|
||||||
$table->enum('type', ['billing', 'shipping'])->nullable();
|
|
||||||
$table->text('description')->nullable();
|
|
||||||
$table->text('private_notes')->nullable();
|
|
||||||
|
|
||||||
$table->foreign('client_id')->references('id')->on('clients')->onDelete('cascade');
|
|
||||||
$table->foreign('country_id')->references('id')->on('countries');
|
|
||||||
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
Schema::create('client_contacts', function (Blueprint $table) {
|
Schema::create('client_contacts', function (Blueprint $table) {
|
||||||
$table->increments('id');
|
$table->increments('id');
|
||||||
$table->unsignedInteger('company_id')->index();
|
$table->unsignedInteger('company_id')->index();
|
||||||
|
@ -91,15 +91,6 @@ class UsersTableSeeder extends Seeder
|
|||||||
'company_id' => $company->id
|
'company_id' => $company->id
|
||||||
]);
|
]);
|
||||||
|
|
||||||
factory(\App\Models\ClientLocation::class,1)->create([
|
|
||||||
'client_id' => $c->id,
|
|
||||||
'is_primary_billing' => 1
|
|
||||||
]);
|
|
||||||
|
|
||||||
factory(\App\Models\ClientLocation::class,10)->create([
|
|
||||||
'client_id' => $c->id,
|
|
||||||
]);
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
2094
public/css/ninja.css
vendored
2094
public/css/ninja.css
vendored
File diff suppressed because it is too large
Load Diff
2094
public/css/ninja.min.css
vendored
2094
public/css/ninja.min.css
vendored
File diff suppressed because it is too large
Load Diff
@ -18,6 +18,10 @@ export default class Client {
|
|||||||
state: string
|
state: string
|
||||||
postal_code: string
|
postal_code: string
|
||||||
country_id: number
|
country_id: number
|
||||||
|
latitude: number
|
||||||
|
longitude: number
|
||||||
|
shipping_latitude: number
|
||||||
|
shipping_longitude: number
|
||||||
custom_value1: string
|
custom_value1: string
|
||||||
custom_value2: string
|
custom_value2: string
|
||||||
shipping_address1: string
|
shipping_address1: string
|
||||||
|
Loading…
x
Reference in New Issue
Block a user