diff --git a/app/Models/Company.php b/app/Models/Company.php index 2f769887b229..5ca2f9751404 100644 --- a/app/Models/Company.php +++ b/app/Models/Company.php @@ -80,6 +80,7 @@ class Company extends BaseModel 'auto_start_tasks', 'is_disabled', 'default_task_is_date_based', + 'enable_product_discount', ]; protected $hidden = [ diff --git a/app/Models/Country.php b/app/Models/Country.php index e6b5e4369737..9e4aee3d6fa0 100644 --- a/app/Models/Country.php +++ b/app/Models/Country.php @@ -19,6 +19,8 @@ class Country extends StaticModel 'eea' => 'boolean', 'swap_postal_code' => 'boolean', 'swap_currency_symbol' => 'boolean', + 'thousand_separator' => 'string', + 'decimal_separator' => 'string', 'updated_at' => 'timestamp', 'created_at' => 'timestamp', 'deleted_at' => 'timestamp', diff --git a/app/Transformers/CompanyTransformer.php b/app/Transformers/CompanyTransformer.php index 46eb495b7dd8..715f71dd99ae 100644 --- a/app/Transformers/CompanyTransformer.php +++ b/app/Transformers/CompanyTransformer.php @@ -147,6 +147,7 @@ class CompanyTransformer extends EntityTransformer 'show_tasks_table' => (bool) $company->show_tasks_table, 'use_credits_payment' => 'always', //todo remove 'default_task_is_date_based' => (bool)$company->default_task_is_date_based, + 'enable_product_discount' => (bool)$company->enable_product_discount, ]; } diff --git a/database/migrations/2020_12_17_104033_add_enable_product_discount_field_to_companies_table.php b/database/migrations/2020_12_17_104033_add_enable_product_discount_field_to_companies_table.php new file mode 100644 index 000000000000..24ea3836c6d0 --- /dev/null +++ b/database/migrations/2020_12_17_104033_add_enable_product_discount_field_to_companies_table.php @@ -0,0 +1,32 @@ +boolean('enable_product_discount')->default(false); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('companies', function (Blueprint $table) { + // + }); + } +} diff --git a/resources/views/index/index.blade.php b/resources/views/index/index.blade.php index 165f82c7eaf2..3271eaa286d9 100644 --- a/resources/views/index/index.blade.php +++ b/resources/views/index/index.blade.php @@ -96,7 +96,7 @@ document.getElementById('loader').style.display = 'none'; }); - /* + function invokeServiceWorkerUpdateFlow() { // you have a better UI here, reloading is not a great user experince here. const confirmed = confirm('New version of the app is available. Refresh now'); @@ -143,7 +143,7 @@ } handleServiceWorker(); - */ +