mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Added setting to hide second tax rate
This commit is contained in:
parent
607fb58c29
commit
c254544b19
@ -14,9 +14,9 @@ class AddQuotes extends Migration {
|
|||||||
{
|
{
|
||||||
Schema::table('invoices', function($table)
|
Schema::table('invoices', function($table)
|
||||||
{
|
{
|
||||||
$table->boolean('is_quote')->default(0);
|
$table->boolean('invoice_type_id')->default(0);
|
||||||
$table->unsignedInteger('quote_id')->nullable();
|
$table->unsignedInteger('quote_id')->nullable();
|
||||||
$table->unsignedInteger('quote_invoice_id')->nullable();
|
$table->unsignedInteger('quote_invoice_id')->nullable();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -30,7 +30,7 @@ class AddQuotes extends Migration {
|
|||||||
Schema::table('invoices', function($table)
|
Schema::table('invoices', function($table)
|
||||||
{
|
{
|
||||||
$table->dropColumn('is_quote');
|
$table->dropColumn('is_quote');
|
||||||
$table->dropColumn('quote_id');
|
$table->dropColumn('invoice_type_id');
|
||||||
$table->dropColumn('quote_invoice_id');
|
$table->dropColumn('quote_invoice_id');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -12,9 +12,20 @@ class AddInvoiceTypeSupport extends Migration
|
|||||||
*/
|
*/
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Schema::table('invoices', function ($table) {
|
if (Schema::hasColumn('invoices', 'is_quote')) {
|
||||||
$table->renameColumn('is_quote', 'invoice_type_id');
|
DB::update('update invoices set is_quote = is_quote + 1');
|
||||||
});
|
|
||||||
|
Schema::table('invoices', function ($table) {
|
||||||
|
$table->renameColumn('is_quote', 'invoice_type_id');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
Schema::table('accounts', function($table)
|
||||||
|
{
|
||||||
|
$table->boolean('enable_second_tax_rate')->default(false);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -24,8 +35,17 @@ class AddInvoiceTypeSupport extends Migration
|
|||||||
*/
|
*/
|
||||||
public function down()
|
public function down()
|
||||||
{
|
{
|
||||||
Schema::table('invoices', function ($table) {
|
if (Schema::hasColumn('invoices', 'invoice_type_id')) {
|
||||||
$table->renameColumn('invoice_type_id', 'is_quote');
|
DB::update('update invoices set invoice_type_id = invoice_type_id - 1');
|
||||||
});
|
|
||||||
|
Schema::table('invoices', function ($table) {
|
||||||
|
$table->renameColumn('invoice_type_id', 'is_quote');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
Schema::table('accounts', function($table)
|
||||||
|
{
|
||||||
|
$table->dropColumn('enable_second_tax_rate');
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user