mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 10:24:31 -04:00
Merge pull request #4514 from turbo124/v5-develop
add enable_product_discount to company table.
This commit is contained in:
commit
c75bd84cbe
@ -80,6 +80,7 @@ class Company extends BaseModel
|
|||||||
'auto_start_tasks',
|
'auto_start_tasks',
|
||||||
'is_disabled',
|
'is_disabled',
|
||||||
'default_task_is_date_based',
|
'default_task_is_date_based',
|
||||||
|
'enable_product_discount',
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $hidden = [
|
protected $hidden = [
|
||||||
|
@ -19,6 +19,8 @@ class Country extends StaticModel
|
|||||||
'eea' => 'boolean',
|
'eea' => 'boolean',
|
||||||
'swap_postal_code' => 'boolean',
|
'swap_postal_code' => 'boolean',
|
||||||
'swap_currency_symbol' => 'boolean',
|
'swap_currency_symbol' => 'boolean',
|
||||||
|
'thousand_separator' => 'string',
|
||||||
|
'decimal_separator' => 'string',
|
||||||
'updated_at' => 'timestamp',
|
'updated_at' => 'timestamp',
|
||||||
'created_at' => 'timestamp',
|
'created_at' => 'timestamp',
|
||||||
'deleted_at' => 'timestamp',
|
'deleted_at' => 'timestamp',
|
||||||
|
@ -147,6 +147,7 @@ class CompanyTransformer extends EntityTransformer
|
|||||||
'show_tasks_table' => (bool) $company->show_tasks_table,
|
'show_tasks_table' => (bool) $company->show_tasks_table,
|
||||||
'use_credits_payment' => 'always', //todo remove
|
'use_credits_payment' => 'always', //todo remove
|
||||||
'default_task_is_date_based' => (bool)$company->default_task_is_date_based,
|
'default_task_is_date_based' => (bool)$company->default_task_is_date_based,
|
||||||
|
'enable_product_discount' => (bool)$company->enable_product_discount,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1,32 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
class AddEnableProductDiscountFieldToCompaniesTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('companies', function (Blueprint $table) {
|
||||||
|
$table->boolean('enable_product_discount')->default(false);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('companies', function (Blueprint $table) {
|
||||||
|
//
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user