From 4fb87638172ab395b0e387870563e17ee3bfdd2f Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sat, 4 Nov 2023 14:26:54 +1100 Subject: [PATCH] Fixed for company imports / migrations --- VERSION.txt | 2 +- app/Models/Company.php | 25 +++++++++++++++++-------- config/ninja.php | 4 ++-- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/VERSION.txt b/VERSION.txt index a07dffe0af..335b4cb150 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -5.7.43 \ No newline at end of file +5.7.44 \ No newline at end of file diff --git a/app/Models/Company.php b/app/Models/Company.php index 1815c6dd1e..897b7aa584 100644 --- a/app/Models/Company.php +++ b/app/Models/Company.php @@ -11,20 +11,21 @@ namespace App\Models; -use App\Casts\EncryptedCast; -use App\DataMapper\CompanySettings; -use App\Models\Presenters\CompanyPresenter; -use App\Services\Notification\NotificationService; use App\Utils\Ninja; +use App\Casts\EncryptedCast; +use App\Models\VendorContact; use App\Utils\Traits\AppSetup; -use App\Utils\Traits\CompanySettingsSaver; use App\Utils\Traits\MakesHash; -use Illuminate\Database\Eloquent\Relations\BelongsTo; -use Illuminate\Database\Eloquent\Relations\HasMany; -use Illuminate\Notifications\Notification; +use App\DataMapper\CompanySettings; use Illuminate\Support\Facades\App; use Illuminate\Support\Facades\Cache; use Laracasts\Presenter\PresentableTrait; +use App\Utils\Traits\CompanySettingsSaver; +use Illuminate\Notifications\Notification; +use App\Models\Presenters\CompanyPresenter; +use App\Services\Notification\NotificationService; +use Illuminate\Database\Eloquent\Relations\HasMany; +use Illuminate\Database\Eloquent\Relations\BelongsTo; /** * App\Models\Company @@ -512,6 +513,14 @@ class Company extends BaseModel return $this->hasMany(Project::class)->withTrashed(); } + /** + * @return HasMany + */ + public function vendor_contacts() :HasMany + { + return $this->hasMany(VendorContact::class)->withTrashed(); + } + /** * @return HasMany */ diff --git a/config/ninja.php b/config/ninja.php index c07d03073f..0bac154778 100644 --- a/config/ninja.php +++ b/config/ninja.php @@ -15,8 +15,8 @@ return [ 'require_https' => env('REQUIRE_HTTPS', true), 'app_url' => rtrim(env('APP_URL', ''), '/'), 'app_domain' => env('APP_DOMAIN', 'invoicing.co'), - 'app_version' => env('APP_VERSION','5.7.43'), - 'app_tag' => env('APP_TAG','5.7.43'), + 'app_version' => env('APP_VERSION','5.7.44'), + 'app_tag' => env('APP_TAG','5.7.44'), 'minimum_client_version' => '5.0.16', 'terms_version' => '1.0.1', 'api_secret' => env('API_SECRET', false),