From 7e26a81fb91477a52c5a0cf59eb35af90d086a3d Mon Sep 17 00:00:00 2001 From: David Bomba Date: Thu, 11 Jun 2020 07:56:08 +1000 Subject: [PATCH] Move enabled_tax_rates onto company model --- app/DataMapper/CompanySettings.php | 4 ++-- app/DataMapper/FreeCompanySettings.php | 2 +- app/Http/Controllers/OpenAPI/CompanySettingsSchema.php | 1 - ...0_05_13_035355_add_google_refresh_token_to_users_table.php | 4 ++++ 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/DataMapper/CompanySettings.php b/app/DataMapper/CompanySettings.php index babe17df191e..5db860dd3786 100644 --- a/app/DataMapper/CompanySettings.php +++ b/app/DataMapper/CompanySettings.php @@ -113,7 +113,7 @@ class CompanySettings extends BaseSettings public $invoice_terms = ''; public $quote_terms = ''; public $invoice_taxes = 0; - public $enabled_item_tax_rates = 0; + // public $enabled_item_tax_rates = 0; public $invoice_design_id = 'VolejRejNm'; public $quote_design_id = 'VolejRejNm'; public $credit_design_id = 'VolejRejNm'; @@ -344,7 +344,7 @@ class CompanySettings extends BaseSettings 'invoice_design_id' => 'string', 'invoice_fields' => 'string', 'invoice_taxes' => 'int', - 'enabled_item_tax_rates' => 'int', + //'enabled_item_tax_rates' => 'int', 'invoice_footer' => 'string', 'invoice_labels' => 'string', 'invoice_terms' => 'string', diff --git a/app/DataMapper/FreeCompanySettings.php b/app/DataMapper/FreeCompanySettings.php index 4ec96c7bb276..9f18d759972c 100644 --- a/app/DataMapper/FreeCompanySettings.php +++ b/app/DataMapper/FreeCompanySettings.php @@ -33,7 +33,7 @@ class FreeCompanySettings extends BaseSettings public $custom_value3 = ''; public $custom_value4 = ''; public $date_format_id = ''; - public $enabled_item_tax_rates = 0; +// public $enabled_item_tax_rates = 0; public $expense_number_pattern = ''; public $expense_number_counter = 1; public $inclusive_taxes = false; diff --git a/app/Http/Controllers/OpenAPI/CompanySettingsSchema.php b/app/Http/Controllers/OpenAPI/CompanySettingsSchema.php index f6a27f9374b2..76b0769118e3 100644 --- a/app/Http/Controllers/OpenAPI/CompanySettingsSchema.php +++ b/app/Http/Controllers/OpenAPI/CompanySettingsSchema.php @@ -66,7 +66,6 @@ * @OA\Property(property="invoice_terms", type="string", example="Invoice Terms are...", description="The default invoice terms"), * @OA\Property(property="quote_terms", type="string", example="Quote Terms are...", description="The default quote terms"), * @OA\Property(property="invoice_taxes", type="number", example="1", description="Taxes can be applied to the invoice"), - * @OA\Property(property="enabled_item_tax_rates", type="number", example="1", description="Taxes can be applied to the invoice items"), * @OA\Property(property="invoice_design_id", type="string", example="1", description="The default design id (invoice, quote etc)"), * @OA\Property(property="quote_design_id", type="string", example="1", description="The default design id (invoice, quote etc)"), * @OA\Property(property="invoice_footer", type="string", example="1", description="The default invoice footer"), diff --git a/database/migrations/2020_05_13_035355_add_google_refresh_token_to_users_table.php b/database/migrations/2020_05_13_035355_add_google_refresh_token_to_users_table.php index 09131c84e437..20e97c469cf3 100644 --- a/database/migrations/2020_05_13_035355_add_google_refresh_token_to_users_table.php +++ b/database/migrations/2020_05_13_035355_add_google_refresh_token_to_users_table.php @@ -20,6 +20,10 @@ class AddGoogleRefreshTokenToUsersTable extends Migration DB::statement("alter table users modify column oauth_user_token text"); + Schema::table('companies', function (Blueprint $table){ + $table->integer('enabled_item_tax_rates')->default(0); + }); + } /**