mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Merge pull request #158 from sdebacker/master
Compatibility with MySQL STRICT_TRANS_TABLE + removed some hardcoded urls, fixes #157
This commit is contained in:
commit
a2d65a7b81
@ -207,12 +207,12 @@ class ClientController extends \BaseController {
|
||||
$client->city = trim(Input::get('city'));
|
||||
$client->state = trim(Input::get('state'));
|
||||
$client->postal_code = trim(Input::get('postal_code'));
|
||||
$client->country_id = Input::get('country_id') ? Input::get('country_id') : null;
|
||||
$client->country_id = Input::get('country_id') ? : null;
|
||||
$client->private_notes = trim(Input::get('private_notes'));
|
||||
$client->size_id = Input::get('size_id') ? Input::get('size_id') : null;
|
||||
$client->industry_id = Input::get('industry_id') ? Input::get('industry_id') : null;
|
||||
$client->currency_id = Input::get('currency_id') ? Input::get('currency_id') : 1;
|
||||
$client->payment_terms = Input::get('payment_terms');
|
||||
$client->size_id = Input::get('size_id') ? : null;
|
||||
$client->industry_id = Input::get('industry_id') ? : null;
|
||||
$client->currency_id = Input::get('currency_id') ? : 1;
|
||||
$client->payment_terms = Input::get('payment_terms') ? : 0;
|
||||
$client->website = trim(Input::get('website'));
|
||||
|
||||
$client->save();
|
||||
|
@ -132,19 +132,19 @@ class ConfideSetupUsersTable extends Migration {
|
||||
$t->timestamps();
|
||||
$t->softDeletes();
|
||||
|
||||
$t->string('name');
|
||||
$t->string('name')->nullable();
|
||||
$t->string('ip');
|
||||
$t->string('account_key')->unique();
|
||||
$t->timestamp('last_login');
|
||||
|
||||
$t->string('address1');
|
||||
$t->string('address2');
|
||||
$t->string('city');
|
||||
$t->string('state');
|
||||
$t->string('postal_code');
|
||||
$t->string('address1')->nullable();
|
||||
$t->string('address2')->nullable();
|
||||
$t->string('city')->nullable();
|
||||
$t->string('state')->nullable();
|
||||
$t->string('postal_code')->nullable();
|
||||
$t->unsignedInteger('country_id')->nullable();
|
||||
$t->text('invoice_terms');
|
||||
$t->text('email_footer');
|
||||
$t->text('invoice_terms')->nullable();
|
||||
$t->text('email_footer')->nullable();
|
||||
$t->unsignedInteger('industry_id')->nullable();
|
||||
$t->unsignedInteger('size_id')->nullable();
|
||||
|
||||
@ -177,16 +177,16 @@ class ConfideSetupUsersTable extends Migration {
|
||||
$t->timestamps();
|
||||
$t->softDeletes();
|
||||
|
||||
$t->string('first_name');
|
||||
$t->string('last_name');
|
||||
$t->string('phone');
|
||||
$t->string('first_name')->nullable();
|
||||
$t->string('last_name')->nullable();
|
||||
$t->string('phone')->nullable();
|
||||
$t->string('username')->unique();
|
||||
$t->string('email');
|
||||
$t->string('email')->nullable();
|
||||
$t->string('password');
|
||||
$t->string('confirmation_code');
|
||||
$t->boolean('registered')->default(false);
|
||||
$t->boolean('confirmed')->default(false);
|
||||
$t->integer('theme_id');
|
||||
$t->integer('theme_id')->nullable();
|
||||
|
||||
$t->boolean('notify_sent')->default(true);
|
||||
$t->boolean('notify_viewed')->default(false);
|
||||
@ -194,7 +194,7 @@ class ConfideSetupUsersTable extends Migration {
|
||||
|
||||
$t->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade');
|
||||
|
||||
$t->unsignedInteger('public_id');
|
||||
$t->unsignedInteger('public_id')->nullable();
|
||||
$t->unique( array('account_id','public_id') );
|
||||
});
|
||||
|
||||
@ -235,23 +235,23 @@ class ConfideSetupUsersTable extends Migration {
|
||||
$t->timestamps();
|
||||
$t->softDeletes();
|
||||
|
||||
$t->string('name');
|
||||
$t->string('address1');
|
||||
$t->string('address2');
|
||||
$t->string('city');
|
||||
$t->string('state');
|
||||
$t->string('postal_code');
|
||||
$t->string('name')->nullable();
|
||||
$t->string('address1')->nullable();
|
||||
$t->string('address2')->nullable();
|
||||
$t->string('city')->nullable();
|
||||
$t->string('state')->nullable();
|
||||
$t->string('postal_code')->nullable();
|
||||
$t->unsignedInteger('country_id')->nullable();
|
||||
$t->string('work_phone');
|
||||
$t->text('private_notes');
|
||||
$t->decimal('balance', 13, 2);
|
||||
$t->decimal('paid_to_date', 13, 2);
|
||||
$t->string('work_phone')->nullable();
|
||||
$t->text('private_notes')->nullable();
|
||||
$t->decimal('balance', 13, 2)->nullable();
|
||||
$t->decimal('paid_to_date', 13, 2)->nullable();
|
||||
$t->timestamp('last_login')->nullable();
|
||||
$t->string('website');
|
||||
$t->string('website')->nullable();
|
||||
$t->unsignedInteger('industry_id')->nullable();
|
||||
$t->unsignedInteger('size_id')->nullable();
|
||||
$t->boolean('is_deleted');
|
||||
$t->integer('payment_terms');
|
||||
$t->boolean('is_deleted')->default(false);
|
||||
$t->integer('payment_terms')->nullable();
|
||||
|
||||
$t->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade');
|
||||
$t->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
|
||||
@ -273,18 +273,18 @@ class ConfideSetupUsersTable extends Migration {
|
||||
$t->timestamps();
|
||||
$t->softDeletes();
|
||||
|
||||
$t->boolean('is_primary');
|
||||
$t->boolean('send_invoice');
|
||||
$t->string('first_name');
|
||||
$t->string('last_name');
|
||||
$t->string('email');
|
||||
$t->string('phone');
|
||||
$t->boolean('is_primary')->default(0);
|
||||
$t->boolean('send_invoice')->default(0);
|
||||
$t->string('first_name')->nullable();
|
||||
$t->string('last_name')->nullable();
|
||||
$t->string('email')->nullable();
|
||||
$t->string('phone')->nullable();
|
||||
$t->timestamp('last_login');
|
||||
|
||||
$t->foreign('client_id')->references('id')->on('clients')->onDelete('cascade');
|
||||
$t->foreign('user_id')->references('id')->on('users')->onDelete('cascade');;
|
||||
|
||||
$t->unsignedInteger('public_id');
|
||||
$t->unsignedInteger('public_id')->nullable();
|
||||
$t->unique( array('account_id','public_id') );
|
||||
});
|
||||
|
||||
@ -317,7 +317,7 @@ class ConfideSetupUsersTable extends Migration {
|
||||
$t->date('due_date')->nullable();
|
||||
$t->text('terms');
|
||||
$t->text('public_notes');
|
||||
$t->boolean('is_deleted');
|
||||
$t->boolean('is_deleted')->default(false);
|
||||
$t->boolean('is_recurring');
|
||||
$t->unsignedInteger('frequency_id');
|
||||
$t->date('start_date')->nullable();
|
||||
@ -354,7 +354,7 @@ class ConfideSetupUsersTable extends Migration {
|
||||
$t->timestamps();
|
||||
$t->softDeletes();
|
||||
|
||||
$t->string('transaction_reference');
|
||||
$t->string('transaction_reference')->nullable();
|
||||
$t->timestamp('sent_date');
|
||||
$t->timestamp('viewed_date');
|
||||
|
||||
@ -395,7 +395,7 @@ class ConfideSetupUsersTable extends Migration {
|
||||
$t->string('product_key');
|
||||
$t->text('notes');
|
||||
$t->decimal('cost', 13, 2);
|
||||
$t->decimal('qty', 13, 2);
|
||||
$t->decimal('qty', 13, 2)->nullable();
|
||||
|
||||
$t->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade');
|
||||
$t->foreign('user_id')->references('id')->on('users')->onDelete('cascade');;
|
||||
@ -418,10 +418,10 @@ class ConfideSetupUsersTable extends Migration {
|
||||
$t->string('product_key');
|
||||
$t->text('notes');
|
||||
$t->decimal('cost', 13, 2);
|
||||
$t->decimal('qty', 13, 2);
|
||||
$t->decimal('qty', 13, 2)->nullable();
|
||||
|
||||
$t->string('tax_name');
|
||||
$t->decimal('tax_rate', 13, 2);
|
||||
$t->string('tax_name')->nullable();
|
||||
$t->decimal('tax_rate', 13, 2)->nullable();
|
||||
|
||||
$t->foreign('invoice_id')->references('id')->on('invoices')->onDelete('cascade');
|
||||
$t->foreign('product_id')->references('id')->on('products');
|
||||
@ -445,11 +445,11 @@ class ConfideSetupUsersTable extends Migration {
|
||||
$t->timestamps();
|
||||
$t->softDeletes();
|
||||
|
||||
$t->boolean('is_deleted');
|
||||
$t->boolean('is_deleted')->default(false);
|
||||
$t->decimal('amount', 13, 2);
|
||||
$t->date('payment_date');
|
||||
$t->string('transaction_reference');
|
||||
$t->string('payer_id');
|
||||
$t->date('payment_date')->nullable();
|
||||
$t->string('transaction_reference')->nullable();
|
||||
$t->string('payer_id')->nullable();
|
||||
|
||||
$t->foreign('invoice_id')->references('id')->on('invoices');
|
||||
$t->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade');
|
||||
@ -472,11 +472,11 @@ class ConfideSetupUsersTable extends Migration {
|
||||
$t->timestamps();
|
||||
$t->softDeletes();
|
||||
|
||||
$t->boolean('is_deleted');
|
||||
$t->boolean('is_deleted')->default(false);
|
||||
$t->decimal('amount', 13, 2);
|
||||
$t->decimal('balance', 13, 2);
|
||||
$t->date('credit_date')->nullable();
|
||||
$t->string('credit_number');
|
||||
$t->string('credit_number')->nullable();
|
||||
$t->text('private_notes');
|
||||
|
||||
$t->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade');
|
||||
@ -495,17 +495,17 @@ class ConfideSetupUsersTable extends Migration {
|
||||
$t->unsignedInteger('account_id');
|
||||
$t->unsignedInteger('client_id');
|
||||
$t->unsignedInteger('user_id');
|
||||
$t->unsignedInteger('contact_id');
|
||||
$t->unsignedInteger('payment_id');
|
||||
$t->unsignedInteger('invoice_id');
|
||||
$t->unsignedInteger('credit_id');
|
||||
$t->unsignedInteger('invitation_id');
|
||||
$t->unsignedInteger('contact_id')->nullable();
|
||||
$t->unsignedInteger('payment_id')->nullable();
|
||||
$t->unsignedInteger('invoice_id')->nullable();
|
||||
$t->unsignedInteger('credit_id')->nullable();
|
||||
$t->unsignedInteger('invitation_id')->nullable();
|
||||
|
||||
$t->text('message');
|
||||
$t->text('json_backup');
|
||||
$t->text('message')->nullable();
|
||||
$t->text('json_backup')->nullable();
|
||||
$t->integer('activity_type_id');
|
||||
$t->decimal('adjustment', 13, 2);
|
||||
$t->decimal('balance', 13, 2);
|
||||
$t->decimal('adjustment', 13, 2)->nullable();
|
||||
$t->decimal('balance', 13, 2)->nullable();
|
||||
|
||||
$t->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade');
|
||||
$t->foreign('client_id')->references('id')->on('clients')->onDelete('cascade');
|
||||
|
@ -14,8 +14,8 @@ class AddPhoneToAccount extends Migration {
|
||||
{
|
||||
Schema::table('accounts', function($table)
|
||||
{
|
||||
$table->string('work_phone');
|
||||
$table->string('work_email');
|
||||
$table->string('work_phone')->nullable();
|
||||
$table->string('work_email')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -15,8 +15,8 @@ class AddSortAndRecommendedToGateways extends Migration {
|
||||
Schema::table('gateways', function($table)
|
||||
{
|
||||
$table->unsignedInteger('sort_order')->default(10000);
|
||||
$table->boolean('recommended');
|
||||
$table->string('site_url', 200);
|
||||
$table->boolean('recommended')->default(0);
|
||||
$table->string('site_url', 200)->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,7 @@ class AddProPlan extends Migration {
|
||||
{
|
||||
Schema::table('accounts', function($table)
|
||||
{
|
||||
$table->date('pro_plan_paid');
|
||||
$table->date('pro_plan_paid')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -14,20 +14,20 @@ class AddCustomFields extends Migration {
|
||||
{
|
||||
Schema::table('accounts', function($table)
|
||||
{
|
||||
$table->string('custom_label1');
|
||||
$table->string('custom_value1');
|
||||
$table->string('custom_label1')->nullable();
|
||||
$table->string('custom_value1')->nullable();
|
||||
|
||||
$table->string('custom_label2');
|
||||
$table->string('custom_value2');
|
||||
$table->string('custom_label2')->nullable();
|
||||
$table->string('custom_value2')->nullable();
|
||||
|
||||
$table->string('custom_client_label1');
|
||||
$table->string('custom_client_label2');
|
||||
$table->string('custom_client_label1')->nullable();
|
||||
$table->string('custom_client_label2')->nullable();
|
||||
});
|
||||
|
||||
Schema::table('clients', function($table)
|
||||
{
|
||||
$table->string('custom_value1');
|
||||
$table->string('custom_value2');
|
||||
$table->string('custom_value1')->nullable();
|
||||
$table->string('custom_value2')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -14,8 +14,8 @@ class AddAdvancedSettings extends Migration {
|
||||
{
|
||||
Schema::table('accounts', function($table)
|
||||
{
|
||||
$table->string('primary_color');
|
||||
$table->string('secondary_color');
|
||||
$table->string('primary_color')->nullable();
|
||||
$table->string('secondary_color')->nullable();
|
||||
});
|
||||
|
||||
Schema::table('payments', function($table)
|
||||
|
@ -14,7 +14,7 @@ class AddQuotes extends Migration {
|
||||
{
|
||||
Schema::table('invoices', function($table)
|
||||
{
|
||||
$table->boolean('is_quote');
|
||||
$table->boolean('is_quote')->default(0);
|
||||
$table->unsignedInteger('quote_id')->nullable();
|
||||
$table->unsignedInteger('quote_invoice_id')->nullable();
|
||||
});
|
||||
|
@ -14,14 +14,14 @@ class SupportHidingQuantity extends Migration {
|
||||
{
|
||||
Schema::table('accounts', function($table)
|
||||
{
|
||||
$table->boolean('hide_quantity');
|
||||
$table->boolean('hide_paid_to_date');
|
||||
$table->boolean('hide_quantity')->default(0);
|
||||
$table->boolean('hide_paid_to_date')->default(0);
|
||||
|
||||
$table->string('custom_invoice_label1');
|
||||
$table->string('custom_invoice_label2');
|
||||
$table->string('custom_invoice_label1')->nullable();
|
||||
$table->string('custom_invoice_label2')->nullable();
|
||||
|
||||
$table->boolean('custom_invoice_taxes1');
|
||||
$table->boolean('custom_invoice_taxes2');
|
||||
$table->boolean('custom_invoice_taxes1')->nullable();
|
||||
$table->boolean('custom_invoice_taxes2')->nullable();
|
||||
});
|
||||
|
||||
Schema::table('invoices', function($table)
|
||||
|
@ -136,9 +136,9 @@ Route::group(array('prefix' => 'api/v1', 'before' => 'auth.basic'), function()
|
||||
Route::post('api/hooks', 'IntegrationController@subscribe');
|
||||
});
|
||||
|
||||
define('CONTACT_EMAIL', 'contact@invoiceninja.com');
|
||||
define('CONTACT_NAME', 'Invoice Ninja');
|
||||
define('SITE_URL', 'https://www.invoiceninja.com');
|
||||
define('CONTACT_EMAIL', Config::get('mail.from.address'));
|
||||
define('CONTACT_NAME', Config::get('mail.from.name'));
|
||||
define('SITE_URL', Config::get('app.url'));
|
||||
|
||||
define('ENV_DEVELOPMENT', 'local');
|
||||
define('ENV_STAGING', 'staging');
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
@if ($showNinjaFooter)
|
||||
<p/>
|
||||
{{ trans('texts.ninja_email_footer', ['site' => '<a href="https://www.invoiceninja.com/?utm_source=invoice_email_footer">Invoice Ninja</a>']) }}
|
||||
{{ trans('texts.ninja_email_footer', ['site' => '<a href="' . SITE_URL . '/?utm_source=invoice_email_footer">Invoice Ninja</a>']) }}
|
||||
@endif
|
||||
|
||||
</body>
|
||||
|
@ -12,5 +12,5 @@
|
||||
|
||||
@if ($showNinjaFooter)
|
||||
{{ trans('texts.ninja_email_footer', ['site' => 'Invoice Ninja']) }}
|
||||
https://www.invoiceninja.com
|
||||
{{ SITE_URL }}
|
||||
@endif
|
@ -18,7 +18,7 @@
|
||||
|
||||
@if ($showNinjaFooter)
|
||||
<p/>
|
||||
{{ trans('texts.ninja_email_footer', ['site' => '<a href="https://www.invoiceninja.com/?utm_source=payment_email_footer">Invoice Ninja</a>']) }}
|
||||
{{ trans('texts.ninja_email_footer', ['site' => '<a href="' . SITE_URL . '/?utm_source=payment_email_footer">Invoice Ninja</a>']) }}
|
||||
@endif
|
||||
|
||||
</body>
|
||||
|
@ -11,5 +11,5 @@
|
||||
|
||||
@if ($showNinjaFooter)
|
||||
{{ trans('texts.ninja_email_footer', ['site' => 'Invoice Ninja']) }}
|
||||
https://www.invoiceninja.com
|
||||
{{ SITE_URL }}
|
||||
@endif
|
@ -9,9 +9,9 @@
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta property="og:site_name" content="Invoice Ninja"></meta>
|
||||
<meta property="og:url" content="https://www.invoiceninja.com"></meta>
|
||||
<meta property="og:url" content="{{ SITE_URL }}"></meta>
|
||||
<meta property="og:title" content="Invoice Ninja"></meta>
|
||||
<meta property="og:image" content="https://www.invoiceninja.com/images/social.jpg"></meta>
|
||||
<meta property="og:image" content="{{ SITE_URL }}/images/social.jpg"></meta>
|
||||
<meta property="og:description" content="Simple, Intuitive Invoicing."></meta>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
@ -20,7 +20,7 @@
|
||||
<link href='//fonts.googleapis.com/css?family=Roboto:400,700,900,100' rel='stylesheet' type='text/css'>
|
||||
<link href='//fonts.googleapis.com/css?family=Roboto+Slab:400,300,700' rel='stylesheet' type='text/css'>
|
||||
<link href="{{ asset('favicon.ico') }}" rel="icon" type="image/x-icon">
|
||||
<link href="https://www.invoiceninja.com" rel="canonical"></link>
|
||||
<link href="{{ SITE_URL }}" rel="canonical"></link>
|
||||
|
||||
<script src="{{ asset('built.js') }}" type="text/javascript"></script>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user