diff --git a/app/DataMapper/CompanySettings.php b/app/DataMapper/CompanySettings.php index b043c55501cf..f6c78e0ac11c 100644 --- a/app/DataMapper/CompanySettings.php +++ b/app/DataMapper/CompanySettings.php @@ -155,7 +155,7 @@ class CompanySettings extends BaseSettings /* Company Meta data that we can use to build sub companies*/ public $name = ''; - public $company_logo_url = ''; + public $company_logo = ''; public $website = ''; public $address1 = ''; public $address2 = ''; @@ -170,7 +170,7 @@ class CompanySettings extends BaseSettings public static $casts = [ 'name' => 'string', - 'company_logo_url' => 'string', + 'company_logo' => 'string', 'website' => 'string', 'address1' => 'string', 'address2' => 'string', diff --git a/app/Http/Controllers/OpenAPI/CompanySettingsSchema.php b/app/Http/Controllers/OpenAPI/CompanySettingsSchema.php index c6ee86bee21c..a8093284ce7d 100644 --- a/app/Http/Controllers/OpenAPI/CompanySettingsSchema.php +++ b/app/Http/Controllers/OpenAPI/CompanySettingsSchema.php @@ -7,7 +7,7 @@ * @OA\Property(property="date_format_id", type="string", example="15", description="____________"), * @OA\Property(property="financial_year_start", type="string", example="2000-01-01", description="____________"), * @OA\Property(property="language_id", type="string", example="1", description="____________"), - * @OA\Property(property="company_logo_url", type="string", example="https://example.com/logo.png", description="The URL to the company Logo"), + * @OA\Property(property="company_logo", type="string", example="https://example.com/logo.png", description="The URL to the company Logo"), * @OA\Property(property="custom_label1", type="string", example="Custom Label", description="____________"), * @OA\Property(property="custom_label2", type="string", example="Custom Label", description="____________"), * @OA\Property(property="custom_label3", type="string", example="Custom Label", description="____________"), @@ -17,7 +17,7 @@ * @OA\Property(property="custom_value3", type="string", example="Custom Label", description="____________"), * @OA\Property(property="custom_value4", type="string", example="Custom Label", description="____________"), * @OA\Property(property="custom_message_dashboard", type="string", example="Please pay invoices immediately", description="____________"), - * @OA\Property(property="custom_message_unpaid_invoice", type="string", example="Please pay invoices immediatelyl", description="____________"), + * @OA\Property(property="custom_message_unpaid_invoice", type="string", example="Please pay invoices immediately", description="____________"), * @OA\Property(property="custom_message_paid_invoice", type="string", example="Thanks for paying this invoice!", description="____________"), * @OA\Property(property="custom_message_unapproved_quote", type="string", example="Please approve quote", description="____________"), * @OA\Property(property="military_time", type="boolean", example=true, description="____________"), diff --git a/app/Models/Company.php b/app/Models/Company.php index 3fb96b69c7a1..053d8ad6a1de 100644 --- a/app/Models/Company.php +++ b/app/Models/Company.php @@ -193,7 +193,7 @@ class Company extends BaseModel public function getLogo() { - return $this->settings->company_logo_url ?: null; + return $this->settings->company_logo ?: null; } /** diff --git a/app/Utils/Traits/Uploadable.php b/app/Utils/Traits/Uploadable.php index d4084b33f216..33da6860c9d2 100644 --- a/app/Utils/Traits/Uploadable.php +++ b/app/Utils/Traits/Uploadable.php @@ -30,7 +30,7 @@ trait Uploadable if($path){ $settings = $entity->settings; - $settings->company_logo_url = $company->domain . $path; + $settings->company_logo = $company->domain . $path; $entity->settings = $settings; $entity->save(); } diff --git a/tests/Integration/UploadLogoTest.php b/tests/Integration/UploadLogoTest.php index f88b5090cd31..d988b494f9c2 100644 --- a/tests/Integration/UploadLogoTest.php +++ b/tests/Integration/UploadLogoTest.php @@ -62,7 +62,7 @@ class UploadLogoTest extends TestCase $acc = $response->json(); - $logo = $acc['data']['settings']['company_logo_url']; + $logo = $acc['data']['settings']['company_logo']; $logo_file = Storage::url($logo);